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

FTS:match query not returning the results

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Yes

    Description

      Build: 6.6.0 build 7716

      • Load the dataset attached
      • Create an index like below:

        {
          "type": "fulltext-index",
          "name": "default_index",
          "uuid": "7db53797cfab72d2",
          "sourceType": "couchbase",
          "sourceName": "default",
          "planParams": {
            "maxPartitionsPerPIndex": 171
          },
          "params": {
            "doc_config": {
              "docid_prefix_delim": "",
              "docid_regexp": "",
              "mode": "type_field",
              "type_field": "type"
            },
            "mapping": {
              "analysis": {},
              "default_analyzer": "standard",
              "default_datetime_parser": "dateTimeOptional",
              "default_field": "_all",
              "default_mapping": {
                "dynamic": false,
                "enabled": false
              },
              "default_type": "_default",
              "docvalues_dynamic": true,
              "index_dynamic": true,
              "store_dynamic": false,
              "type_field": "_type",
              "types": {
                "emp": {
                  "default_analyzer": "keyword",
                  "dynamic": true,
                  "enabled": true
                }
              }
            },
            "store": {
              "indexType": "scorch",
              "mossStoreOptions": {}
            }
          },
          "sourceParams": {}
        }
        

      • Below query isn't returning the expected results (which was returing in 6.5.1 build 6292, now returning 0 results)

        curl -XPOST -H "Content-Type: application/json" \
        -u <username>:<password> http://172.23.121.67:8094/api/index/default_index/query \
        -d '{
          "explain": true,
          "fields": [
            "*"
          ],
          "highlight": {},
          "query": {
            "query": "name:Safiya"
          }
        }'
         
         
        curl -XPOST -H "Content-Type: application/json" -u Administrator:password http://172.23.121.67:8094/api/index/default_index/query -d '{
          "explain": true,
          "fields": [
            "*"
          ],
          "highlight": {},
          "query": {
            "field": "name", "match":"Safiya"       
          }
        }'
         
         
        Expected results:
         
        [
          {
            "id": "emp10000001",
            "name": "Safiya Palmer"
          },
          {
            "id": "emp10000042",
            "name": "Safiya Reed"
          }
        ]
        
        

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            ritam.sharma Ritam Sharma added a comment -

            Girish Benakappa - Is this a regression that you have seen with latest run on 6..6 ?

            ritam.sharma Ritam Sharma added a comment - Girish Benakappa - Is this a regression that you have seen with latest run on 6..6 ?

            Ritam Sharma
            It looks like this is introduced in 6.6.0-7594.
            6.6.0-7593 same queries gives results as expected but not in 6.6.0-7594.

            girish.benakappa Girish Benakappa added a comment - Ritam Sharma It looks like this is introduced in 6.6.0-7594. 6.6.0-7593 same queries gives results as expected but not in 6.6.0-7594.
            ritam.sharma Ritam Sharma added a comment -

            Girish Benakappa - I have marked this bug as regression.

            ritam.sharma Ritam Sharma added a comment - Girish Benakappa - I have marked this bug as regression.
            abhinav Abhinav Dangeti added a comment - - edited

            Girish Benakappa, you're using a keyword analyzer for the index, so your search term for the match query needs to match the entire name (case sensitive). 

            This is the expected behavior and no changes that I know of have been made around this behavior.

            Note that there was a bug around the "analyzer" setting at the type mapping that wasn't being inherited which is addressed by: MB-38957

            That's possibly the bug you were seeing prior to 6.6.

            abhinav Abhinav Dangeti added a comment - - edited Girish Benakappa , you're using a keyword analyzer for the index, so your search term for the match query needs to match the entire name (case sensitive).  This is the expected behavior and no changes that I know of have been made around this behavior. Note that there was a bug around the "analyzer" setting at the type mapping that wasn't being inherited which is addressed by:  MB-38957 That's possibly the bug you were seeing prior to 6.6.

            Marking this as "Not a bug", please reopen the bug or reach out to me if you're not satisfied with the answer.

            abhinav Abhinav Dangeti added a comment - Marking this as "Not a bug", please reopen the bug or reach out to me if you're not satisfied with the answer.

            http://review.couchbase.org/c/testrunner/+/131766

            Fixed testcase based on this issue.

            girish.benakappa Girish Benakappa added a comment - http://review.couchbase.org/c/testrunner/+/131766 Fixed testcase based on this issue.

            People

              abhinav Abhinav Dangeti
              girish.benakappa Girish Benakappa
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty