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

FlexIndex: FTS index not sargable for the predicates with like operator for matches with .%

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      Build: 7.0.0-1834

      • Load dataset attached
      • Create fts index where languages_known is an array element with below:

        {
          "type": "fulltext-index",
          "name": "custom_index",
          "uuid": "799ddfc7c9960031",
          "sourceType": "gocbcore",
          "sourceName": "default",
          "sourceUUID": "5e6b524d1d75add5e112fa78ac6caffd",
          "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": true,
                "enabled": false
              },
              "default_type": "_default",
              "docvalues_dynamic": true,
              "index_dynamic": true,
              "store_dynamic": false,
              "type_field": "type",
              "types": {
                "emp": {
                  "dynamic": false,
                  "enabled": true,
                  "properties": {
                    "email": {
                      "dynamic": false,
                      "enabled": true,
                      "fields": [
                        {
                          "analyzer": "keyword",
                          "include_in_all": true,
                          "include_term_vectors": true,
                          "index": true,
                          "name": "email",
                          "type": "text"
                        }
                      ]
                    },
                    "join_date": {
                      "dynamic": false,
                      "enabled": true,
                      "fields": [
                        {
                          "include_in_all": true,
                          "include_term_vectors": true,
                          "index": true,
                          "name": "join_date",
                          "type": "datetime"
                        }
                      ]
                    },
                    "manages": {
                      "dynamic": false,
                      "enabled": true,
                      "properties": {
                        "reports": {
                          "dynamic": false,
                          "enabled": true,
                          "fields": [
                            {
                              "analyzer": "keyword",
                              "include_in_all": true,
                              "include_term_vectors": true,
                              "index": true,
                              "name": "reports",
                              "type": "text"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            "store": {
              "indexType": "scorch",
              "mossStoreOptions": {}
            }
          },
          "sourceParams": {}
        }
        

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

        select meta().id from default USE INDEX (custom_index USING FTS) where type = "emp" and email like "devi@mcdiabetes.%"
        

      Attachments

        Issue Links

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

          Activity

            People

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