I have index a field specifically.
“types”: {
“my-scope.Session”: {
“dynamic”: false,
“enabled”: true,
“properties”: {
“actor”: {
“dynamic”: false,
“enabled”: true,
“properties”: {
“reference”: {
“dynamic”: false,
“enabled”: true,
“fields”: [
{
“analyzer”: “keyword”,
“index”: true,
“name”: “reference”,
“type”: “text”
}
]
}
}
},
If I search FTS WEB UI directly, I get value.
{
“size”: 300,
“from”: 0,
“fields”: [
“*”
],
“query”: {
“must”: {
“conjuncts”: [
{
“field”: “actor.reference”,
“term”: “Practitioner/1014733033112248320”
}
]
}
},
“explain”: true
}
However, when I use N1QL + SEARCH, its. not returning
SELECT d.*
FROM mybucket.my-scope.Session d
WHERE SEARCH(d, {“must”:{“conjuncts”:[
{“field”:“actor.reference”,“term”:“Practitioner/1014733033112248320”}]}}
)
LIMIT 100
OFFSET 0
This does not return any value.
I suspect that ‘term’ used in N1QL + SEARCH is still tokenising the query value?
I have added ‘analyzer’: ‘keyword’ to the query. still does not work.
SELECT d.*
FROM mybucket.my-scope.Session d
WHERE SEARCH(d, {“must”:{“conjuncts”:[
{“field”:“actor.reference”,“term”:“Practitioner/1014733033112248320”, “analyzer”: “keyword”}]}}
)
LIMIT 100
OFFSET 0
I have tried ‘match’ instead of ‘term’. still not working.
Please help.
Couchbase Server Enterprise Edition 8.0.0 build 3777



