On Dec 19, 2005, at 11:30 AM, javier muguruza wrote:
I have moved from my approach: Query query = QueryParser.parse("big lucene expression", "afield", LuceneHelper.getAnalyzer()); to building the query based on BooleanQuery, PhareQuery, TermQuery etc...But before the analyzer was doing a bunch of work in my incoming words, and I dont see an easy way to do the same sort of stuff to the incoming words used in PhareQuery, TermQuery etc. Isnt there such a way I miss to see? Any example somewhere (LIA etc)
Look at the AnalyzerDemo code. There isn't anything built in, as doing it only involves a few lines of code. Run a String (via StringReader) through an Analyzer, pluck out the tokens from the resultant TokenStream, create the queries you want from those tokens. I use this technique frequently to bypass the idiosyncrasies of QueryParser or in places where using the QP syntax is undesirable but analysis still needs to occur.
Erik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]