Hold on. It's possible to find leases, at the particular date and collapse
them to appartments. But it looks impossible to negate those busy
apartments. Or I don't know how.

Let's try with http://wiki.apache.org/solr/Join
If you have lease documents with "FK" field LEASE_APT_FK *and* appartment
documents with "PK" APT_PK.
you can search leases for the given date (overlappingleases= below), then
join leases to apartments (&busyapts=) and negate those apartments (}&fq=).

overlappingleases=(from:[$need_from TO $need_to] ) OR (to:[$need_from TO
$need_to]) OR ((from:[* TO $need_from]) AND (to:[$need_from TO
*]))&busyapts={!join from=LEASE_APT_FK to=APT_PK
v=$overlappingleases}&fq=NOT _query_:{!v=$busyapts}&q=*:*

FWIW i use some magic from http://wiki.apache.org/solr/LocalParams and
http://wiki.apache.org/solr/SolrQuerySyntax


On Tue, Feb 28, 2012 at 11:11 PM, Mikhail Khludnev <
mkhlud...@griddynamics.com> wrote:

>
>
> On Tue, Feb 28, 2012 at 6:44 PM, federico.wachs <federico.wa...@2clams.com
> > wrote:
>
>> Hi Mikhail, thanks for your concern and reply.
>>
>> I've read a few dozen times your reply and I think I get what you mean,
>> but
>> I'm not exactly sure how to go forward with your approach. You are saying
>> that I should be able to have nested documents, but I haven't been able to
>> submit a Document with another Document on it so far.
>>
>> I'm using SolrJ to integrate with my Solr servers, do you think you could
>> guide me a bit on how you would accomplish to nest two different kinds of
>> documents?
>>
>
> Ok start from Lease documents with ApartmentID and than query leases and
> specify &group.field=ApartmentID&group=true
>
> Disclaimer: I've never done grouping and I am not really familiar with
> SolrJ,
>
>
>>
>> Thank you for your time and explanation I really appreciate it!
>>
>> Regards,
>> Federicp
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Is-there-a-way-to-implement-a-IntRangeField-in-Solr-tp3782083p3784220.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>
>
>


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

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

Reply via email to