On Fri, Jun 24, 2011 at 2:11 PM, marthinal <jm.rodriguez.ve...@gmail.com> wrote:
>
> Yonik Seeley-2-2 wrote:
>>
>> On Tue, Sep 21, 2010 at 12:12 PM, dan sutton &lt;danbsut...@gmail.com&gt;
>> wrote:
>>> I was looking at the LatLonType and how it might represent multiple
>>> lon/lat
>>> values ... it looks to me like the lat would go in
>>> {latlongfield}_0_LatLon
>>> and the long in {latlongfield}_1_LatLon ... how then if we have multiple
>>> lat/long points for a doc when filtering for example we choose the
>>> correct
>>> points.
>>>
>>> e.g. if thinking in cartisean coords and we have
>>>
>>> P1(3,4), P2(6,7) ... x is stored with 3,6 and y with 4,7 ...
>>>
>>> then how does it ensure we're not erroneously picking (3,7) or (6,4)
>>> whilst
>>> filtering with the spatial query?
>>
>> That's why it's a single-valued field only for now...
>>
>>> don't we have to store both values together ? what am i missing here?
>>
>> The problem is that we don't have a way to query both values together,
>> so we must index them separately.  The basic LatLonType uses numeric
>> queries on the lat and lon fields separately.
>>
>> -Yonik
>> http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8
>>
>
> I have in my index two diferents fields like you say Yonik (location_1,
> location_2) but the problem is when i want to filter results that have d= 50
> for location_1 and d=50 for location_2 .I really dont know to build the
> query ...
>
> For example it works perfectly :
>
> q={!geofilt}&sfield=location_1&pt=36.62288966,-6.23211272&d=25
>
> but how i add the sfield location_2 ?

sfield, pt and d can all be specified directly in the spatial
functions/filters too, and that will override the global params.

Unfortunately one must currently use lucene query syntax to do an OR.
It just makes it look a bit messier.

q=_query_:"{!geofilt}" _query:"{!geofilt sfield=location_2}"

-Yonik
http://www.lucidimagination.com

Reply via email to