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

Flex Index: Default Index: Fts index not sargable for query with OR

    XMLWordPrintable

Details

    • 1

    Description

      Build: 7.0.0-1939

      • Load dataset attached
      • Create default fts index with keyword analyzer:

        {
          "type": "fulltext-index",
          "name": "default_index",
          "uuid": "5005f41409c983df",
          "sourceType": "gocbcore",
          "sourceName": "default",
          "sourceUUID": "b08aa384fdcd7adfdfe3569237428631",
          "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": {
                "default_analyzer": "keyword",
                "dynamic": true,
                "enabled": true
              },
              "default_type": "_default",
              "docvalues_dynamic": true,
              "index_dynamic": true,
              "store_dynamic": false,
              "type_field": "type"
            },
            "store": {
              "indexType": "scorch",
              "mossStoreOptions": {}
            }
          },
          "sourceParams": {}
        }
        

      • Create GSI primary index
      • For the below Flex query, fts index is not considered.

        select meta().id from default USE INDEX (USING FTS, USING GSI) where type = "emp" and ( ( ( ( email between "antonia@mcdiabetes.com" and "maura@mcdiabetes.com") OR ( mutated = 1)) OR ( manages.team_size = 10) OR ( dept >= "Support" and dept < "Pre-sales")) OR ( dept >= "Training" and dept <= "Training") OR ( name > "Kallie" and name < "Severin")) OR ( email >= "dominique@mcdiabetes.com" and email <= "delores@mcdiabetes.com")
        

      Attachments

        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