The problem I have is that when I do this I don’t get any results:
SELECT *
FROM `search` AS a
WHERE sub_type="me"
AND SEARCH(a,{"query": { "query": "app_name:dark" }})
This is the index:
{
"type": "fulltext-index",
"name": "search_reduced",
"uuid": "35f39c227af2034a",
"sourceType": "couchbase",
"sourceName": "search",
"sourceUUID": "0784c2c848bd1dcf8d8c5148fe6a2bdd",
"planParams": {
"maxPartitionsPerPIndex": 1024,
"indexPartitions": 1
},
"params": {
"doc_config": {
"docid_prefix_delim": "",
"docid_regexp": "",
"mode": "type_field",
"type_field": "sub_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": {
"me": {
"dynamic": false,
"enabled": true,
"properties": {
"a_app_id": {
"dynamic": false,
"enabled": true,
"fields": [
{
"docvalues": true,
"include_in_all": true,
"index": true,
"name": "app_id",
"type": "number"
}
]
},
"a_app_bundle_id": {
"dynamic": false,
"enabled": true,
"fields": [
{
"docvalues": true,
"include_in_all": true,
"index": true,
"name": "app_bundle_id",
"type": "text"
}
]
},
"a_app_name": {
"dynamic": false,
"enabled": true,
"fields": [
{
"docvalues": true,
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "app_name",
"type": "text"
}
]
},
"a_app_provider_name": {
"dynamic": false,
"enabled": true,
"fields": [
{
"docvalues": true,
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "app_provider_name",
"type": "text"
}
]
},
"a_app_release_date": {
"dynamic": false,
"enabled": true,
"fields": [
{
"docvalues": true,
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "app_release_date",
"type": "number"
}
]
},
"a_app_seller_name": {
"dynamic": false,
"enabled": true,
"fields": [
{
"docvalues": true,
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "app_seller_name",
"type": "text"
}
]
},
"a_hp": {
"dynamic": false,
"enabled": true,
"fields": [
{
"docvalues": true,
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "hp",
"type": "number"
}
]
},
"app_uuid": {
"dynamic": false,
"enabled": true,
"fields": [
{
"docvalues": true,
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "app_uuid",
"type": "text"
}
]
}
}
}
}
},
"store": {
"indexType": "scorch"
}
},
"sourceParams": {}
}
I have also tried with the app_name vs a_app_name (see the a_ at the beginning of the field name
SELECT *
FROM `search` AS a
WHERE sub_type="me"
AND SEARCH(a,{"query": { "query": "a_app_name:dark" }})
If I search directly in the search bar of the index, I get results, as you can see in the below image
What could be the problem?