1) "!=" is really not a range operation at all.
2) if you look at the javadocs for RangeQuery you will see...

  Constructs a query selecting all terms greater than lowerTerm but less
  than upperTerm. There must be at least one term and either term may be
  null, in which case there is no bound on that side, but if there are two
  terms, both terms must be for the same field.

...which explains how you can get a <, <=, >, and >= queries.

3) don't use RangeQuery ... use ConstantScoreRange ... the mailing list
archives have lots of discussion on why it's better and what the limited
use cases are where using a RangeQuery may make sense.



: Date: Thu, 18 Jan 2007 18:13:41 +0800
: From: David <[EMAIL PROTECTED]>
: Reply-To: java-user@lucene.apache.org
: To: java-user@lucene.apache.org
: Subject: how to make RangeQuery action as > < != operators?
:
: Hi all:
:     I need to make range query actions as > < and != operators, The
: RangeQuery class just support RangeQuery(begin, end, inclusive), but How to
: support > < and != ?
:
: Appreciate your help!
:
: --
: David
:



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to