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

[Flex]: flex query not selecting the index with doc id regex as type identifier

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.1.0
    • 7.1.0
    • fts
    • None
    • Untriaged
    • 1
    • Unknown

    Description

      Build : 7.1.0-2304

      • Load travel -sample
      • create index like below:

        {
          "type": "fulltext-index",
          "name": "travel-index",
          "uuid": "1a448bf79b6c5ff2",
          "sourceType": "gocbcore",
          "sourceName": "travel-sample",
          "sourceUUID": "456633d80afdabb63fc7295fefed53af",
          "planParams": {
            "maxPartitionsPerPIndex": 1024,
            "indexPartitions": 1
          },
          "params": {
            "doc_config": {
              "docid_prefix_delim": "",
              "docid_regexp": "([^_]*)",
              "mode": "docid_regexp",
              "type_field": "type"
            },
            "mapping": {
              "analysis": {},
              "default_analyzer": "keyword",
              "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": {
                "airport": {
                  "dynamic": true,
                  "enabled": true
                }
              }
            },
            "store": {
              "indexType": "scorch",
              "mossStoreOptions": {},
              "segmentVersion": 15
            }
          },
          "sourceParams": {}
        }
        

      • Below flex query returns "No index available"

        explain select meta().id from `travel-sample` USE INDEX(USING FTS) where meta().`id` like "%airport%" and city = "Delta"
        

        Note: search query works fine.

      Attachments

        Issue Links

          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:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty