do your docs have daily availability ?
if so you could index each doc for each day (rather than have some
logic embedded in your data)

so instead of doc1 (1/9/2011 - 5/9/2011)
you have
doc1 1/9/2011
doc1 2/9/2011
doc1 3/9/2011
doc1 4/9/2011
doc1 5/9/2011

this makes search much easier and flexible. If needed you can collapse
on doc id if you need to present to the user at doc level.
or group of date even.

The problem you have is because you have logic and data in a field,
get rid of the logic and just store the data.

Cheers Lee c


On 27 October 2011 12:36, Per Newgro <per.new...@gmx.ch> wrote:
> what you is looking for is imho not releated to solr in special.
> The topic should be solr as "temporal database".
> In your case if you have a timeline from 0 to 10 and you have two
> documents from 1 to 6 and 5 to 13 you can get all documents within 0 - 10
> by quering document.end >= 0 and document.start <= 10.
> The greater or less equal depends on your definition of outside and inside
> the interval. But beware the exchanged fields end and start.
>
> Hth
> Per
>
> Am 27.10.2011 12:06, schrieb Anatoli Matuskova:
>>
>> hello,
>> I want to filter search by calendar availability. For each document I know
>> the days which it is not available.
>> How could I build my fields filter the documents that are available in a
>> range of dates?
>> For example, a document A is available from 1-9-2011 to 5-9-2011 and is
>> available from 17-9-2011 to 22-9-2011 too (it's no available in the gap in
>> between)
>> If the filter query asks for avaliables from 2-9-2011 to 4-9-2011 docA
>> would
>> be a match.
>> If the filter query for avaliables from 2-9-2011 to 20-9-2011 docA
>> wouldn't
>> be a match as even the start and end are avaliables there's a gap of no
>> avaliability between them.
>> is this possible with Solr?
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Search-calendar-avaliability-tp3457203p3457203.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
>

Reply via email to