You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by dabboo <ag...@sapient.com> on 2009/03/12 10:30:33 UTC

How to do Date Search in Solr

Hi,

I am implementing date search criteria in Solr using q query parameter with
dismax request.

This is the data, I have.

<doc>
<float name="score">2.4177726E-8</float>
<str name="IndexId_s">product_4100025</str>
<str name="IndexId_str_s">product_4100025</str>
<str name="Index_Type_s">productIndex</str>
<str name="Index_Type_str_s">productIndex</str>
<str name="contentType_product_s">Fiction</str>
<str name="contentType_product_str_s">Fiction</str>
<str name="era_product_s">CE</str>
<str name="era_product_str_s">CE</str>
<str name="isbn10_product_s">0205583527</str>
<str name="isbn10_product_str_s">0205583527</str>
<str name="isbn13_product_s">9781592402939</str>
<str name="isbn13_product_str_s">9781592402939</str>
<str name="prdMainTitle_product_s">Daughter of the Mountains</str>
<str name="prdMainTitle_product_str_s">Daughter of the Mountains</str>
<str name="prdPubDate_product_s">2/1/1993</str>
<str name="prdPubDate_product_str_s">2/1/1993</str>
<str name="productId_product_s">4100025</str>
<str name="productId_product_str_s">4100025</str>
<date name="productPublicationDate_product_dt">1993-02-01T12:00:00Z</date>
<str name="websiteId_product_s">510000159</str>
<str name="websiteId_product_str_s">510000159</str>
</doc>

Now, if I want to search the records only on the date field like
productPublicationDate_product_dt">1993-02-01T12:00:00Z, how I will have to
give my parameter to get the matching value.

Also, how I can form date range queries with dismax request.

Thanks in advance.

Thanks,
Amit Garg
-- 
View this message in context: http://www.nabble.com/How-to-do-Date-Search-in-Solr-tp22471461p22471461.html
Sent from the Solr - User mailing list archive at Nabble.com.