Hi
Lucene -Developer My main intention was
Search for an word hit in a Unique Field between ranges say
book100 - book 200 indexed numbers
It's something like creating a SUBSEARCH with in the SEARCHINDEX.
This is similar to a SQL =
select * from BOOKSHELF.
or
select * from BOOKSHELF where book1 between 100 and 200.
with regards
Karthik
-----Original Message-----
From: Ype Kingma [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 27, 2004 12:46 PM
To: [EMAIL PROTECTED]
Subject: Re: Range Query Sombody HELP please
On Thursday 27 May 2004 07:00, Karthik N S wrote:
> Hi
> Lucene developers
>
> Is it possible to do Search and retrieve relevant information on the
> Indexed Document
> within in specific range settings which may be similar to an
>
> Query in SQL = select * from BOOKSHELF where book1 between 100 and
> 200
>
> ex:-
>
> "search_word" , Book between 100 AND 200
>
> [ Note:- where Book uniquefield hit info which is already Indexed ]
The query parser can construct this query for you (assuming search_word
is in the query default field):
+search_word +(book:[100 TO 200])
See also: http://jakarta.apache.org/lucene/docs/queryparsersyntax.html
One problem you might run into is that Lucene does not support numbers
directly, only strings are indexed. You can index these numbers with
sufficient
zero's prefixed and add these prefix zero's in the query.
Erik Hatcher wrote an article on how to do make the query:
http://today.java.net/pub/a/today/2003/11/07/QueryParserRules.html
You'll need to override the getRangeQuery() method.
Have fun,
Ype
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]