lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hasan Diwan" <hasan.di...@gmail.com>
Subject Re: How to use regexQuery along with fuzzy logic capabilities
Date Thu, 23 Oct 2008 04:00:44 GMT
I seem to recall running the SimpleQueryParser first. If that throws an Exception, I then ran
it with the RegexQueryParser with a reduced score. Hth
Sent via BlackBerry by AT&T

-----Original Message-----
From: "Agrawal, Aashish \(IT\)" <Aashish.Agrawal@morganstanley.com>

Date: Thu, 23 Oct 2008 12:48:46 
To: <java-user@lucene.apache.org>
Subject: How to use regexQuery along with fuzzy logic capabilities


Hi, 
 
I want to use lucene for a simple search engine. If I use the code like
this, 
QueryParser parser = new QueryParser(field, analyzer);
Query query = parser.parse(line);
searcher.search(query) 
above code doesn't give me regular expression search power, while at the
other hand if I use the below code, 
RegexQuery rexquery = new RegexQuery(new Term(field, line));
searcher.search(rexquery)., 
I don't get the fuzzy logic and other search abilities which I get using
the analyzer.
 
I am not java expert, could you please give me a simple example on this
? 
 
thanks
Aashish Agrawal
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to
waive confidentiality or privilege. Use of this email is prohibited when received in error.

Mime
View raw message