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

Flex:query result discrepancy with multi-collection index with same field indexed for both collection

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      Build: 7.0.0 build 5239

      Create a cluster with kv, query+fts, fts
      Load travel-sample
      Create FTS index with below defn where "country" is child field for both the collections: inventory.airline and inventory.airport

      {
        "type": "fulltext-index",
        "name": "idx2",
        "uuid": "127df049829e2545",
        "sourceType": "gocbcore",
        "sourceName": "travel-sample",
        "sourceUUID": "506befe80bf24b5f8c960f9908db54f4",
        "planParams": {
          "maxPartitionsPerPIndex": 1024,
          "indexPartitions": 1
        },
        "params": {
          "doc_config": {
            "docid_prefix_delim": "",
            "docid_regexp": "",
            "mode": "scope.collection.type_field",
            "type_field": "type"
          },
          "mapping": {
            "analysis": {},
            "default_analyzer": "keyword",
            "default_datetime_parser": "dateTimeOptional",
            "default_field": "_all",
            "default_mapping": {
              "dynamic": true,
              "enabled": false
            },
            "default_type": "_default",
            "docvalues_dynamic": false,
            "index_dynamic": true,
            "store_dynamic": false,
            "type_field": "_type",
            "types": {
              "inventory.airline": {
                "dynamic": false,
                "enabled": true,
                "properties": {
                  "country": {
                    "dynamic": false,
                    "enabled": true,
                    "fields": [
                      {
                        "index": true,
                        "name": "country",
                        "type": "text"
                      }
                    ]
                  }
                }
              },
              "inventory.airport": {
                "dynamic": false,
                "enabled": true,
                "properties": {
                  "country": {
                    "dynamic": false,
                    "enabled": true,
                    "fields": [
                      {
                        "index": true,
                        "name": "country",
                        "type": "text"
                      }
                    ]
                  }
                }
              }
            }
          },
          "store": {
            "indexType": "scorch",
            "segmentVersion": 15
          }
        },
        "sourceParams": {}
      }
      

      Running below flex query returns sometimes 242 docs and sometimes 21. Expected result is 21.

      select meta().id from `travel-sample`.inventory.airline USE INDEX(USING FTS) where country = "France"
      

      Results of running above query in loop: test

      Running below flex query returns sometimes 242 and sometimes 221. Expected result is 221

      select meta().id from `travel-sample`.inventory.airport USE INDEX(USING FTS) where country = "France"
      

      Results of running above query in loop: test2

      Attachments

        1. test
          99 kB
        2. test2
          160 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            girish.benakappa Girish Benakappa
            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