I have a need for a full text search that falls outside the current limits of my Couchbase expertise.
Suppose I have a bunch of documents that represent weather stations and they each look like this.
{
"description": "HONIARA/HENDERSON",
"docType": "station",
"geo": [
{
"elev": 9,
"firstTime": 1625097600,
"lastTime": 1647194400,
"lat": -9.42,
"lon": 160.05
}
],
"id": "MD:V01:METAR:station:AGGH",
"name": "AGGH",
"subset": "METAR",
"type": "MD",
"updateTime": 1642118411,
"version": "V01"
}
The reason that the geo field is a list is because weather stations can change location. That is why there is a firstTime and lastTime epoch contained within the geo element. I wanted to be able to know WHEN I knew that a given location was actually valid according to my other data criteria.
Is it possible to create a full text geo search and an associated query such that if given a bounding box it could check for any of the geo elements in the geo list for which the lat/lon are within the bounding box? I would need it to return either the list index or the associated firstTime and lastTime.
Alternatively could I create a query for which I give a bounding box and an epoch and the search would return all the documents which meet the criteria that the epoch falls between the firstTime and lastTime (inclusive) and the associated lat/lon pair is within the bounding box?
Any help on this is greatly appreciated. I searched through the forum and couldn’t find an answer that helped me sufficiently to solve the problem.
thanks