william.sporrong writes:

> Does it have something to do with the
> QueryParser guessing what kind of query it is by examining the string and
> thus presumes that the first string should not be parsed into a PhraseQuery?
>
QueryParser creates a PhraseQuery for "words" that are tokenized to more
than one token.
You should see that in the serialized query.
>  
> 
> Anyways if there is a correct way to accomplish what I want could anyone
> please give me a hint? One way I thought about is preparsining the query and
> construct several subqueries i.e PhraseQuerys and so on and then combine
> them in a BooleanQuery but I guess there is a nicer solution?
> 
I guess you could overwrite the getFieldQuery method of query parser
and change the way queries are generated.
>  
> 
> I have a similar problem with another Filter Iäm trying to implement that
> should remove certain suffixes and replace them with a wildcard (
> bilar->bil*).
> 
If you expect bil* to be executed as a wildcard/prefix query, this
cannot work. The query parser parses the query, not the analyzer output.
Again you might introduce such behaviour in getFieldQuery.

Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to