Details
-
Bug
-
Resolution: Duplicate
-
Major
-
7.1.0
-
Untriaged
-
1
-
Unknown
Description
Build: 7.1.0-1601
- Create a bucket with one doc like below:
{
"click": "to edit",
"with JSON": "there are no reserved field names",
"type": "doc"
}
- Create a fts index like below:
curl -XPUT -H "Content-Type: application/json" \
-u <username>:<password> http://172.23.100.13:8094/api/index/first -d \
'{
"type": "fulltext-index",
"name": "first",
"uuid": "4bd9ec59f10a7fe3",
"sourceType": "gocbcore",
"sourceName": "def",
"sourceUUID": "b8f67dd024b2b26f0824fdd585ec812c",
"planParams": {
"maxPartitionsPerPIndex": 1024,
"indexPartitions": 1
},
"params": {
"doc_config": {
"docid_prefix_delim": "",
"docid_regexp": "",
"mode": "type_field",
"type_field": "type"
},
"mapping": {
"analysis": {},
"default_analyzer": "standard",
"default_datetime_parser": "dateTimeOptional",
"default_field": "_all",
"default_mapping": {
"dynamic": true,
"enabled": false
},
"default_type": "_default",
"docvalues_dynamic": false,
"index_dynamic": true,
"store_dynamic": false,
"type_field": "_type",
"types": {
"doc": {
"dynamic": false,
"enabled": true,
"properties": {
"click": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "keyword",
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "click",
"type": "text"
}
]
}
}
}
}
},
"store": {
"indexType": "scorch",
"segmentVersion": 15
}
},
"sourceParams": {}
}'
Run Below queries:
select meta().id from def where type='doc' and search(def, {"query": "click:\"to edit\""})
|
Returns 1 doc as expected
|
select meta().id from def where type='doc' and search(def, {"query": "-click:\"to edit\""})
|
Returns 0 docs as expected
|
select meta().id from def where type='doc' and search(def, {"query": "click:\"to\""})
|
Returns 0 docs as expected
|
select meta().id from def where type='doc' and search(def, {"query": "-click:\"to\""})
|
*Returns 0 docs but we expect 1 doc
|
*
|
Querying fts directly returns 1 doc:
|
curl -XPOST -H "Content-Type: application/json" \
|
-u <username>:<password> http://172.23.100.13:8094/api/index/first/query \
|
-d '{
|
"explain": true,
|
"fields": [
|
"*"
|
],
|
"highlight": {},
|
"query": {
|
"query": "-click:\"to\""
|
},
|
"size": 10,
|
"from": 0
|
}'
|
|
|
Attachments
Issue Links
- duplicates
-
MB-39887 FTS: N1FTY: for non-covering queries n1fty expects query should contain index_name or analyzer for NEG cases of match and match_phrase queries
- Open