Details
-
Bug
-
Resolution: Duplicate
-
Major
-
Cheshire-Cat
-
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 queries with between, fts index is considered but returns different results comparing with GSI results
Number of results from flex query: select meta().id from default USE INDEX ( USING FTS) where type = "emp" and email between "callia@mcdiabetes.com" and "lucretia@mcdiabetes.com" is 548
Number of results from gsi query: select meta().id from default where type = "emp" and email between "callia@mcdiabetes.com" and "lucretia@mcdiabetes.com" is 559
Explain plan:
{
"#operator": "Sequence",
"~children": [
{
"#operator": "IndexFtsSearch",
"index": "default_index",
"index_id": "5005f41409c983df",
"keyspace": "default",
"namespace": "default",
"search_info": {
"field": "\"\"",
"options": "{\"index\": \"default_index\"}",
"outname": "out",
"query": "{\"query\": {\"conjuncts\": [{\"field\": \"type\", \"term\": \"emp\"}, {\"field\": \"email\", \"inclusive_max\": true, \"inclusive_min\": true, \"max\": \"lucretia@mcdiabetes.com\", \"min\": \"callia@mcdiabetes.com\"}]}, \"score\": \"none\"}"
},
"using": "fts"
},
{
"#operator": "Fetch",
"keyspace": "default",
"namespace": "default"
},
{
"#operator": "Parallel",
"~child": {
"#operator": "Sequence",
"~children": [
{
"#operator": "Filter",
"condition": "(((`default`.`type`) = \"emp\") and ((`default`.`email`) between \"callia@mcdiabetes.com\" and \"lucretia@mcdiabetes.com\"))"
},
{
"#operator": "InitialProject",
"result_terms": [
{
"expr": "(meta(`default`).`id`)"
}
]
}
]
}
}
]
}
Attachments
Issue Links
- duplicates
-
MB-38957 [FTS] Document mapping's analyzer not inherited by child fields
- Closed