Hi,

I have two date fields in Solr Schema, I want to compare two different date
fields in solr itself .
how can i write the Query in Solr for comparing the two dates in solr itself
.

I want to retrieve all docs or records from solr where  updateDate >=
appliedDate OR appliedDate == null

you can assume relational Query like 
Retrieve all the records from reference data where  updateDate >=
appliedDate OR appliedDate == null


My schema is as follows 
<field name="_root_" type="string" indexed="true" stored="false"/>
<field name="DataId"    type="string" indexed="true" stored="true"
required="true" multiValued="false"/>
<field name="FromFieldName"     type="string" indexed="true" stored="true"
required="true" multiValued="false"/>
<field name="FromFieldType" type="string" indexed="true" stored="true"
required="true" multiValued="false"/> 
<field name="FromFieldValue"    type="string" indexed="true" stored="true"
required="true"  multiValued="false"/> 
<field name="ToFieldName" type="string" indexed="true" stored="true"
required="true"  multiValued="false"/>
<field name="ToFieldType" type="string" indexed="true" stored="true"
required="true"  multiValued="false"/>
<field name="ToFieldValue" type="string" indexed="true" stored="true"
required="true"  multiValued="false"/>
<field name="UpdateDate" type="date"   indexed="true" stored="true"
required="true"  multiValued="false"/>
<field name="AppliedDate" type="date"   indexed="true" stored="true"
required="false" multiValued="false"/>
</fields>



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-Query-to-Solr-for-comparing-two-dates-in-solr-tp4141611.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to