Well, you *still* have to store the stemmed and unstemmed version
in your index, otherwise you can't distinguish between, say,
run and running because you'd have indexed run both times.


But you could think about using "special tokenizing". That is, for
a word that's stemmed, index a "stem form". Something like run$ for
for the stemmed versions of runs, running, runner. ALSO index runs, running
and runner. Yes, there'll be some index bloat, but I don't think there's
any way around that. Note that you'd ALSO index run$ and run for just
plain old run to successfully search on a stemmed query for just run.
Make sure you index the special tokens with 0 increment
gap if you want phrase queries to work correctly.

Then, when you process the query, if it's to be a stemmed search,
put the special token in for every word that changes. If searching
on runners (stemmed), you'd search for run$. Search for
runners in the unstemmed version.

You can't distinguish between the stemmed and unstemmed versions of
a word unless you store both. The information has to be in the index
or you simply can't get it back out.

Best
Erick

On Dec 20, 2007 12:13 PM, Kamran Shadkhast <[EMAIL PROTECTED]> wrote:

>
>
>
> Kamran,
>
> I think Bertrand's suggestion is the only possible solution.  I can't
> think
> of a way you can not stem at index time and make it an option at search
> time.  If you look at and understand low-level/basic indexing and term
> matching process, I think you'll see why this seems impossible.  But maybe
> somebody will come up with a clever suggestion. :)
>
> Otis
>
> Hi Otis,
> Thanks for your response, I think there is a misunderstanding, my question
> is just making stemming as option by passing a value to request handler
> for
> a database already been indexed with stemming.
> if you are familiar with fast search engine they provide this feature.
> I think making this happen should not be a big deal as we do alot of
> filtering and alteration to query during query time, we could do the same
> for stemming in the same way.
>
> Thanks again,
> -Kamran
> --
> View this message in context:
> http://www.nabble.com/Making-stemming-dynamic-at-query-time-tp14405260p14440871.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Reply via email to