I created as per docs my geo based index where i have a object called geo which holds values for lat and lon.
First strange thing is that it claims that 100% of my docs are indexed but the doc count is like 50% of the docs in the bucket.
Here is what my index looks like
{
"name": "Geo_Index",
"type": "fulltext-index",
"params": {
"doc_config": {
"docid_prefix_delim": "",
"docid_regexp": "",
"mode": "type_field",
"type_field": "_type"
},
"mapping": {
"default_analyzer": "standard",
"default_datetime_parser": "dateTimeOptional",
"default_field": "_all",
"default_mapping": {
"dynamic": false,
"enabled": true,
"properties": {
"geo": {
"enabled": true,
"dynamic": false,
"fields": [
{
"docvalues": true,
"include_in_all": true,
"include_term_vectors": true,
"index": true,
"name": "geo",
"store": true,
"type": "geopoint"
}
]
}
}
},
"default_type": "_default",
"docvalues_dynamic": true,
"index_dynamic": true,
"store_dynamic": false,
"type_field": "_type"
},
"store": {
"indexType": "scorch"
}
},
"sourceType": "couchbase",
"sourceName": "rets",
"sourceUUID": "68ba50313fd833d089e0c9704188988f",
"sourceParams": {},
"planParams": {
"maxPartitionsPerPIndex": 171,
"indexPartitions": 6,
"numReplicas": 0
},
"uuid": "fd96992b583c4a96"
}
when i run my query like this
curl -u Administrator:password -X POST \
-H "Content-Type: application/json" \
http://localhost:8094/api/index/Geo_Index/query \
-d '{
"from": 0,
"size": 10,
"query": {
"location": {
"lon": -110.6887945,
"lat": 32.516891
},
"distance": "5mi",
"field": "geo"
},
"sort": [
{
"by": "geo_distance",
"field": "geo",
"unit": "mi",
"location": {
"lon": -110.6887945,
"lat": 32.516891
}
}
]
}'
i get
So why do i get errors and why am i missing docs in index ?