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 Tanner Postert <ta...@gmail.com> on 2011/02/11 21:43:45 UTC

help with dismax query

I'm having a problem using the dismax query for the term "obsessed with
winning"

http://localhost:8983/solr/core1/select?q=obsessed+with+winning&fq=code:xyz&shards=localhost:8983/solr/core1,localhost:8983/solr/core2,&rows=10&start=0&defType=dismax&qf=title
^10+description^4+text^1&debugQuery=true

that query yields zero results, but removing the dismax stuff it works
fine:

http://localhost:8983/solr/core1/select?q=obsessed+with+winning&fq=code:xyz&shards=localhost:8983/solr/core1,localhost:8983/solr/core2,&rows=10&start=0&debugQuery=true

or even adding the mm=2 yields results, but mm=3 does not.

There is at least 1 record which contains the exact phrase 'obsessed with
winning' in the title as well as the description multiple times, yet when
the defType=dismax option is added, the query yields no results.  Am I
missing something?

Thanks in advance.

Re: help with dismax query

Posted by Erik Hatcher <er...@gmail.com>.
Might "with" be a stop word removed by one of those qf fields?  That'd explain why mm=3 doesn't work, I think.

	Erik

On Feb 11, 2011, at 15:43 , Tanner Postert wrote:

> I'm having a problem using the dismax query for the term "obsessed with
> winning"
> 
> http://localhost:8983/solr/core1/select?q=obsessed+with+winning&fq=code:xyz&shards=localhost:8983/solr/core1,localhost:8983/solr/core2,&rows=10&start=0&defType=dismax&qf=title
> ^10+description^4+text^1&debugQuery=true
> 
> that query yields zero results, but removing the dismax stuff it works
> fine:
> 
> http://localhost:8983/solr/core1/select?q=obsessed+with+winning&fq=code:xyz&shards=localhost:8983/solr/core1,localhost:8983/solr/core2,&rows=10&start=0&debugQuery=true
> 
> or even adding the mm=2 yields results, but mm=3 does not.
> 
> There is at least 1 record which contains the exact phrase 'obsessed with
> winning' in the title as well as the description multiple times, yet when
> the defType=dismax option is added, the query yields no results.  Am I
> missing something?
> 
> Thanks in advance.


Re: help with dismax query

Posted by Tanner Postert <ta...@gmail.com>.
I think I found the answer here:
http://www.mail-archive.com/solr-user@lucene.apache.org/msg04433.html

<http://www.mail-archive.com/solr-user@lucene.apache.org/msg04433.html>I
think the title and description fields did not have the stopword filter
applied to it, so it was causing an error. When I took off the qf=title &
qf=description fields the results works. I am rebuilding my indexes now.

On Fri, Feb 11, 2011 at 3:20 PM, Tanner Postert <ta...@gmail.com>wrote:

> looks like that might be the case, if I just do a search for "with"
> including the dismax parameters, it returns no results, as opposed to a
> search for 'obsessed' does return results. Is there any way I can get around
> this behavior? or do I have something configured wrong?
>
>> Might "with" be a stop word removed by one of those qf fields?  That'd explain
>> why mm=3 doesn't work, I think.
>>
>>         Erik
>>
>>

Re: help with dismax query

Posted by Tanner Postert <ta...@gmail.com>.
looks like that might be the case, if I just do a search for "with"
including the dismax parameters, it returns no results, as opposed to a
search for 'obsessed' does return results. Is there any way I can get around
this behavior? or do I have something configured wrong?

>
> Might "with" be a stop word removed by one of those qf fields?  That'd explain
> why mm=3 doesn't work, I think.
>
>         Erik
>
>

help with dismax query

Posted by Tanner Postert <ta...@gmail.com>.
I'm having a problem using the dismax query. For example: for the term
"obsessed with winning" I use:

http://localhost:8983/solr/core1/select?q=obsessed+with+winning&fq=code:xyz&shards=localhost:8983/solr/core1,localhost:8983/solr/core2,&rows=10&start=0&defType=dismax&qf=title
^10+description^4+text^1&debugQuery=true

that query yields zero results, but removing the dismax stuff it works
fine:

http://localhost:8983/solr/core1/select?q=obsessed+with+winning&fq=code:xyz&shards=localhost:8983/solr/core1,localhost:8983/solr/core2,&rows=10&start=0&debugQuery=true

or even adding the mm=2 yields results, but mm=3 does not.

Looking at the discussion here:
http://www.mail-archive.com/solr-user@lucene.apache.org/msg29682.html I see
that possibly sending the qf fields as separate values, rather than one may
yield better results but searching for:

http://localhost:8983/solr/core1/select?q=obsessed+with+winning&fq=code:xyz&shards=localhost:8983/solr/core1,localhost:8983/solr/core2,&rows=10&start=0&defType=dismax&qf=title
^10&qf=description^4&qf=text^1&debugQuery=true

yields no results either

There is at least 1 record which contains the exact phrase 'obsessed with
winning' in the title as well as the description and text (text is just a
copied field of title and description and couple of other fields). multiple
times, yet when the defType=dismax option is added, the query yields no
results.  Am I missing something?

Thanks in advance.