Thanks @abhinav
I added the USE FTS INDEX and there is an improvment on lowering the complexity
the speed remained the same (actually is so slow that I cannot get any result back from the query)
I think the FTS index is correct, as I get ~fast results (500ms)
here is the FTS index definition:
{
"type": "fulltext-index",
"name": "apps_search",
"uuid": "ee69269900de6ce2",
"sourceType": "couchbase",
"sourceName": "<redacted>",
"sourceUUID": "54a8a8a8c2c77f7cd8a8b789fbdb55be",
"planParams": {
"maxPartitionsPerPIndex": 11,
"indexPartitions": 100
},
"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": {
"app": {
"dynamic": false,
"enabled": true,
"properties": {
"<redacted>": {
"dynamic": false,
"enabled": true,
"properties": {
"app_provider_id": {
"dynamic": false,
"enabled": true,
"fields": [
{
"index": true,
"name": "app_provider_id",
"type": "number"
}
]
},
"app_bundle_id": {
"dynamic": false,
"enabled": true,
"fields": [
{
"index": true,
"name": "app_bundle_id",
"type": "text"
}
]
},
"app_name": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_in_all": true,
"index": true,
"name": "app_name",
"type": "text"
}
]
},
"app_primary_genre_id": {
"dynamic": false,
"enabled": true,
"fields": [
{
"index": true,
"name": "app_primary_genre_id",
"type": "number"
}
]
},
"app_provider_name": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_in_all": true,
"index": true,
"name": "app_provider_name",
"type": "text"
}
]
},
"app_release_date": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_term_vectors": true,
"index": true,
"name": "app_release_date",
"type": "number"
}
]
},
"app_seller_name": {
"dynamic": false,
"enabled": true,
"fields": [
{
"index": true,
"name": "app_seller_name",
"type": "text"
}
]
},
"user_rating_avg": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_term_vectors": true,
"index": true,
"name": "user_rating_avg",
"type": "number"
}
]
}
}
},
"country_code": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_in_all": true,
"index": true,
"name": "country_code",
"type": "text"
}
]
}
}
}
}
},
"store": {
"indexType": "scorch"
}
},
"sourceParams": {}
}