Details
-
Bug
-
Resolution: Fixed
-
Major
-
Cheshire-Cat
-
7.0.0-2302
-
Untriaged
-
1
-
Unknown
Description
1 bucket
primary index on bucket
default fts index created on the bucket (with analyzer set to keyword)
I have this query:
SELECT MAX( decimal_field1 ) FROM simple_table_db_25169944_simple_table WHERE (varchar_field1 BETWEEN "AGinObeWBu" and "zyByCDiiAL") AND (varchar_field1 = "aNRxXzlgWU")
This query uses the primary index and returns:
[
{ "$1": 4433 }]
Now if I run this query:
SELECT MAX( decimal_field1 ) FROM simple_table_db_25169944_simple_table USE INDEX(USING FTS,USING GSI) WHERE (varchar_field1 BETWEEN "AGinObeWBu" and "zyByCDiiAL") AND (varchar_field1 = "aNRxXzlgWU")
It uses fts default index and returns:
[
{ "$1": null }]
Here is the document that fits the query criteria in its entirety:
[
{
"simple_table_db_25169944_simple_table":
}
]
here is the explain plan of the broken query:
{
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "IndexFtsSearch",
|
"index": "default_index1",
|
"index_id": "4349fc00f170e7c3",
|
"keyspace": "simple_table_db_25169944_simple_table",
|
"namespace": "default",
|
"search_info": {
|
"field": "\"\"",
|
"options": "{\"index\": \"default_index1\"}",
|
"outname": "out",
|
"query": "{\"query\": {\"conjuncts\": [{\"field\": \"varchar_field1\", \"inclusive_max\": true, \"inclusive_min\": true, \"max\": \"zyByCDiiAL\", \"min\": \"AGinObeWBu\"}, {\"field\": \"varchar_field1\", \"term\": \"aNRxXzlgWU\"}]}, \"score\": \"none\"}"
|
},
|
"using": "fts"
|
},
|
{
|
"#operator": "Fetch",
|
"filter": "((\"AGinObeWBu\" <= (`simple_table_db_25169944_simple_table`.`varchar_field1`)) and ((`simple_table_db_25169944_simple_table`.`varchar_field1`) <= \"zyByCDiiAL\") and ((`simple_table_db_25169944_simple_table`.`varchar_field1`) = \"aNRxXzlgWU\") and ((`simple_table_db_25169944_simple_table`.`decimal_field1`) is not null))",
|
"keyspace": "simple_table_db_25169944_simple_table",
|
"namespace": "default"
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Filter",
|
"condition": "((`simple_table_db_25169944_simple_table`.`varchar_field1`) between \"AGinObeWBu\" and \"zyByCDiiAL\")"
|
},
|
{
|
"#operator": "InitialGroup",
|
"aggregates": [
|
"max((`simple_table_db_25169944_simple_table`.`decimal_field1`))"
|
],
|
"group_keys": []
|
}
|
]
|
}
|
},
|
{
|
"#operator": "IntermediateGroup",
|
"aggregates": [
|
"max((`simple_table_db_25169944_simple_table`.`decimal_field1`))"
|
],
|
"group_keys": []
|
},
|
{
|
"#operator": "FinalGroup",
|
"aggregates": [
|
"max((`simple_table_db_25169944_simple_table`.`decimal_field1`))"
|
],
|
"group_keys": []
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "InitialProject",
|
"result_terms": [
|
{
|
"expr": "max((`simple_table_db_25169944_simple_table`.`decimal_field1`))"
|
}
|
]
|
}
|
]
|
}
|
}
|
]
|
}
|
Here is my fts index definition:
{
"type": "fulltext-index",
"name": "default_index1",
"uuid": "4349fc00f170e7c3",
"sourceType": "gocbcore",
"sourceName": "simple_table_db_25169944_simple_table",
"sourceUUID": "8d60a61219d2d47cb4efaf5a91f27ba1",
"planParams":
,
"params": {
"doc_config":
,
"mapping": {
"analysis": {},
"default_analyzer": "standard",
"default_datetime_parser": "dateTimeOptional",
"default_field": "_all",
"default_mapping":
,
"default_type": "_default",
"docvalues_dynamic": true,
"index_dynamic": true,
"store_dynamic": false,
"type_field": "type"
},
"store": {
"indexType": "scorch",
"mossStoreOptions": {}
}
},
"sourceParams": {}
}
Logs attatched
Attachments
Issue Links
- duplicates
-
MB-38957 [FTS] Document mapping's analyzer not inherited by child fields
- Closed