Take a look at the ComplexPhraseQueryParser here:
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-ComplexPhraseQueryParser

Best,
Erick

On Wed, Sep 3, 2014 at 12:41 PM, Mirko Sertic <mirko.ser...@web.de> wrote:
> Hi@all
>
> I am using Lucene 4.9 for a search application.
>
> Now i'd like to create complex queries such as:
>
> "hello world * this is interesting"
>
> This should match every dokument with the phrases "hello world" and "this is
> interesting" with any number of terms between them. I also want to go
> further and create a custom query parser to generate queries like "hello *
> world this is * funny * sometimes" and so on. I want to combine this syntax
> with wildcards, for instance "hello wor* this * is funny", where wor* can be
> expanded to world and so on.
>
> The key question is: do i have to construct this with nested queries which
> can become very complex, or would it be easier to use the Automaton API and
> construct an AutomatonQuery from it? What would be more performant? I have
> only read about the Automaton API, so code examples would be great!
>
> Later, i want to create long tail suggestions for such kind of queries.
> Unfortunately there is not very much documentation available for this. Are
> there code examples available?
>
> Thanks in advance,
> Mirko

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to