First, this is for the Java version, I hope it extends to C#.

But in your configuration, when you're indexing the stemmer
should be storing the reduced form in the index. Then, when
searching, the search should be against the reduced term.
To check this, try
1> Using the Admin/Analysis page to see what gets stored
     in your index and what your query is transformed to to
     insure that you're getting what you expect.

If you want to get in deeper to the details, try
1> use, say, the TermsComponent or Admin/Schema Browser
     or Luke to look in your index and see what's actually
    there.
2> us &debug=query or Admin/Analysis to see what the query
    actually looks like.

Both your use-cases should work fine just with reduction
_unless_ the particular word you look for doesn't happen to
trip the stemmer. By that I mean that since it's algorithmically
based, there may be some edge cases that seem like they
should be reduced that aren't. I don't know whether "fisherman"
would reduce to "fish" for instance.

So are you seeing things that really don't work as expected or
are you just working from the docs? Because I really don't
see why you wouldn't get what you want given your description.

Best
Erick


On Fri, Jun 28, 2013 at 2:33 AM, snkar <soumya....@zoho.com> wrote:

> We have a search system based on Solr using the Solrnet library in C# which
> supports some advanced search features like Fuzzy, Synonym and Stemming.
> While all of these work, *the expectation from the Stemming Search seems to
> be a combination of Stemming by reduction as well as stemming by expansion
> to cover grammatical variations on a word*. A use case will make it more
> clear:
>
>  - a search for fish would also find fishing
>  - a search for applied would also find applying, applies, and apply
>
> We had implemented Stemming using a CopyField with
> SnowballPorterFilterFactory. *As a result, when /searching for burning the
> results are returning for burning and burn/ but when /searching for burn
> the
> results are not returning for burning or burnt or burns/*
>
> Since all stemmers supported Lucene/Solr all use stemming by reduction, we
> are not sure on how to go about this. As per the Solr Wiki:
>
> > A related technology to stemming is lemmatization, which allows for
> > "stemming" by expansion, taking a root word and 'expanding' it to all of
> > its various forms. Lemmatization can be used either at insertion time or
> > at query time. Lucene/Solr does not have built-in support for
> > lemmatization but it can be simulated by using your own dictionaries and
> > the SynonymFilterFactory
>
> We are not sure of exactly how to go about this in Solr. Any ideas.
>
> We were also thinking in terms of using some C# based stemmer/lemmatizer
> library to get the root of the word and using some public database like
> WordNet to extract the different grammatical variations of the stem and
> then
> send across all these terms for querying in Solr. We have not yet done a
> lot
> of research to figure out a stable C# stemmer/lemmatizer and a WordNet C#
> API, but seems like this will get too convoluted and it should have a way
> to
> be executed from within Solr.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Stemming-query-in-Solr-tp4073862.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to