You'll have to supply your dates in a format Solr expects (e.g.
2010-10-19T08:29:43Z
and not 2010-10-19). If you don't need millisecond granularity you can use
the DateMath syntax to specify that.

Please, also check http://wiki.apache.org/solr/SolrQuerySyntax.

On 17 October 2010 10:54, nedaha <neda...@gmail.com> wrote:

>
> Hi there,
>
> At first i have to explain the situation.
> I have 2 fields indexed named tdm_avail1 and tdm_avail2 that are arrays of
> some different dates.
>
> "This is a sample doc"
>
>
> <arr name="tdm_avail1">
> <date>2010-10-21T08:29:43Z</date>
> <date>2010-10-22T08:29:43Z</date>
> <date>2010-10-25T08:29:43Z</date>
> <date>2010-10-26T08:29:43Z</date>
> <date>2010-10-27T08:29:43Z</date>
> </arr>
>
> <arr name="tdm_avail2">
> <date>2010-10-19T08:29:43Z</date>
> <date>2010-10-20T08:29:43Z</date>
> <date>2010-10-21T08:29:43Z</date>
> <date>2010-10-22T08:29:43Z</date>
> </arr>
>
> And in my search form i have 2 field named check-in date and check-out
> date.
> I want solr to compare the range that user enter in the search form with
> the
> values of tdm_avail1 and tdm_avail2 and return doc if all dates between
> check-in and check-out dates matches with tdm_avail1 or tdm_avail2 values.
>
> for example if user enter:
> check-in date: 2010-10-19
> check-out date: 2010-10-21
> that is match with tdm_avail2 then doc must be returned.
>
> but if user enter:
> check-in date: 2010-10-25
> check-out date: 2010-10-29
> doc could not be returned.
>
> so i want the query that gives me the mentioned result. could you help me
> please?
>
> thanks in advance
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/query-between-two-date-tp1718566p1718566.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to