Hi David and all,
Over a year ago I posted a usecase to, the in this context familiar, issue SOLR-2155 of modelling openinghours using multivalued points.
David gave two possible solutions that would work, but I'm wondering if the latest advancements in spatial search have made a more straightforward implementation possible.
- A venue can have multiple openinghours (depending on day of week, special festivitydays, and sometimes even multiple timeslots per day)
- queries like the following should be possible: "which venues are open at least for the following timespan: [NOW, NOW+3h] " Or [this monday 6h, this monday 11pm]
- no need to search in the past.
To me this an [open,close]-timespan could be nicely modelled as a point, thus all openinghours of a venue could be defined as multiple points. (multivalued points, multipoint, shape, not sure on the recent nomenclature)
In the open/close domain the general query would be:
Given a user defined query Q(open,close): return all venues that have a timespan T(open,close) (out of many timespans) for which the following holds:
q.open <= T.open AND T.close <=q.close
Mapping 'open' to latitude and 'close' to longitude results in:
Given a user defined point X, return all docs that have a point P defined (out of many points) for which the following holds:
X.latitude <= P.latitude AND P.longitude <=X.longitude
The question: Is such a query on multipoints now doable out-of-the-box with spatial4j (or any other supported plugin for that matter) ?
Any help highly appreciated!
Oh btw: the idea behind the translation-function becomes easy as I don't need to search dates in the past. Moreover, a reindex takes place every night meaning today 0AM could be defined as 0. With a granularity of 15 minutes and wanting to search 100 days ahead: the transform is simply mapping 9600 intervals (100*24*4) both for open and close onto [-90,90] and [0,180] respectively.
Please ask again on the solr-user list and CC me to ensure I see it. I'm trying to encourage questions being asked & answered in the correct venue. Spatial4j is more shape oriented whereas this is more search oriented (yeah it's a fuzzy line sometimes). I haven't been good about this in the past but I want to do the right thing now.
On Sat, Dec 8, 2012 at 8:00 AM, gbrits <[hidden email]> wrote:
Hi David and all,
dev mailing list
No probs. Done.
Consider this the CC :)
|Free forum by Nabble||Edit this page|