Hello,

For me it looks like typical nested documents use-case. You have an
apartment document with nested lease documents. Where lease has from and to
fields. So, you need to find apartments which has no lease in the range
provided $need_from $need_to
conflicted leases can be found by

(from:[$need_from TO $need_to] )
OR
(to:[$need_from TO $need_to])
OR
     ((from:[* TO $need_from]) AND (to:[$need_from TO *]) )

then you need to get apartment which has no such leases.

AFAIK it can be done by Joins and Grouping in Solr. Some time ago I did by
SpanQueries <http://blog.griddynamics.com/search/label/Solr>, but now I'm
collaborating <https://issues.apache.org/jira/browse/SOLR-3076> around rocket
science<http://blog.mikemccandless.com/2012/01/searching-relational-content-with.html>
.

Also I have an idea about OOM. if you rollover range by the app forming
SolrInputDocuments it can cause the problem. To solve it you can pass two
numbers as a range but provide an own analyzer via schema which will expand
them into stream of numbers.

Regards

On Tue, Feb 28, 2012 at 2:11 AM, federico.wachs
<federico.wa...@2clams.com>wrote:

> This is used on an apartment booking system, and what I store as solr
> documents can be seen as apartments. These apartments can be booked for a
> certain amount of days with a check in and a check out date hence the
> ranges
> I was speaking of before.
>
> What I want to do is to filter off the apartments that are booked so my
> users won't have a bad user experience while trying to book an apartment
> that suits their needs.
>
> Did I make any sense? Please let me know, otherwise I can explain
> furthermore.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Is-there-a-way-to-implement-a-IntRangeField-in-Solr-tp3782083p3782304.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev
Lucid Certified
Apache Lucene/Solr Developer
Grid Dynamics

<http://www.griddynamics.com>
 <mkhlud...@griddynamics.com>

Reply via email to