lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: PorterStemFilter causes wildcard searches to not work
Date Tue, 29 Nov 2011 11:03:19 GMT
A google search of "lucene stemming wildcards" finds some hits
implying these don't work well together.

http://lucene.472066.n3.nabble.com/Conflicts-with-Stemming-and-Wildcard-Prefix-Queries-td540479.html
may be a solution.


--
Ian.


On Tue, Nov 29, 2011 at 10:39 AM, SBS <jturnbul@uow.edu.au> wrote:
>> This is very hard to follow.  I for one don't recall what you
>> described or what you are looking for.
>
> Sorry about that, I am using the web interface where the context of my post
> is visible to all.
>
> To sum up, my original post was:
>
>> It seems that when I use a PorterStemFilter in my custom analyser,
>> wildcard searches malfunction.
>>
>> As an example, I have the words "appendicitis" and "sensitisation"
>> in our content.  When I enter a query of "a*itis" I would expect
>> to have "appendicitis" match but instead I get "sensitisation" and
>> not "appendicitis".  If I remove the PorterStemFilter then things
>> behave as I would have expected and desired.
>>
>> Why is this happening?  Is there a way to apply a PorterStemFilter
>> and still be able to use wildcards?
>>
>> I am using Lucene 3.2.
>
> And now I am adding:
>
>> I am applying the PorterStemFilter at both indexing and search time.
>>
>> As for schema, I have 3 fields: title, subtitle and notes.  When the user
>> enters a query string of "a*itis" (without the double quotes of course),
>> my software turns this into an actual
>> Lucene query of "title: a*itis OR subtitle: a*itis OR notes: a*itis" and I
>> get the results I described.  However, if I run an actual query of just
>> "a*itis" I then get the results I am looking for.  I guess in this case
>> it's using the default field that I specify in creating the QueryParser
>> which is "notes" but if I change the actual query to "notes: a*itis" I
>> still get the undesirable results.
>>
>> Any idea why I am seeing this behaviour?  Again, if I remove the
>> PorterStemFilter from my custom analyzer (which I use at both indexing and
>> search time) then I get the results I want (albeit I lose the other
>> functionality which I also need).
>
> I hope that's a bit clearer.  Any ideas to explain and/or resolve this?
>
> Thanks,
>
> -sbs
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/PorterStemFilter-causes-wildcard-searches-to-not-work-tp3525790p3544760.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

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


Mime
View raw message