lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morus Walter <morus.wal...@tanto.de>
Subject Re: range and content query
Date Mon, 20 Sep 2004 06:24:17 GMT
Chris Fraschetti writes:
> can someone assist me in building or deny the possibility of combing a
> range query and a standard query?
> 
> say for instance i have two fields i'm searching on... one being the a
> field with an epoch date associated with the entry, and the
> content....  so how can I make a query to select a range of thos
> epochs, as well as search through the content? can it be done in one
> query, or do I have to perform a query upon a query, and if so, what
> might the syntax look like?
> 
if you create the query using the API use a boolean query to combine
the two basic queries.

If you use query parser use AND or OR.

Note that range queries are expanded into boolean queries (OR combined)
which may be a problem if the number of terms matching the range is too
big. Depends on your date entries and especially how precise they are.
Alternatively you might consider using a filter.

HTH
	Morus

---------------------------------------------------------------------
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