Details
-
Improvement
-
Resolution: Won't Fix
-
Major
-
Cheshire-Cat
-
1
Description
Build: 7.0.0-1939
- Load dataset attached
- Create fts index with below:
{
"type": "fulltext-index",
"name": "custom_index",
"uuid": "54b8538f8737782f",
"sourceType": "gocbcore",
"sourceName": "default",
"sourceUUID": "a1e2de9aa61b2b306e6738448e25e42c",
"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": {
"is_manager": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "is_manager",
"type": "boolean"
}
]
},
"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": {
"team_size": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "team_size",
"type": "number"
}
]
}
}
},
"mutated": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "mutated",
"type": "number"
}
]
},
"name": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "keyword",
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "name",
"type": "text"
}
]
}
}
}
}
},
"store": {
"indexType": "scorch",
"mossStoreOptions": {}
}
},
"sourceParams": {}
}
- Create GSI primary index
- For the Flex query with type = "emp" and type = "emp" gives 0 results where from GSI it gives 1000 results
select meta().id from default USE INDEX ( USING FTS, USING GSI) where type = "emp" and type = "emp"
- Explain plan
{
"#operator": "Sequence",
"~children": [
{
"#operator": "IndexFtsSearch",
"covers": [
"cover ((((`default`.`type`) = \"emp\") and ((`default`.`type`) = \"emp\")))",
"cover ((meta(`default`).`id`))"
],
"index": "custom_index",
"index_id": "54b8538f8737782f",
"keyspace": "default",
"namespace": "default",
"search_info": {
"field": "\"\"",
"options": "{\"index\": \"custom_index\"}",
"outname": "out",
"query": "{\"query\": null, \"score\": \"none\"}"
},
"using": "fts"
},
{
"#operator": "Parallel",
"~child": {
"#operator": "Sequence",
"~children": [
{
"#operator": "Filter",
"condition": "cover ((((`default`.`type`) = \"emp\") and ((`default`.`type`) = \"emp\")))"
},
{
"#operator": "InitialProject",
"result_terms": [
{
"expr": "cover ((meta(`default`).`id`))"
}
]
}
]
}
}
]
}
Attachments
Issue Links
- is duplicated by
-
MB-39065 FlexIndex: FlexQuery not returning same results consistently
- Closed