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 Marc Tinnemeyer <ma...@gmx.net> on 2011/10/12 16:14:54 UTC

Regarding geodist and multiple location fields

Hi everyone,

I am a bit troubled by a recent change in my configuration. I had to add two additional fields of type "location" to the already existing one.
So the configuration looks like this:

<field name="home" type="location" indexed="true" stored="true"/>
<field name="work" type="location" indexed="true" stored="true"/>
<field name="elsewhere" type="location" indexed="true" stored="true"/>
<dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false"/>

Assuming that there are docs in the index having "home" set to: "50,20"

When I run a query like: ...q=*:*&fq={!geofilt sfield=home pt=50,20 d=5} everything is in the greens. But changing the value of "sfield" to "work" or "elsewhere" while keeping "pt" returns exactly the same results. It seems to me that there is something strange.

Maybe somebody has an idea on this.

Thanks in advance
Kind Regards
Marc



Re: Regarding geodist and multiple location fields

Posted by Erick Erickson <er...@gmail.com>.
I raised a JIRA, see:
https://issues.apache.org/jira/browse/SOLR-2829

Erick

On Thu, Oct 13, 2011 at 8:20 AM, Marc Tinnemeyer <ma...@gmx.net> wrote:
> Thanks Erick
> In the meantime I checked against 3.3 and 3.1 but no difference there.
>
> Marc
>
> On 13.10.2011, at 14:00, Erick Erickson wrote:
>
>> Something's not right here, I'll ask over on the
>> dev list and we'll see what the reply is, you can
>> monitor over there too if you'd like.
>>
>> Erick
>>
>> Erick
>>
>> On Wed, Oct 12, 2011 at 12:10 PM, Marc Tinnemeyer <ma...@gmx.net> wrote:
>>> At first I thought so too. Here is a simple document.
>>>
>>> <add>
>>>        <doc>
>>>                <field name="id">1</field>
>>>                <field name="name">first</field>
>>>                <field name="work">48.60,11.61</field>
>>>                <field name="home">52.67,7.30</field>
>>>        </doc>
>>> </add>
>>>
>>> and here is the result that shouldn't be:
>>>
>>> <response>
>>> ...
>>> <str name="q">*:*</str>
>>> <str name="fq">{!geofilt sfield=work pt=52.67,7.30 d=5}</str>
>>> ...
>>> </lst>
>>> </lst>
>>> <result name="response" numFound="1" start="0">
>>> <doc>
>>> <str name="home">52.67,7.30</str>
>>> <str name="id">1</str>
>>> <str name="name">first</str>
>>> <str name="work">48.60,11.61</str>
>>> </doc>
>>> </result>
>>> </response>
>>>
>>>
>>> Marc
>>>
>>>
>>>
>>> On 12.10.2011, at 16:54, Erick Erickson wrote:
>>>
>>>> Well, the simplest answer is that you're
>>>> putting the same information in home and
>>>> work. Or that they are close enough that
>>>> they are both within the radius.
>>>>
>>>> Gotta see the raw data to generate a better
>>>> answer.
>>>>
>>>>
>>>> Best
>>>> Erick
>>>>
>>>> On Wed, Oct 12, 2011 at 10:14 AM, Marc Tinnemeyer <ma...@gmx.net> wrote:
>>>>> Hi everyone,
>>>>>
>>>>> I am a bit troubled by a recent change in my configuration. I had to add two additional fields of type "location" to the already existing one.
>>>>> So the configuration looks like this:
>>>>>
>>>>> <field name="home" type="location" indexed="true" stored="true"/>
>>>>> <field name="work" type="location" indexed="true" stored="true"/>
>>>>> <field name="elsewhere" type="location" indexed="true" stored="true"/>
>>>>> <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false"/>
>>>>>
>>>>> Assuming that there are docs in the index having "home" set to: "50,20"
>>>>>
>>>>> When I run a query like: ...q=*:*&fq={!geofilt sfield=home pt=50,20 d=5} everything is in the greens. But changing the value of "sfield" to "work" or "elsewhere" while keeping "pt" returns exactly the same results. It seems to me that there is something strange.
>>>>>
>>>>> Maybe somebody has an idea on this.
>>>>>
>>>>> Thanks in advance
>>>>> Kind Regards
>>>>> Marc
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>

Re: Regarding geodist and multiple location fields

Posted by Marc Tinnemeyer <ma...@gmx.net>.
Thanks Erick
In the meantime I checked against 3.3 and 3.1 but no difference there.

Marc

On 13.10.2011, at 14:00, Erick Erickson wrote:

> Something's not right here, I'll ask over on the
> dev list and we'll see what the reply is, you can
> monitor over there too if you'd like.
> 
> Erick
> 
> Erick
> 
> On Wed, Oct 12, 2011 at 12:10 PM, Marc Tinnemeyer <ma...@gmx.net> wrote:
>> At first I thought so too. Here is a simple document.
>> 
>> <add>
>>        <doc>
>>                <field name="id">1</field>
>>                <field name="name">first</field>
>>                <field name="work">48.60,11.61</field>
>>                <field name="home">52.67,7.30</field>
>>        </doc>
>> </add>
>> 
>> and here is the result that shouldn't be:
>> 
>> <response>
>> ...
>> <str name="q">*:*</str>
>> <str name="fq">{!geofilt sfield=work pt=52.67,7.30 d=5}</str>
>> ...
>> </lst>
>> </lst>
>> <result name="response" numFound="1" start="0">
>> <doc>
>> <str name="home">52.67,7.30</str>
>> <str name="id">1</str>
>> <str name="name">first</str>
>> <str name="work">48.60,11.61</str>
>> </doc>
>> </result>
>> </response>
>> 
>> 
>> Marc
>> 
>> 
>> 
>> On 12.10.2011, at 16:54, Erick Erickson wrote:
>> 
>>> Well, the simplest answer is that you're
>>> putting the same information in home and
>>> work. Or that they are close enough that
>>> they are both within the radius.
>>> 
>>> Gotta see the raw data to generate a better
>>> answer.
>>> 
>>> 
>>> Best
>>> Erick
>>> 
>>> On Wed, Oct 12, 2011 at 10:14 AM, Marc Tinnemeyer <ma...@gmx.net> wrote:
>>>> Hi everyone,
>>>> 
>>>> I am a bit troubled by a recent change in my configuration. I had to add two additional fields of type "location" to the already existing one.
>>>> So the configuration looks like this:
>>>> 
>>>> <field name="home" type="location" indexed="true" stored="true"/>
>>>> <field name="work" type="location" indexed="true" stored="true"/>
>>>> <field name="elsewhere" type="location" indexed="true" stored="true"/>
>>>> <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false"/>
>>>> 
>>>> Assuming that there are docs in the index having "home" set to: "50,20"
>>>> 
>>>> When I run a query like: ...q=*:*&fq={!geofilt sfield=home pt=50,20 d=5} everything is in the greens. But changing the value of "sfield" to "work" or "elsewhere" while keeping "pt" returns exactly the same results. It seems to me that there is something strange.
>>>> 
>>>> Maybe somebody has an idea on this.
>>>> 
>>>> Thanks in advance
>>>> Kind Regards
>>>> Marc
>>>> 
>>>> 
>>>> 
>> 
>> 


Re: Regarding geodist and multiple location fields

Posted by Erick Erickson <er...@gmail.com>.
After looking at this a little more, it feels like
a caching issue. If I bounce the Solr server
between queries, it works just fine (I'm
on trunk now, but I think it's the same on 3.4).

Could you try that experiment a bit? Bounce
your Solr server between changing the field
and see if you get the correct results and
let us know? It'll help narrow the search.

Thanks,
Erick

On Thu, Oct 13, 2011 at 8:00 AM, Erick Erickson <er...@gmail.com> wrote:
> Something's not right here, I'll ask over on the
> dev list and we'll see what the reply is, you can
> monitor over there too if you'd like.
>
> Erick
>
> Erick
>
> On Wed, Oct 12, 2011 at 12:10 PM, Marc Tinnemeyer <ma...@gmx.net> wrote:
>> At first I thought so too. Here is a simple document.
>>
>> <add>
>>        <doc>
>>                <field name="id">1</field>
>>                <field name="name">first</field>
>>                <field name="work">48.60,11.61</field>
>>                <field name="home">52.67,7.30</field>
>>        </doc>
>> </add>
>>
>> and here is the result that shouldn't be:
>>
>> <response>
>> ...
>> <str name="q">*:*</str>
>> <str name="fq">{!geofilt sfield=work pt=52.67,7.30 d=5}</str>
>> ...
>> </lst>
>> </lst>
>> <result name="response" numFound="1" start="0">
>> <doc>
>> <str name="home">52.67,7.30</str>
>> <str name="id">1</str>
>> <str name="name">first</str>
>> <str name="work">48.60,11.61</str>
>> </doc>
>> </result>
>> </response>
>>
>>
>> Marc
>>
>>
>>
>> On 12.10.2011, at 16:54, Erick Erickson wrote:
>>
>>> Well, the simplest answer is that you're
>>> putting the same information in home and
>>> work. Or that they are close enough that
>>> they are both within the radius.
>>>
>>> Gotta see the raw data to generate a better
>>> answer.
>>>
>>>
>>> Best
>>> Erick
>>>
>>> On Wed, Oct 12, 2011 at 10:14 AM, Marc Tinnemeyer <ma...@gmx.net> wrote:
>>>> Hi everyone,
>>>>
>>>> I am a bit troubled by a recent change in my configuration. I had to add two additional fields of type "location" to the already existing one.
>>>> So the configuration looks like this:
>>>>
>>>> <field name="home" type="location" indexed="true" stored="true"/>
>>>> <field name="work" type="location" indexed="true" stored="true"/>
>>>> <field name="elsewhere" type="location" indexed="true" stored="true"/>
>>>> <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false"/>
>>>>
>>>> Assuming that there are docs in the index having "home" set to: "50,20"
>>>>
>>>> When I run a query like: ...q=*:*&fq={!geofilt sfield=home pt=50,20 d=5} everything is in the greens. But changing the value of "sfield" to "work" or "elsewhere" while keeping "pt" returns exactly the same results. It seems to me that there is something strange.
>>>>
>>>> Maybe somebody has an idea on this.
>>>>
>>>> Thanks in advance
>>>> Kind Regards
>>>> Marc
>>>>
>>>>
>>>>
>>
>>
>

Re: Regarding geodist and multiple location fields

Posted by Erick Erickson <er...@gmail.com>.
Something's not right here, I'll ask over on the
dev list and we'll see what the reply is, you can
monitor over there too if you'd like.

Erick

Erick

On Wed, Oct 12, 2011 at 12:10 PM, Marc Tinnemeyer <ma...@gmx.net> wrote:
> At first I thought so too. Here is a simple document.
>
> <add>
>        <doc>
>                <field name="id">1</field>
>                <field name="name">first</field>
>                <field name="work">48.60,11.61</field>
>                <field name="home">52.67,7.30</field>
>        </doc>
> </add>
>
> and here is the result that shouldn't be:
>
> <response>
> ...
> <str name="q">*:*</str>
> <str name="fq">{!geofilt sfield=work pt=52.67,7.30 d=5}</str>
> ...
> </lst>
> </lst>
> <result name="response" numFound="1" start="0">
> <doc>
> <str name="home">52.67,7.30</str>
> <str name="id">1</str>
> <str name="name">first</str>
> <str name="work">48.60,11.61</str>
> </doc>
> </result>
> </response>
>
>
> Marc
>
>
>
> On 12.10.2011, at 16:54, Erick Erickson wrote:
>
>> Well, the simplest answer is that you're
>> putting the same information in home and
>> work. Or that they are close enough that
>> they are both within the radius.
>>
>> Gotta see the raw data to generate a better
>> answer.
>>
>>
>> Best
>> Erick
>>
>> On Wed, Oct 12, 2011 at 10:14 AM, Marc Tinnemeyer <ma...@gmx.net> wrote:
>>> Hi everyone,
>>>
>>> I am a bit troubled by a recent change in my configuration. I had to add two additional fields of type "location" to the already existing one.
>>> So the configuration looks like this:
>>>
>>> <field name="home" type="location" indexed="true" stored="true"/>
>>> <field name="work" type="location" indexed="true" stored="true"/>
>>> <field name="elsewhere" type="location" indexed="true" stored="true"/>
>>> <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false"/>
>>>
>>> Assuming that there are docs in the index having "home" set to: "50,20"
>>>
>>> When I run a query like: ...q=*:*&fq={!geofilt sfield=home pt=50,20 d=5} everything is in the greens. But changing the value of "sfield" to "work" or "elsewhere" while keeping "pt" returns exactly the same results. It seems to me that there is something strange.
>>>
>>> Maybe somebody has an idea on this.
>>>
>>> Thanks in advance
>>> Kind Regards
>>> Marc
>>>
>>>
>>>
>
>

Re: Regarding geodist and multiple location fields

Posted by Marc Tinnemeyer <ma...@gmx.net>.
At first I thought so too. Here is a simple document.

<add>
	<doc>
		<field name="id">1</field>
		<field name="name">first</field>
		<field name="work">48.60,11.61</field>
		<field name="home">52.67,7.30</field>
	</doc>
</add>

and here is the result that shouldn't be:

<response>
...
<str name="q">*:*</str>
<str name="fq">{!geofilt sfield=work pt=52.67,7.30 d=5}</str>
...
</lst>
</lst>
<result name="response" numFound="1" start="0">
<doc>
<str name="home">52.67,7.30</str>
<str name="id">1</str>
<str name="name">first</str>
<str name="work">48.60,11.61</str>
</doc>
</result>
</response>


Marc



On 12.10.2011, at 16:54, Erick Erickson wrote:

> Well, the simplest answer is that you're
> putting the same information in home and
> work. Or that they are close enough that
> they are both within the radius.
> 
> Gotta see the raw data to generate a better
> answer.
> 
> 
> Best
> Erick
> 
> On Wed, Oct 12, 2011 at 10:14 AM, Marc Tinnemeyer <ma...@gmx.net> wrote:
>> Hi everyone,
>> 
>> I am a bit troubled by a recent change in my configuration. I had to add two additional fields of type "location" to the already existing one.
>> So the configuration looks like this:
>> 
>> <field name="home" type="location" indexed="true" stored="true"/>
>> <field name="work" type="location" indexed="true" stored="true"/>
>> <field name="elsewhere" type="location" indexed="true" stored="true"/>
>> <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false"/>
>> 
>> Assuming that there are docs in the index having "home" set to: "50,20"
>> 
>> When I run a query like: ...q=*:*&fq={!geofilt sfield=home pt=50,20 d=5} everything is in the greens. But changing the value of "sfield" to "work" or "elsewhere" while keeping "pt" returns exactly the same results. It seems to me that there is something strange.
>> 
>> Maybe somebody has an idea on this.
>> 
>> Thanks in advance
>> Kind Regards
>> Marc
>> 
>> 
>> 


Re: Regarding geodist and multiple location fields

Posted by Erick Erickson <er...@gmail.com>.
Well, the simplest answer is that you're
putting the same information in home and
work. Or that they are close enough that
they are both within the radius.

Gotta see the raw data to generate a better
answer.


Best
Erick

On Wed, Oct 12, 2011 at 10:14 AM, Marc Tinnemeyer <ma...@gmx.net> wrote:
> Hi everyone,
>
> I am a bit troubled by a recent change in my configuration. I had to add two additional fields of type "location" to the already existing one.
> So the configuration looks like this:
>
> <field name="home" type="location" indexed="true" stored="true"/>
> <field name="work" type="location" indexed="true" stored="true"/>
> <field name="elsewhere" type="location" indexed="true" stored="true"/>
> <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false"/>
>
> Assuming that there are docs in the index having "home" set to: "50,20"
>
> When I run a query like: ...q=*:*&fq={!geofilt sfield=home pt=50,20 d=5} everything is in the greens. But changing the value of "sfield" to "work" or "elsewhere" while keeping "pt" returns exactly the same results. It seems to me that there is something strange.
>
> Maybe somebody has an idea on this.
>
> Thanks in advance
> Kind Regards
> Marc
>
>
>