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 Joel Shellman <jo...@ikestrel.com> on 2004/07/15 15:36:39 UTC
Wildcard search with my own analyzer
I wanted to support categories, and so I created my own analyzer so that:
Root Category||My Category||Some Other Things
Would be split up into three terms split by ||, and I wanted it to stay
case sensitive.
If I do a search for:
categories:"Root Category"
it works fine. But if I do a search for:
categories:"Root Cate*"
it doesn't find it.
What do I need to do so that wildcard searching will work on this? I am
using the same analyzer for indexing and searching (otherwise the first
search wouldn't work either).
Thank you,
Joel Shellman
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Wildcard search with my own analyzer
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 15, 2004, at 10:02 AM, Morus Walter wrote:
> Joel Shellman writes:
>>
>> What do I need to do so that wildcard searching will work on this? I
>> am
>> using the same analyzer for indexing and searching (otherwise the
>> first
>> search wouldn't work either).
>>
> Check what query is produced (query.toString(...)).
> I guess that query parser which seems to be what you are using does not
> support wildcards within `"'.
Right... when you use double-quotes, a PhraseQuery is implied, and it
has no support for wildcards (currently).
Check the AnalysisParalysis page on the wiki for some insight into how
to go about trouble-shooting things like this. First is to eliminate
QueryParser and see if you can make a query through the API that
matches what you're after.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Wildcard search with my own analyzer
Posted by Morus Walter <mo...@tanto.de>.
Joel Shellman writes:
>
> What do I need to do so that wildcard searching will work on this? I am
> using the same analyzer for indexing and searching (otherwise the first
> search wouldn't work either).
>
Check what query is produced (query.toString(...)).
I guess that query parser which seems to be what you are using does not
support wildcards within `"'.
Morus
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org