You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Eric Jain <Er...@isb-sib.ch> on 2002/09/11 10:30:33 UTC
GoogleQueryParser
Has anyone written something like a GoogleQueryParser?
Such a parser would differ in the behavior of the default parser in the
following points:
- Default AND rather than OR.
- Treat a-b as "a-b" rather that a -b.
- Perhaps disallow ~.
I guess I could write my own QueryParser, just wanted to be sure it hasn't
been done already, especially as it seems to be something rather basic. Any
suggestions?
By the way, I was honestly surprised by the compactness of the indices
Lucene generates, as well its performance. I had always thought there was a
trade-off between good design and speed... great work!
--
Eric Jain
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: GoogleQueryParser
Posted by Eric Jain <Er...@isb-sib.ch>.
> queryParser.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
Thanks, that would be exactely what I need. Must be a new method, not yet in
the public release?
--
Eric Jain
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: GoogleQueryParser
Posted by Clemens Marschner <cm...@lanlab.de>.
> - Default AND rather than OR.
As for this part: This can be accomplished with
queryParser = new QueryParser(defaultField, new MyAnalyzer());
queryParser.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
> - Treat a-b as "a-b" rather that a -b.
That would be interesting for me, too.
Clemens
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>