You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by khalid y <ke...@gmail.com> on 2009/12/07 16:02:06 UTC

Solr Search in stemmed and non stemmed mode

Hi !!

I'm looking for a way to have two index in solr one stemmed and another non
stemmed. Why ? It's simple :-)

My users can do query for  :
-  banking marketing =>  it return all document matches bank*** and
market***
- "banking" marketing => it return all document matches "banking" and
market***

The second request need that I can switch between stemmed and not stemmed
when the user write the keyword with quotes.

The  optimal solution is : solr can mix gracefully results from stemmed and
non stemmed index, with a good score calculation ect...

The near optimal solution is : if solr see " " it switch in non stemmed mod
for all key words in query

I have an idea but I prefer to listen the comunity voice before to propose
it. I'll expose it in my next post.

If someone has an graceful idea to do this craps :-)

Thanks

Re: Solr Search in stemmed and non stemmed mode

Posted by Lance Norskog <go...@gmail.com>.
Short answer: the standard query handler is right for carefully
designing queries. The dismax query handler is right for putting a
'search box' in a web page for regular users.

On 12/7/09, khalid y <ke...@gmail.com> wrote:
> Thanks,
>
> I'll read the mail archive.
>
> Your suggestion is like mine but whitout the DisMax handler. I'm going to
> read what is this handler.
> I have one field text and another text_unstemmed where I copy all others
> fields. I'm writing my custom query handler who check if quotes exists and
> switch between the good field.
>
> Going to read...
>
> Thanks
>
>
> 2009/12/7 Erick Erickson <er...@gmail.com>
>
>> Try searching the mail archive for
>> stemmer exact match
>> or similar, this has been discussed multiple times and you'll get more
>> complete discussions waaaay faster....
>>
>> One suggestion is to use two fields, one for the stemmed version
>> and one for the original, then use whichever field you need to via
>> DixMax handler (more detail in the mail archive).
>>
>> Best
>> Erick
>>
>> On Mon, Dec 7, 2009 at 10:02 AM, khalid y <ke...@gmail.com> wrote:
>>
>> > Hi !!
>> >
>> > I'm looking for a way to have two index in solr one stemmed and another
>> non
>> > stemmed. Why ? It's simple :-)
>> >
>> > My users can do query for  :
>> > -  banking marketing =>  it return all document matches bank*** and
>> > market***
>> > - "banking" marketing => it return all document matches "banking" and
>> > market***
>> >
>> > The second request need that I can switch between stemmed and not
>> > stemmed
>> > when the user write the keyword with quotes.
>> >
>> > The  optimal solution is : solr can mix gracefully results from stemmed
>> and
>> > non stemmed index, with a good score calculation ect...
>> >
>> > The near optimal solution is : if solr see " " it switch in non stemmed
>> mod
>> > for all key words in query
>> >
>> > I have an idea but I prefer to listen the comunity voice before to
>> propose
>> > it. I'll expose it in my next post.
>> >
>> > If someone has an graceful idea to do this craps :-)
>> >
>> > Thanks
>> >
>>
>


-- 
Lance Norskog
goksron@gmail.com

Re: Solr Search in stemmed and non stemmed mode

Posted by khalid y <ke...@gmail.com>.
Thanks,

I'll read the mail archive.

Your suggestion is like mine but whitout the DisMax handler. I'm going to
read what is this handler.
I have one field text and another text_unstemmed where I copy all others
fields. I'm writing my custom query handler who check if quotes exists and
switch between the good field.

Going to read...

Thanks


2009/12/7 Erick Erickson <er...@gmail.com>

> Try searching the mail archive for
> stemmer exact match
> or similar, this has been discussed multiple times and you'll get more
> complete discussions waaaay faster....
>
> One suggestion is to use two fields, one for the stemmed version
> and one for the original, then use whichever field you need to via
> DixMax handler (more detail in the mail archive).
>
> Best
> Erick
>
> On Mon, Dec 7, 2009 at 10:02 AM, khalid y <ke...@gmail.com> wrote:
>
> > Hi !!
> >
> > I'm looking for a way to have two index in solr one stemmed and another
> non
> > stemmed. Why ? It's simple :-)
> >
> > My users can do query for  :
> > -  banking marketing =>  it return all document matches bank*** and
> > market***
> > - "banking" marketing => it return all document matches "banking" and
> > market***
> >
> > The second request need that I can switch between stemmed and not stemmed
> > when the user write the keyword with quotes.
> >
> > The  optimal solution is : solr can mix gracefully results from stemmed
> and
> > non stemmed index, with a good score calculation ect...
> >
> > The near optimal solution is : if solr see " " it switch in non stemmed
> mod
> > for all key words in query
> >
> > I have an idea but I prefer to listen the comunity voice before to
> propose
> > it. I'll expose it in my next post.
> >
> > If someone has an graceful idea to do this craps :-)
> >
> > Thanks
> >
>

Re: Solr Search in stemmed and non stemmed mode

Posted by Erick Erickson <er...@gmail.com>.
Try searching the mail archive for
stemmer exact match
or similar, this has been discussed multiple times and you'll get more
complete discussions waaaay faster....

One suggestion is to use two fields, one for the stemmed version
and one for the original, then use whichever field you need to via
DixMax handler (more detail in the mail archive).

Best
Erick

On Mon, Dec 7, 2009 at 10:02 AM, khalid y <ke...@gmail.com> wrote:

> Hi !!
>
> I'm looking for a way to have two index in solr one stemmed and another non
> stemmed. Why ? It's simple :-)
>
> My users can do query for  :
> -  banking marketing =>  it return all document matches bank*** and
> market***
> - "banking" marketing => it return all document matches "banking" and
> market***
>
> The second request need that I can switch between stemmed and not stemmed
> when the user write the keyword with quotes.
>
> The  optimal solution is : solr can mix gracefully results from stemmed and
> non stemmed index, with a good score calculation ect...
>
> The near optimal solution is : if solr see " " it switch in non stemmed mod
> for all key words in query
>
> I have an idea but I prefer to listen the comunity voice before to propose
> it. I'll expose it in my next post.
>
> If someone has an graceful idea to do this craps :-)
>
> Thanks
>