Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-22416

[FTS] QueryString syntax doesn't have short way to perform exact numeric equality search

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.0.0
    • 5.0.0
    • fts
    • None
    • Untriaged
    • Unknown

    Description

      A query string query to look for an exact numeric value needs to use a bounded approach, using both '<=' and '>=' numeric range operators. For example, for the a beer-sample FTS index looking for beers with a numeric abv field value of 6...

      +abv:>=6 +abv:<=6

      Note, the above approach also might not work as expected if there are more operators in the query string.

      On what's going on... a search for "+abv:6" (I think) performs a default (probably text) analysis on the "6", leading to a text-oriented term search instead of an encoded numeric term search.

      One possible proposed syntax might be "+abv:=6", but not sure of the implications of that. Should probably look at lucene syntax to see what they do.

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-22416
          # Subject Branch Project Status CR V

          Activity

            People

              apiravi Aruna Piravi (Inactive)
              steve Steve Yen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty