I have a bucket with around 200,000 keys that I'm querying with a Full Text Search. The data returns with accurate results, but I need a way to return the bucket value data with the results.
I've tried indexing the object I want to pull with a type map of inherit, but nothing seems to be returned with fields: ["*"] other than the default type mapping. The docs make it seem like it should be possible with Type Mapping, but I seem to be missing something. The only solution I can think of is to store the resulting IDs and run them against a SQL query with the USE KEYS [""] parameter.
I'm running Couchbase 5.1.
Bucket Object
{
"myData": {
"foo": "bar"
},
"otherData": {
"foo": "bar"
}
}
Response Body
{
"status": {
"total": 6,
"failed": 0,
"successful": 6
},
"request": {
"query": {
"query": "ammonia"
},
"size": 3,
"from": 0,
"highlight": null,
"fields": [
"*"
],
"facets": null,
"explain": false,
"sort": [
"-_score"
],
"includeLocations": false
},
"hits": [
{
"index": "x_lookup_4a3ce884b7959a52_aa574717",
"id": "49648042171",
"score": 2.3192631344475236,
"sort": [
"_score"
]
},
{
"index": "x_lookup_4a3ce884b7959a52_aa574717",
"id": "49648042174",
"score": 2.3192631344475236,
"sort": [
"_score"
]
},
{
"index": "x_lookup_4a3ce884b7959a52_aa574717",
"id": "52735091636",
"score": 2.2918152674612653,
"sort": [
"_score"
]
}
],
"total_hits": 256,
"max_score": 2.3192631344475236,
"took": 699827,
"facets": {}
}