FAQ
Hi all,

I am building a searchinterface where the user looks for product
descriptions that fit his or her specs. One potential specs is for
instance length. The product description holds two fields:

length_from = 1

and

length_to = 10

If the query value is 5 the search should be succesful. Here is what is
strange.

I have implemented the query by using two rangeQueries based on a Term.

Term termFrom = new Term ("length_from", "5");
Term termTo = new Term("length_to, "5");

RangeQuery smallerThan = new RangeQuery(null, termTo, true);
RangeQuery largerThan = new RangeQuery(termFrom, null, true);

These two queries are then combined into a BooleanQuery and presto. However:

The smallerThan query seems fine when written out as String: length_to:
[ TO 5]
The largerThan query however
outputs: length_from: [ 5 TO null]

What I wonder is: should that null be there? And if it should not (which
i suspect?) is this a problem for the toString method or is it a problem
for proper query execution?

Thanks for any input.

Aad

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupjava-user @
categorieslucene
postedFeb 18, '05 at 12:38p
activeFeb 18, '05 at 12:38p
posts1
users1
websitelucene.apache.org

1 user in discussion

Aad Nales: 1 post

People

Translate

site design / logo © 2022 Grokbase