Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
Cheshire-Cat
-
1
Description
Build: 7.0.0-4322
Having the following KV structure:
`default`.scope1.collection1
and set of 1000 docs loaded into collection1:
{
|
"mutated": 0, |
"join_date": "1982-11-24T01:57:56", |
"languages_known": [ |
"English", |
"Chinese", |
"Quechua" |
],
|
"name": "Drucilla Jr.", |
"dept": "Finance", |
"salary": 131488, |
"type": "emp", |
"is_manager": false, |
"email": "Drucilla@mcdiabetes.com", |
"emp_id": "10000001" |
}
|
and the following FTS index:
{
|
"name": "default_index_1", |
"type": "fulltext-index", |
"params": { |
"doc_config": { |
"docid_prefix_delim": "", |
"docid_regexp": "", |
"mode": "scope.collection.type_field", |
"type_field": "type" |
},
|
"mapping": { |
"default_analyzer": "keyword", |
"default_datetime_parser": "dateTimeOptional", |
"default_field": "_all", |
"default_mapping": { |
"dynamic": false, |
"enabled": false |
},
|
"default_type": "_default", |
"docvalues_dynamic": true, |
"index_dynamic": true, |
"store_dynamic": false, |
"type_field": "_type", |
"types": { |
"scope1.collection1": { |
"default_analyzer": "keyword", |
"dynamic": true, |
"enabled": true, |
"properties": { |
"type": { |
"enabled": true, |
"dynamic": false, |
"fields": [ |
{
|
"index": true, |
"name": "type", |
"type": "text" |
}
|
]
|
}
|
}
|
}
|
}
|
},
|
"store": { |
"indexType": "scorch", |
"mossStoreOptions": {}, |
"segmentVersion": 15 |
}
|
},
|
"sourceType": "gocbcore", |
"sourceName": "default", |
"sourceUUID": "91acd2e599b88e790c80341dcb1964db", |
"sourceParams": {}, |
"planParams": { |
"maxPartitionsPerPIndex": 171, |
"indexPartitions": 6, |
"numReplicas": 0 |
},
|
"uuid": "285edb4a658c064b" |
}
|
I'm trying to run the following query:
select count(*) from `default`.scope1.collection1 USE INDEX(USING FTS) where type NOT LIKE '%emp' |
As a result, I'm getting the following response:
[
|
{
|
"code": 4000, |
"msg": "No index available on keyspace `default`:`default`.`scope1`.`collection1` that matches your query. Use CREATE PRIMARY INDEX ON `default`:`default`.`scope1`.`collection1` to create a primary index, or check that your expected index is online.", |
"query": "select count(*) from `default`.scope1.collection1 USE INDEX(USING FTS) where type NOT LIKE '%emp'" |
}
|
]
|
The following query
select count(*) from `default`.scope1.collection1 USE INDEX(USING FTS) where type LIKE '%emp' |
executes successfully.