lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jason rutherglen <jasonhus...@yahoo.com>
Subject Re: Adding range filter to Solr
Date Fri, 28 Apr 2006 20:09:06 GMT
This is a little bit confusing for me, the documentation at http://lucene.apache.org/java/docs/queryparsersyntax.html
states they query format you described is a Range Query however this document in the wiki
indicates there is a difference between filters and range queries http://wiki.apache.org/jakarta-lucene/DateRangeQueries
 Also for +(datemodified:[20051228 TO 20060428]) I am receiving:

org.apache.solr.core.SolrException: Invalid Date String:'20051228'
	at org.apache.solr.schema.DateField.toInternal(DateField.java:72)
	at org.apache.solr.search.SolrQueryParser.getRangeQuery(SolrQueryParser.java:55)
	at org.apache.lucene.queryParser.QueryParser.getRangeQuery(QueryParser.java:500)
	at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1016)
	at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:848)
	at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:791)
	at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:852)
	at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:819)
	at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:140)
	at org.apache.solr.search.QueryParsing.parseQuery(QueryParsing.java:47)
	at org.apache.solr.search.QueryParsing.parseQuery(QueryParsing.java:42)
	at org.apache.solr.request.StandardRequestHandler.handleRequest(StandardRequestHandler.java:89)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:600)

----- Original Message ----
From: Yonik Seeley <yseeley@gmail.com>
To: solr-dev@lucene.apache.org; jason rutherglen <jasonhusong@yahoo.com>
Sent: Thursday, April 27, 2006 7:50:04 PM
Subject: Re: Adding range filter to Solr

On 4/27/06, jason rutherglen <jasonhusong@yahoo.com> wrote:
> Are you saying that ConstantScoreRangeQuery is interpreted by the IndexSearcher to be
the same as a filter?

A filter is a constraint that can also be represented as a part of a query.

field1:term1 field2:term2 filtered by field3:[a TO b] can be transformed to
+(field1:term1 field2:term2) +field3:[a TO b]^0


-Yonik




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message