Details
-
Improvement
-
Resolution: Fixed
-
Major
-
6.6.0, Cheshire-Cat
Description
Build 7.0.0 build 1767
Flex Query will not consider FTS index for the query with all wildcards like "%@%"
Steps:
Create a cluster with kv, query, fts
Create a bucket and default fts index with email filed with keyword analyzer
Index defn:
{
|
"type": "fulltext-index",
|
"name": "default_index_1",
|
"uuid": "2446010add734d27",
|
"sourceType": "gocbcore",
|
"sourceName": "default",
|
"sourceUUID": "04fce8651da7c91e9e34ff56d6477820",
|
"planParams": {
|
"maxPartitionsPerPIndex": 171,
|
"indexPartitions": 6
|
},
|
"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": false,
|
"enabled": true,
|
"properties": {
|
"email": {
|
"dynamic": false,
|
"enabled": true,
|
"fields": [
|
{
|
"analyzer": "keyword",
|
"index": true,
|
"name": "email",
|
"type": "text"
|
}
|
]
|
}
|
}
|
},
|
"default_type": "_default",
|
"docvalues_dynamic": true,
|
"index_dynamic": true,
|
"store_dynamic": false,
|
"type_field": "_type"
|
},
|
"store": {
|
"indexType": "scorch",
|
"mossStoreOptions": {}
|
}
|
},
|
"sourceParams": {}
|
}
|
Query : select email from default USE INDEX (USING FTS) where email LIKE 'email@%' ---> Good. Goes through FTS Index
Query: select email from default USE INDEX (USING FTS) where email LIKE '%@%' ---> Fails. Does not consider FTS index.