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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to