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 dm_tim <dm...@yahoo.com> on 2012/11/14 01:45:04 UTC

Solr 4.0 Dismax woes (2 specifically)

Heck,

I originally started using the default query parser but gave up on it
because all of my search results are equally important and idf was messing
up my results pretty badly. So I discovered the DisMax query parser which
doesn't use idf. I was elated until I started testing. My initial results
looked good but when I cut down the query string from "clothes" to "clot" I
got zero results. 

I've been reading about how disMax is supposed to do fuzzy searches but I
can't make it work at all. 

To complicate matters I discovered that my all of my search words are being
used against all of the query fields. I had previously assumed that each
search word would only be applied to individual query fields. 

So for example my q is:
clothe 95

And my qf:
tag cid

So I believe that the words "clothe" and "95" are being searched on both
fields ("tag" and "cid") which is not what I wanted to do. I was hoping to
have "cloth" applied only to the "tag" field and "95" applied only to the
"cid" field.

I really don't have it in me to write my own query parser so I'm hoping to
find a way to do a fuzzy search without scores being screwed by idf. Is
there a way to achieve my desired results with existing code?

Regards,

(A tired) Tim



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-Dismax-woes-2-specifically-tp4020197.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr 4.0 Dismax woes (2 specifically)

Posted by Erick Erickson <er...@gmail.com>.
OK, I'm going to reach a bit here.

First, you're right, (e)dismax distributes the terms across all the fields,
there's no good way around that. But for your specific example,  why don't
fielded queries work with the default query parser? e.g. q=tag:clothe
cid:95? You can use the fuzzy syntax here wherever you choose.

Second about idf. This is where I'm reaching, meaning I haven't tried it
personally. But could you do something with FunctionQueries here? You have
access to all the term info (new to 4.0), so it seems like there's some
possibility here...

At worst you could write s custom similarity class which should be
significantly simpler than a custom query parser...

FWIW,
Erick


On Tue, Nov 13, 2012 at 7:45 PM, dm_tim <dm...@yahoo.com> wrote:

> Heck,
>
> I originally started using the default query parser but gave up on it
> because all of my search results are equally important and idf was messing
> up my results pretty badly. So I discovered the DisMax query parser which
> doesn't use idf. I was elated until I started testing. My initial results
> looked good but when I cut down the query string from "clothes" to "clot" I
> got zero results.
>
> I've been reading about how disMax is supposed to do fuzzy searches but I
> can't make it work at all.
>
> To complicate matters I discovered that my all of my search words are being
> used against all of the query fields. I had previously assumed that each
> search word would only be applied to individual query fields.
>
> So for example my q is:
> clothe 95
>
> And my qf:
> tag cid
>
> So I believe that the words "clothe" and "95" are being searched on both
> fields ("tag" and "cid") which is not what I wanted to do. I was hoping to
> have "cloth" applied only to the "tag" field and "95" applied only to the
> "cid" field.
>
> I really don't have it in me to write my own query parser so I'm hoping to
> find a way to do a fuzzy search without scores being screwed by idf. Is
> there a way to achieve my desired results with existing code?
>
> Regards,
>
> (A tired) Tim
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-4-0-Dismax-woes-2-specifically-tp4020197.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>