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 Paul Hill <pa...@metajure.com> on 2012/04/09 20:28:21 UTC

Query Rewrite - Utilities?

Just thought I throw out a question.
What is available in the libraries to help with manipulating and asking questions about queries?
So far my best (and worst) efforts have involved combinations setting up a parser, generating a query object, then looking through the various clauses and re-working, deleting, or using what is there to
generate an enhanced query.

For example, what I am re-writing often involves the "simple terms" of the query (terms that have no trick modifications like boost etc. or even field names; just the words).   I easily wrote a method/class to find me such terms.
I also know about QueryParser.setAutoGeneratePhrase, but it isn't exactly what I need to do, so I start doing my own manipulation.  It's then I look for other's efforts at utilities to help in this area.

Am I missing some useful methods that I could use in analysis of a built query or a query string or just other methods related to general area of 'enhancing' a user's query?

-Paul