Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.1.0
-
Untriaged
-
1
-
Unknown
Description
Build: 7.1.0-2197
Index:
{
|
"type": "fulltext-index",
|
"name": "test1",
|
"uuid": "184bb1f3dec60953",
|
"sourceType": "gocbcore",
|
"sourceName": "default",
|
"sourceUUID": "f0f5eff3881e810707ecb2732fbe7d25",
|
"planParams": {
|
"maxPartitionsPerPIndex": 1024,
|
"indexPartitions": 1
|
},
|
"params": {
|
"doc_config": {
|
"docid_prefix_delim": "",
|
"docid_regexp": "",
|
"mode": "type_field",
|
"type_field": "type"
|
},
|
"mapping": {
|
"analysis": {},
|
"default_analyzer": "keyword",
|
"default_datetime_parser": "dateTimeOptional",
|
"default_field": "_all",
|
"default_mapping": {
|
"dynamic": true,
|
"enabled": false
|
},
|
"default_type": "_default",
|
"docvalues_dynamic": false,
|
"index_dynamic": true,
|
"store_dynamic": false,
|
"type_field": "_type",
|
"types": {
|
"hotel": {
|
"dynamic": false,
|
"enabled": true,
|
"properties": {
|
"company": {
|
"dynamic": false,
|
"enabled": true,
|
"fields": [
|
{
|
"index": true,
|
"name": "company",
|
"type": "text"
|
}
|
]
|
}
|
}
|
}
|
}
|
},
|
"store": {
|
"indexType": "scorch",
|
"segmentVersion": 15
|
}
|
},
|
"sourceParams": {}
|
}
|
INSERT INTO default VALUES("f01",{"type":"hotel", "company":"999"});
|
INSERT INTO default VALUES("f02",{"type":"airport", "company":"999"});
|
SELECT META(t).id
|
FROM `default` AS t USE INDEX (USING FTS)
|
WHERE t.type="hotel" AND SEARCH(t,{ "match_all": {} });
|
Above query errors like below:
[
|
{
|
"code": 5000,
|
"msg": "n1fty: not sargable",
|
"query": "SELECT META(t).id \nFROM `default` AS t USE INDEX (USING FTS) \nWHERE t.type=\"hotel\" AND SEARCH(t,{ \"match_all\": {} });"
|
}
|
]
|
Explain of the above query works fine:
{
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "IndexFtsSearch",
|
"as": "t",
|
"index": "test1",
|
"index_id": "184bb1f3dec60953",
|
"keyspace": "default",
|
"namespace": "default",
|
"search_info": {
|
"field": "\"\"",
|
"options": "{\"index\": \"test1\"}",
|
"outname": "out",
|
"query": "{\"query\": {\"boost\": null, \"match_all\": {}}, \"score\": \"none\"}"
|
},
|
"using": "fts"
|
},
|
{
|
"#operator": "Fetch",
|
"as": "t",
|
"keyspace": "default",
|
"namespace": "default"
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Filter",
|
"condition": "(((`t`.`type`) = \"hotel\") and search(`t`, {\"match_all\": {}}))"
|
},
|
{
|
"#operator": "InitialProject",
|
"result_terms": [
|
{
|
"expr": "(meta(`t`).`id`)"
|
}
|
]
|
}
|
]
|
}
|
}
|
]
|
}
|
Attachments
Issue Links
- causes
-
MB-52476 Check query val pointer contents before de-referencing
- Resolved