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 Reza Safari <r....@lukkien.com> on 2009/06/05 17:09:47 UTC

Search on dynamic fields

When I search for exact match on "New" I get zero results!   
q=17000219_s:New
But when I search on  1003356 I get results! q=17000219_s: 1003356
And when I use wildcards I get results too! q=17000219_s: *New or  
q=17000219_s:New* or q=17000219_s:*New*

Can anyone explain this?

schema:
    <dynamicField name="*_s"  type="string"  indexed="true"   
stored="true" multiValued="true"/>

Xml:
<arr name="17000219_s">
	<str>1003356</str>
	<str>New</str>
	<str>New</str>
</arr>


--
Reza Safari
LUKKIEN
Copernicuslaan 15
6716 BM Ede

The Netherlands
---------------------------------------------
http://www.lukkien.com
t: +31 (0) 318 698000

This message is for the designated recipient only and may contain  
privileged, proprietary, or otherwise private information. If you have  
received it in error, please notify the sender immediately and delete  
the original. Any other use of the email by you is prohibited.















Re: Search on dynamic fields

Posted by Reza Safari <r....@lukkien.com>.
I'm 100% sure about that :)

On Jun 5, 2009, at 9:05 PM, Avlesh Singh wrote:

> My bad! Please ignore the previous reply.
> I just read your mail again to realize that there is a problem.
>
> Are you sure that the case (upper/lower) in your query and index  
> match? Any
> difference in cases would not fetch you results for a field of type  
> string.
>
> Cheers
> Avlesh
>
> On Sat, Jun 6, 2009 at 12:30 AM, Avlesh Singh <av...@gmail.com>  
> wrote:
>
>> When I search for exact match on "New" I get zero results!
>>> q=17000219_s:New
>>> But when I search on  1003356 I get results! q=17000219_s: 1003356
>>> And when I use wildcards I get results too! q=17000219_s: *New or
>>> q=17000219_s:New* or q=17000219_s:*New*
>>>
>>
>> Nothing your case is unexpected, Reza. Your dynamic field is a *
>> multivalued* field which has three values. The document containing  
>> this
>> field would be fetched whenever this field is searched for any of the
>> contained values.
>>
>> I think you want to use this field differently. It would be to nice  
>> to hear
>> from you, before I make too many assumptions to figure out your  
>> problem and
>> suggest a solution.
>>
>> Cheers
>> Avlesh
>>
>>
>> On Fri, Jun 5, 2009 at 8:39 PM, Reza Safari <r....@lukkien.com>  
>> wrote:
>>
>>> When I search for exact match on "New" I get zero results!
>>> q=17000219_s:New
>>> But when I search on  1003356 I get results! q=17000219_s: 1003356
>>> And when I use wildcards I get results too! q=17000219_s: *New or
>>> q=17000219_s:New* or q=17000219_s:*New*
>>>
>>> Can anyone explain this?
>>>
>>> schema:
>>>  <dynamicField name="*_s"  type="string"  indexed="true"   
>>> stored="true"
>>> multiValued="true"/>
>>>
>>> Xml:
>>> <arr name="17000219_s">
>>>       <str>1003356</str>
>>>       <str>New</str>
>>>       <str>New</str>
>>> </arr>
>>>
>>>
>>> --
>>> Reza Safari
>>> LUKKIEN
>>> Copernicuslaan 15
>>> 6716 BM Ede
>>>
>>> The Netherlands
>>> ---------------------------------------------
>>> http://www.lukkien.com
>>> t: +31 (0) 318 698000
>>>
>>> This message is for the designated recipient only and may contain
>>> privileged, proprietary, or otherwise private information. If you  
>>> have
>>> received it in error, please notify the sender immediately and  
>>> delete the
>>> original. Any other use of the email by you is prohibited.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>


--
Reza Safari
LUKKIEN
Copernicuslaan 15
6716 BM Ede

The Netherlands
---------------------------------------------
http://www.lukkien.com
t: +31 (0) 318 698000

This message is for the designated recipient only and may contain  
privileged, proprietary, or otherwise private information. If you have  
received it in error, please notify the sender immediately and delete  
the original. Any other use of the email by you is prohibited.















Re: Search on dynamic fields

Posted by Avlesh Singh <av...@gmail.com>.
My bad! Please ignore the previous reply.
I just read your mail again to realize that there is a problem.

Are you sure that the case (upper/lower) in your query and index match? Any
difference in cases would not fetch you results for a field of type string.

Cheers
Avlesh

On Sat, Jun 6, 2009 at 12:30 AM, Avlesh Singh <av...@gmail.com> wrote:

> When I search for exact match on "New" I get zero results!
>>  q=17000219_s:New
>> But when I search on  1003356 I get results! q=17000219_s: 1003356
>> And when I use wildcards I get results too! q=17000219_s: *New or
>> q=17000219_s:New* or q=17000219_s:*New*
>>
>
> Nothing your case is unexpected, Reza. Your dynamic field is a *
> multivalued* field which has three values. The document containing this
> field would be fetched whenever this field is searched for any of the
> contained values.
>
> I think you want to use this field differently. It would be to nice to hear
> from you, before I make too many assumptions to figure out your problem and
> suggest a solution.
>
> Cheers
> Avlesh
>
>
> On Fri, Jun 5, 2009 at 8:39 PM, Reza Safari <r....@lukkien.com> wrote:
>
>> When I search for exact match on "New" I get zero results!
>>  q=17000219_s:New
>> But when I search on  1003356 I get results! q=17000219_s: 1003356
>> And when I use wildcards I get results too! q=17000219_s: *New or
>> q=17000219_s:New* or q=17000219_s:*New*
>>
>> Can anyone explain this?
>>
>> schema:
>>   <dynamicField name="*_s"  type="string"  indexed="true"  stored="true"
>> multiValued="true"/>
>>
>> Xml:
>> <arr name="17000219_s">
>>        <str>1003356</str>
>>        <str>New</str>
>>        <str>New</str>
>> </arr>
>>
>>
>> --
>> Reza Safari
>> LUKKIEN
>> Copernicuslaan 15
>> 6716 BM Ede
>>
>> The Netherlands
>> ---------------------------------------------
>> http://www.lukkien.com
>> t: +31 (0) 318 698000
>>
>> This message is for the designated recipient only and may contain
>> privileged, proprietary, or otherwise private information. If you have
>> received it in error, please notify the sender immediately and delete the
>> original. Any other use of the email by you is prohibited.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>

Re: Search on dynamic fields

Posted by Avlesh Singh <av...@gmail.com>.
>
> When I search for exact match on "New" I get zero results!
>  q=17000219_s:New
> But when I search on  1003356 I get results! q=17000219_s: 1003356
> And when I use wildcards I get results too! q=17000219_s: *New or
> q=17000219_s:New* or q=17000219_s:*New*
>

Nothing your case is unexpected, Reza. Your dynamic field is a
*multivalued*field which has three values. The document containing
this field would be
fetched whenever this field is searched for any of the contained values.

I think you want to use this field differently. It would be to nice to hear
from you, before I make too many assumptions to figure out your problem and
suggest a solution.

Cheers
Avlesh

On Fri, Jun 5, 2009 at 8:39 PM, Reza Safari <r....@lukkien.com> wrote:

> When I search for exact match on "New" I get zero results!
>  q=17000219_s:New
> But when I search on  1003356 I get results! q=17000219_s: 1003356
> And when I use wildcards I get results too! q=17000219_s: *New or
> q=17000219_s:New* or q=17000219_s:*New*
>
> Can anyone explain this?
>
> schema:
>   <dynamicField name="*_s"  type="string"  indexed="true"  stored="true"
> multiValued="true"/>
>
> Xml:
> <arr name="17000219_s">
>        <str>1003356</str>
>        <str>New</str>
>        <str>New</str>
> </arr>
>
>
> --
> Reza Safari
> LUKKIEN
> Copernicuslaan 15
> 6716 BM Ede
>
> The Netherlands
> ---------------------------------------------
> http://www.lukkien.com
> t: +31 (0) 318 698000
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>