Details
-
Bug
-
Resolution: Not a Bug
-
Major
-
Cheshire-Cat
-
Untriaged
-
Centos 64-bit
-
1
-
Unknown
Description
Build: 7.0.0-4342
Having 1000 docs like
{
|
"mutated": 0, |
"join_date": "1993-05-16T18:16:44", |
"languages_known": [ |
"Urdu", |
"German", |
"Hindi" |
],
|
"manages": { |
"reports": [ |
"Kerry Allen", |
"Kimberly Allen", |
"Riona Wilson", |
"Kerry-Ann Ward", |
"Keelia Evans", |
"Hanna Rogers", |
"Kory Rogers", |
"Tempest Harris" |
],
|
"team_size": 8 |
},
|
"name": "Ambika Clark", |
"dept": "Pre-sales", |
"salary": 104754, |
"type": "emp", |
"is_manager": true, |
"email": "Ambika@mcdiabetes.com", |
"emp_id": "10000001" |
}
|
loaded into collection default.scope1.collection1
and having 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 |
}
|
}
|
},
|
"store": { |
"indexType": "scorch", |
"mossStoreOptions": {}, |
"segmentVersion": 15 |
}
|
},
|
"sourceType": "gocbcore", |
"sourceName": "default", |
"sourceUUID": "843019ddad5792ed1a27bcdc874bb799", |
"sourceParams": {}, |
"planParams": { |
"maxPartitionsPerPIndex": 171, |
"numReplicas": 0, |
"indexPartitions": 6 |
},
|
"uuid": "13909364f359d5b2" |
}
|
I'm trying to run the following query:
select count(*) from `default`.scope1.collection1 USE INDEX(USING FTS) where salary < -10 and salary > -100 |
It returns an error:
[
|
{
|
"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 salary < -10 and salary > -100" |
}
|
]
|
Almost the same query
select count(*) from `default`.scope1.collection1 USE INDEX(USING FTS) where salary >-100 and salary < -10 |
(I just changed positions of salary conditions)
executes successfully