lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Open-ended range queries
Date Thu, 10 Jun 2004 16:48:51 GMT
On Jun 10, 2004, at 12:36 PM, Don Gilbert wrote:
> A lucene range search syntax equivalent:
>   field:[100 TO 200] -- lower and upper bounded
>   field:[ TO 200] -- upper bounded only
>   field:[100 TO ] -- lower bounded only

really?  I get hideous parse exceptions trying those last two:

org.apache.lucene.queryParser.ParseException: Encountered "]" at line  
1, column 8.
Was expecting one of:
     <RANGEIN_QUOTED> ...
     <RANGEIN_GOOP> ...

	at  
org.apache.lucene.queryParser.QueryParser.generateParseException(QueryPa 
rser.java:1045)
	at  
org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.j 
ava:925)
	at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:692)
	at  
org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:557)
	at  
org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:500)
	at  
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:108)
	at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:87)
	at  
lia.searching.QueryParserTest.testRangeQuery(QueryParserTest.java:68)

How did you get the open-ended syntax to work?

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message