We want boosting of results for ?q=dateField:[NOW-45DAYS TO NOW] and ?q=DateField:[NOW TO NOW+45DAYS]
below mentioned fq tag gives me error <str Name = fq>dateField:[NOW-45DAYS TO NOW]^1.0 DateField:[NOW TO NOW+45DAYS]^1.0</str> Please suggest the syntax of fields defined in fq tag? tHAnks, Prerna Erik Hatcher wrote: > > It doesn't really make sense to use a date field in a dismax qf > parameter. Use an fq parameter instead, to filter results by a date > field. > > Dismax is aimed for end users textual queries, not for field selection > or more refined typed queries like date or numeric ranges. > > Erik > > > On Jan 16, 2009, at 9:23 AM, prerna07 wrote: > >> >> >> We also make query on date ranges, it works when you use NOW function. >> Try using : >> ?q=dateField:[* TO NOW] >> ?q=dateField:[NOW-45DAYS TO NOW] >> ?q=dateField:[NOW TO NOW+45DAYS] >> >> >> Issue: Current issue which i am facing is with dismaxrequesthandler >> for date >> field. >> As soon as I add dateField in dismaxrequest <qf> tag, dismax for other >> string / text attributes stops working. My search query is ? >> q=SearchString, >> the error i get is >> "The request sent by the client was syntactically incorrect (Invalid >> Date >> String:'searchTerm')." >> >> Please suggets how can i use date field in qf of dismaxrequest. >> >> Thanks, >> Prerna >> >> >> Akshay-8 wrote: >>> >>> You will have to URL encode the string correctly and supply date in >>> format >>> Solr expects. Please check this: >>> http://wiki.apache.org/solr/SolrQuerySyntax >>> >>> On Fri, Jan 9, 2009 at 12:21 PM, Rayudu <avsrit2...@yahoo.co.in> >>> wrote: >>> >>>> >>>> Hi All, >>>> I have a field with is solr.DateField in my schema file. If I >>>> want >>>> to >>>> get the docs. for a given date for eg: get all the docs. whose >>>> date value >>>> is >>>> 2009-01-09 then how can I query my index. As solr's date format is >>>> yyyy-mm-ddThh:mm:ss, >>>> >>>> if I give the date as 2009-01-09T00:00:00Z it is >>>> thorwing an >>>> exception "solr.SolrException: HTTP code=400, reason=Invalid Date >>>> String:'2009-01-09T00' " . >>>> if I give the date as 2009-01-09 it is >>>> thorwing >>>> an >>>> exception , solr.SolrException: HTTP code=400, reason=Invalid Date >>>> String:'2009-01-09' >>>> >>>> Thanks, >>>> Rayudu. >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Querying-Solr-Index-for-date-fields-tp21367097p21367097.html >>>> Sent from the Solr - User mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> -- >>> Regards, >>> Akshay Ukey. >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Querying-Solr-Index-for-date-fields-tp21367097p21500362.html >> Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/Querying-Solr-Index-for-date-fields-tp21367097p21557213.html Sent from the Solr - User mailing list archive at Nabble.com.