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 Ryan McKinley <ry...@gmail.com> on 2011/01/01 00:42:08 UTC

Re: Different behavior for q=goo.com vs q=@goo.com in queries?

also try &debugQuery=true and see why each result matched



On Thu, Dec 30, 2010 at 4:10 PM, mrw <mi...@gmail.com> wrote:
>
>
> Basically, just what you've suggested.  I did the field/query analysis piece
> with verbose output.  Not entirely sure how to interpret the results, of
> course.  Currently reading anything I can find on that.
>
>
> Thanks
>
>
> Erick Erickson wrote:
>>
>> What steps have you taken to figure out whether the
>> contents of your index are what you think? I suspect
>> that the fields you're indexing aren't being
>> analyzed/tokenized quite the way you expect either at
>> query time or index time (or maybe both!).
>>
>> Take a look at the admin/analysis page for the field you're indexing
>> the data into. If that doesn't shed any light on the problem,
>> please paste in the <fieldType> definition for the field in question,
>> maybe another set of eyes can see the issue.
>>
>> Best
>> Erick
>>
>>
>>
>>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Different-behavior-for-q-goo-com-vs-q-goo-com-in-queries-tp2168935p2169478.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Basic Dismax syntax question

Posted by mrw <mi...@gmail.com>.
They're all set to LC.  I was just coming up with a safe example to post.  

It sounds like you don't see an issue with the syntax we're using?

Thanks


tjpoe wrote:
> 
> i noticed that your search terms are using caps vs lower case, are your
> search fields perhaps not set to lowercase the terms and/or the search
> term?
> 
> On Mon, Feb 28, 2011 at 10:41 AM, mrw <mi...@gmail.com> wrote:
> 
>> Say I have an index with first_name and last_name fields, and also a copy
>> field for the full name called full_name.  Say I add two employees:
>> Napoleon Bonaparte and Napoleon Dynamite.
>>
>> If I search for just the first or last name, or both names, with mm=1, I
>> get
>> the expected results:
>>
>> q=Napoleon&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1      //
>> 2
>> results
>> q=Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1     //
>> 2
>> results
>>
>> q=Napoleon%20Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1
>> // 2 results
>>
>>
>> However, if I try to search for both names with mm=2 (which I think means
>> term1 AND term2), I get 0 results:
>>
>>
>> q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=2
>>    // 0 results
>> q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=full_name&mm=2     // 0
>> results
>>
>> I also see this when I put all fields (including the copy field) into the
>> qf
>> parameter.
>>
>>
>> Thoughts?
>>
>>
>> Thanks!
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Different-behavior-for-q-goo-com-vs-q-goo-com-in-queries-tp2168935p2596768.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Different-behavior-for-q-goo-com-vs-q-goo-com-in-queries-tp2168935p2597447.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Basic Dismax syntax question

Posted by Tanner Postert <ta...@gmail.com>.
i noticed that your search terms are using caps vs lower case, are your
search fields perhaps not set to lowercase the terms and/or the search
term?

On Mon, Feb 28, 2011 at 10:41 AM, mrw <mi...@gmail.com> wrote:

> Say I have an index with first_name and last_name fields, and also a copy
> field for the full name called full_name.  Say I add two employees:
> Napoleon Bonaparte and Napoleon Dynamite.
>
> If I search for just the first or last name, or both names, with mm=1, I
> get
> the expected results:
>
> q=Napoleon&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1      // 2
> results
> q=Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1     // 2
> results
>
> q=Napoleon%20Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1
> // 2 results
>
>
> However, if I try to search for both names with mm=2 (which I think means
> term1 AND term2), I get 0 results:
>
>
> q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=2
>    // 0 results
> q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=full_name&mm=2     // 0
> results
>
> I also see this when I put all fields (including the copy field) into the
> qf
> parameter.
>
>
> Thoughts?
>
>
> Thanks!
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Different-behavior-for-q-goo-com-vs-q-goo-com-in-queries-tp2168935p2596768.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: Basic Dismax syntax question

Posted by mrw <mi...@gmail.com>.
Fields are str type.

The issue happens regardless of case.  I just threw in some examples using
names to highlight the issue.  In the actual index, the data is the affected
fields is all LC, and I'm searching in LC.  

Sounds like the syntax looks okay to you? 


Thanks


iorixxx wrote:
> 
> 
> --- On Mon, 2/28/11, mrw <mi...@gmail.com> wrote:
> 
>> From: mrw <mi...@gmail.com>
>> Subject: Basic Dismax syntax question
>> To: solr-user@lucene.apache.org
>> Date: Monday, February 28, 2011, 7:41 PM
>> Say I have an index with first_name
>> and last_name fields, and also a copy
>> field for the full name called full_name.  Say I add
>> two employees:
>> Napoleon Bonaparte and Napoleon Dynamite.
>> 
>> If I search for just the first or last name, or both names,
>> with mm=1, I get
>> the expected results:
>> 
>> q=Napoleon&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1 
>>     // 2
>> results
>> q=Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1 
>>    // 2
>> results
>> q=Napoleon%20Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1
>> // 2 results
>> 
>> 
>> However, if I try to search for both names with mm=2 (which
>> I think means
>> term1 AND term2), I get 0 results:
>> 
>> q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=2
>>     // 0 results
>> q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=full_name&mm=2 
>>    // 0
>> results
>> 
>> I also see this when I put all fields (including the copy
>> field) into the qf
>> parameter.
> 
> &debugQuery=on will dump useful information. What is the field types of
> first_name, last_name and full_name? 
> 
> What happens when you query first letter uppercased?
> 
> q=Napoleon%20Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=2
> 
> 
> 
>      
> 
> 


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Different-behavior-for-q-goo-com-vs-q-goo-com-in-queries-tp2168935p2597510.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Basic Dismax syntax question

Posted by Ahmet Arslan <io...@yahoo.com>.
--- On Mon, 2/28/11, mrw <mi...@gmail.com> wrote:

> From: mrw <mi...@gmail.com>
> Subject: Basic Dismax syntax question
> To: solr-user@lucene.apache.org
> Date: Monday, February 28, 2011, 7:41 PM
> Say I have an index with first_name
> and last_name fields, and also a copy
> field for the full name called full_name.  Say I add
> two employees:
> Napoleon Bonaparte and Napoleon Dynamite.
> 
> If I search for just the first or last name, or both names,
> with mm=1, I get
> the expected results:
> 
> q=Napoleon&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1 
>     // 2
> results
> q=Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1 
>    // 2
> results
> q=Napoleon%20Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1
> // 2 results
> 
> 
> However, if I try to search for both names with mm=2 (which
> I think means
> term1 AND term2), I get 0 results:
> 
> q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=2
>     // 0 results
> q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=full_name&mm=2 
>    // 0
> results
> 
> I also see this when I put all fields (including the copy
> field) into the qf
> parameter.

&debugQuery=on will dump useful information. What is the field types of first_name, last_name and full_name? 

What happens when you query first letter uppercased?

q=Napoleon%20Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=2



      

Basic Dismax syntax question

Posted by mrw <mi...@gmail.com>.
Say I have an index with first_name and last_name fields, and also a copy
field for the full name called full_name.  Say I add two employees:
Napoleon Bonaparte and Napoleon Dynamite.

If I search for just the first or last name, or both names, with mm=1, I get
the expected results:

q=Napoleon&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1      // 2
results
q=Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1     // 2
results
q=Napoleon%20Bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=1
// 2 results


However, if I try to search for both names with mm=2 (which I think means
term1 AND term2), I get 0 results:

q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=first_name%20last_name&mm=2
    // 0 results
q=napoleon%20bonaparte&defType=dismax&tie=0.1&qf=full_name&mm=2     // 0
results

I also see this when I put all fields (including the copy field) into the qf
parameter.


Thoughts?


Thanks!


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Different-behavior-for-q-goo-com-vs-q-goo-com-in-queries-tp2168935p2596768.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Different behavior for q=goo.com vs q=@goo.com in queries?

Posted by "Grijesh.singh" <pi...@gmail.com>.
Provide us what Analyzers/Filters are you using for Analysis of email field.

-----
Grijesh
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Different-behavior-for-q-goo-com-vs-q-goo-com-in-queries-tp2168935p2183256.html
Sent from the Solr - User mailing list archive at Nabble.com.