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

FTS: fts index search results differ from Elastic search results.

    XMLWordPrintable

Details

    • Triaged
    • Centos 64-bit
    • 1
    • Unknown

    Description

      Build: 7.0.0-4907

      Last found good build: 6.6.0-7909

      Create cluster {kv, fts}

      Create bucket `default`, load attached dump (default.json) via the following cmd:

      /opt/couchbase/bin/cbimport json -c couchbase://127.0.0.1 -u Administrator -p password -b default -d file:///tmp/default.json -f lines -g key::#MONO_INCR# -t 1
      

      Create default fts index on `default` bucket:

      {
       "name": "index_default",
       "type": "fulltext-index",
       "params": {
        "doc_config": {
         "docid_prefix_delim": "",
         "docid_regexp": "",
         "mode": "type_field",
         "type_field": "type"
        },
        "mapping": {
         "default_analyzer": "standard",
         "default_datetime_parser": "dateTimeOptional",
         "default_field": "_all",
         "default_mapping": {
          "dynamic": true,
          "enabled": true
         },
         "default_type": "_default",
         "docvalues_dynamic": true,
         "index_dynamic": true,
         "store_dynamic": false,
         "type_field": "_type"
        },
        "store": {
         "indexType": "scorch",
         "mossStoreOptions": {}
        }
       },
       "sourceType": "couchbase",
       "sourceName": "default",
       "sourceUUID": "091c624ca85ccbfa2c9e84b5dd4ff9ab",
       "sourceParams": {},
       "planParams": {
        "maxPartitionsPerPIndex": 171,
        "numReplicas": 0,
        "indexPartitions": 6
       },
       "uuid": "13fe8ed2a9f3f0e8"
      }
      

      Then run the following query:

      curl -XPOST -H "Content-Type: application/json" \
      -u <username>:<password> http://172.23.107.77:8094/api/index/index_default/query \
      -d '{
        "explain": true,
        "fields": [
          "*"
        ],
        "highlight": {},
        "query": {
          "query": "-salary:>117000"
        }
      }'
      

      It should return 686 results basing on corresponding Elastic search results and last good build results.

      But it returns  2702 results

       

      Attachments

        1. Screen Shot 2021-04-15 at 6.31.58 PM.png
          80 kB
          Evgeny Makarenko
        2. default.json
          1.02 MB
          Evgeny Makarenko
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            evgeny.makarenko Evgeny Makarenko (Inactive)
            evgeny.makarenko Evgeny Makarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty