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 Alexander Ramos Jardim <al...@gmail.com> on 2012/03/28 23:31:45 UTC

Why this document does not match?

Hi,

I have an old Solr 1.3 version running on an issue. I have a field
configured in such a way that "fifa 12" and "fifa12" should match the same
documents, as it can be seen in screenshot bellow.

[image: Imagem inline 1]


When I run the query itemNameSearch:fifa12, I get the folowing result:

[image: Imagem inline 2]


That seems okay. But I have the following document on the index:

[image: Imagem inline 3]
As my field is defined, I expected the query to match this document. This
is not what is happening. Does anyone have any idea on what is wrong?


-- 
Alexander Ramos Jardim

Re: Why this document does not match?

Posted by Erick Erickson <er...@gmail.com>.
Can't say why this is happening, you haven't included
your fieldType definition which would help.
You might want to review:

http://wiki.apache.org/solr/UsingMailingLists

Best
Erick

On Tue, Apr 10, 2012 at 3:41 AM, Alexander Ramos Jardim
<al...@gmail.com> wrote:
> Ok. But I am not querying for fifa 12. I am querying fifa12. There's no
> white spaces :(
>
> 2012/4/9 Chris Hostetter <ho...@fucit.org>
>
>>
>> : > itemNameSearch:fifa defaultSearchField:12
>>
>> : That's exactly what's happening! Why does this happen?
>>
>> whyspace is meaningful to the query parser: it tells the query parser
>> there are multiple clauses for a boolean query.
>>
>> if you want to search for any works the user typed in the field
>> "itemNameSearch" then you can either set the default search field to
>> itemNameSearch...
>>        df=itemNameSearch & q=fifa 12
>> ...or put parens arround the words you want to search for in a specific
>> field...
>>        q=itemNameSearch:(fifa 12)
>>
>> -Hoss
>>
>
>
>
> --
> Alexander Ramos Jardim

Re: Why this document does not match?

Posted by Alexander Ramos Jardim <al...@gmail.com>.
Ok. But I am not querying for fifa 12. I am querying fifa12. There's no
white spaces :(

2012/4/9 Chris Hostetter <ho...@fucit.org>

>
> : > itemNameSearch:fifa defaultSearchField:12
>
> : That's exactly what's happening! Why does this happen?
>
> whyspace is meaningful to the query parser: it tells the query parser
> there are multiple clauses for a boolean query.
>
> if you want to search for any works the user typed in the field
> "itemNameSearch" then you can either set the default search field to
> itemNameSearch...
>        df=itemNameSearch & q=fifa 12
> ...or put parens arround the words you want to search for in a specific
> field...
>        q=itemNameSearch:(fifa 12)
>
> -Hoss
>



-- 
Alexander Ramos Jardim

Re: Why this document does not match?

Posted by Chris Hostetter <ho...@fucit.org>.
: > itemNameSearch:fifa defaultSearchField:12

: That's exactly what's happening! Why does this happen?

whyspace is meaningful to the query parser: it tells the query parser 
there are multiple clauses for a boolean query.

if you want to search for any works the user typed in the field 
"itemNameSearch" then you can either set the default search field to 
itemNameSearch...
	df=itemNameSearch & q=fifa 12
...or put parens arround the words you want to search for in a specific 
field...
	q=itemNameSearch:(fifa 12)

-Hoss

Re: Why this document does not match?

Posted by Alexander Ramos Jardim <al...@gmail.com>.
Sorry for the answer.

2012/3/29 Erick Erickson <er...@gmail.com>

> Alexander:
>
> Your images were stripped by one of our mail servers, so there's not
> much we can see <G>...
>
> But guessing, you aren't searching the fields you think you are:
> itemNameSearch:fifa12
> becomes
> itemNameSearch:fifa defaultSearchField:12
>

That's exactly what's happening! Why does this happen?


>
> where defaultSearchField is defined in your schema.xml file.
> Try itemNameSearch:(fifa 12) or similar.
>
> Using debugQuery=on should show this in the "parsed_query" section if I'm
> right.
>
> If that doesn't help, maybe you can post your info again?
>
> <standard comment that this is really old Solr, are you sure you can't
> upgrade?>
>

this has been discussed a lot. And my customer's sysdamin accepted
upgrading to Solr 3.5 , but we won't be doing this in the next month.


>
> Best
> Erick
>
> On Wed, Mar 28, 2012 at 5:31 PM, Alexander Ramos Jardim
> <al...@gmail.com> wrote:
> >
> > Hi,
> >
> > I have an old Solr 1.3 version running on an issue. I have a field
> configured in such a way that "fifa 12" and "fifa12" should match the same
> documents, as it can be seen in screenshot bellow.
> >
> >
> >
> >
> > When I run the query itemNameSearch:fifa12, I get the folowing result:
> >
> >
> >
> >
> > That seems okay. But I have the following document on the index:
> >
> >
> > As my field is defined, I expected the query to match this document.
> This is not what is happening. Does anyone have any idea on what is wrong?
> >
> >
> > --
> > Alexander Ramos Jardim
>



-- 
Alexander Ramos Jardim

Re: Why this document does not match?

Posted by Erick Erickson <er...@gmail.com>.
Alexander:

Your images were stripped by one of our mail servers, so there's not
much we can see <G>...

But guessing, you aren't searching the fields you think you are:
itemNameSearch:fifa12
becomes
itemNameSearch:fifa defaultSearchField:12

where defaultSearchField is defined in your schema.xml file.
Try itemNameSearch:(fifa 12) or similar.

Using debugQuery=on should show this in the "parsed_query" section if I'm
right.

If that doesn't help, maybe you can post your info again?

<standard comment that this is really old Solr, are you sure you can't upgrade?>

Best
Erick

On Wed, Mar 28, 2012 at 5:31 PM, Alexander Ramos Jardim
<al...@gmail.com> wrote:
>
> Hi,
>
> I have an old Solr 1.3 version running on an issue. I have a field configured in such a way that "fifa 12" and "fifa12" should match the same documents, as it can be seen in screenshot bellow.
>
>
>
>
> When I run the query itemNameSearch:fifa12, I get the folowing result:
>
>
>
>
> That seems okay. But I have the following document on the index:
>
>
> As my field is defined, I expected the query to match this document. This is not what is happening. Does anyone have any idea on what is wrong?
>
>
> --
> Alexander Ramos Jardim