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 0 results
Number of results from flex query: select meta().id as id from default USE INDEX (USING FTS, USING GSI) where type = "emp" and ( join_date >= "1979-09-25T12:17:00" and join_date < "2020-05-05T00:01:29.741696") ORDER BY id ASC is 0
Number of results from gsi query: select meta().id as id from default where type = "emp" and ( join_date >= "1979-09-25T12:17:00" and join_date < "2020-05-05T00:01:29.741696") order by id asc is 586
Explain plan:
{
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "IndexFtsSearch",
|
"index": "custom_index",
|
"index_id": "56c7a816ec37cdf8",
|
"keyspace": "default",
|
"namespace": "default",
|
"search_info": {
|
"field": "\"\"",
|
"options": "{\"index\": \"custom_index\"}",
|
"outname": "out",
|
"query": "{\"query\": {\"conjuncts\": [{\"field\": \"type\", \"term\": \"emp\"}, {\"field\": \"join_date\", \"inclusive_max\": false, \"inclusive_min\": true, \"max\": \"2020-05-05T00:01:29.741696\", \"min\": \"1979-09-25T12:17:00\"}]}, \"score\": \"none\"}"
|
},
|
"using": "fts"
|
},
|
{
|
"#operator": "Fetch",
|
"keyspace": "default",
|
"namespace": "default"
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Filter",
|
"condition": "(((`default`.`type`) = \"emp\") and ((\"1979-09-25T12:17:00\" <= (`default`.`join_date`)) and ((`default`.`join_date`) < \"2020-05-05T00:01:29.741696\")))"
|
},
|
{
|
"#operator": "InitialProject",
|
"result_terms": [
|
{
|
"as": "id",
|
"expr": "(meta(`default`).`id`)"
|
}
|
]
|
}
|
]
|
}
|
}
|
]
|
},
|
{
|
"#operator": "Order",
|
"sort_terms": [
|
{
|
"expr": "`id`"
|
}
|
]
|
}
|
]
|
}
|
Attachments
Issue Links
- duplicates
-
MB-39173 Flex Index: one doc missing with date in query predicate
- Closed