You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Bill Bell (JIRA)" <ji...@apache.org> on 2010/10/12 20:23:33 UTC

[jira] Updated: (SOLR-2154) Spatial support for MultiValued fields

     [ https://issues.apache.org/jira/browse/SOLR-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Bell updated SOLR-2154:
----------------------------

    Description: 
Is this an issue - it appears to work ?

This appears to work on LatLon Spatial fields. It appears to find the right lat long... Is this supposed to work?
I read that this does not work on solr.PointType, but it appears to work on LatLonType.

 <fieldType name="location" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
<field name="store" type="location" indexed="true" stored="true" multiValued="true"/>

Trying a few queries and I can get either of the 2 points.

{code}
http://localhost:8983/solr/core2/select?fl=*,score&qf=namesearch&pf=namesearch&start=0&rows=10&q=bill&qt=standard&pt=41.9244,-87.6473&d=10.9344&fq={!sfilt%20fl=store_lat_lon}&sort=hsin(6371,true,store_lat_lon,vector(41.9244,-87.6473))+asc,+score+desc&debugQuery=on

1 result.

http://10.0.1.37:8983/solr/core2/select?fl=*,score&qf=namesearch&pf=namesearch&start=0&rows=10&q=bill&qt=standard&pt=47.7651,-122.362&d=10.9344&fq={!sfilt%20fl=store_lat_lon}&sort=hsin(6371,true,store_lat_lon,vector(47.7651,-122.362))+asc,+score+desc&debugQuery=on

2 results.
{code}


{code}
schema.xml:
<fieldType name="latLon" class="solr.LatLonType" subFieldSuffix="_latLon"/>
 <field name="store_lat_lon" type="latLon" indexed="true" stored="true" multiValued="true"/>
 
sample.xml to import:
<add>
  <doc>
    <field name="address">2300 North Childrens Plaza</field>
    <field name="id">1</field>
    <field name="store_lat_lon">41.9244,-87.6473</field>
    <field name="store_lat_lon">47.7651,-122.362</field>
    <field name="zipcode">60614</field>
  </doc>
  <doc>
    <field name="address">357 North West Richmond Beach Road</field>
    <field name="id">2</field>
    <field name="store_lat_lon">47.7651,-122.362</field>
    <field name="zipcode">98177</field>
  </doc>
  <doc>
    <field name="address">7555 North Overfield Road</field>
    <field name="id">3</field>
    <field name="store_lat_lon">32.948,-111.653</field>
    <field name="zipcode">85294</field>
  </doc>
</add>
{code}

  was:
Is this an issue - it appears to work ?

This appears to work on LatLon Spatial fields. It appears to find the right lat long... Is this supposed to work?
I read that this does not work on solr.PointType, but it appears to work on LatLonType.

 <fieldType name="location" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
<field name="store" type="location" indexed="true" stored="true" multiValued="true"/>

Trying a few queries and I can get either of the 2 points.

http://localhost:8983/solr/core2/select?fl=*,score&qf=namesearch&pf=namesearch&start=0&rows=10&q=bill&qt=standard&pt=41.9244,-87.6473&d=10.9344&fq={!sfilt%20fl=store_lat_lon}&sort=hsin(6371,true,store_lat_lon,vector(41.9244,-87.6473))+asc,+score+desc&debugQuery=on

1 result.

http://10.0.1.37:8983/solr/core2/select?fl=*,score&qf=namesearch&pf=namesearch&start=0&rows=10&q=bill&qt=standard&pt=47.7651,-122.362&d=10.9344&fq={!sfilt%20fl=store_lat_lon}&sort=hsin(6371,true,store_lat_lon,vector(47.7651,-122.362))+asc,+score+desc&debugQuery=on

2 results.



{code}
schema.xml:
<fieldType name="latLon" class="solr.LatLonType" subFieldSuffix="_latLon"/>
 <field name="store_lat_lon" type="latLon" indexed="true" stored="true" multiValued="true"/>
 
sample.xml to import:
<add>
  <doc>
    <field name="address">2300 North Childrens Plaza</field>
    <field name="id">1</field>
    <field name="store_lat_lon">41.9244,-87.6473</field>
    <field name="store_lat_lon">47.7651,-122.362</field>
    <field name="zipcode">60614</field>
  </doc>
  <doc>
    <field name="address">357 North West Richmond Beach Road</field>
    <field name="id">2</field>
    <field name="store_lat_lon">47.7651,-122.362</field>
    <field name="zipcode">98177</field>
  </doc>
  <doc>
    <field name="address">7555 North Overfield Road</field>
    <field name="id">3</field>
    <field name="store_lat_lon">32.948,-111.653</field>
    <field name="zipcode">85294</field>
  </doc>
</add>
{code}


> Spatial support for MultiValued fields
> --------------------------------------
>
>                 Key: SOLR-2154
>                 URL: https://issues.apache.org/jira/browse/SOLR-2154
>             Project: Solr
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Bill Bell
>             Fix For: 4.0
>
>
> Is this an issue - it appears to work ?
> This appears to work on LatLon Spatial fields. It appears to find the right lat long... Is this supposed to work?
> I read that this does not work on solr.PointType, but it appears to work on LatLonType.
>  <fieldType name="location" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
> <field name="store" type="location" indexed="true" stored="true" multiValued="true"/>
> Trying a few queries and I can get either of the 2 points.
> {code}
> http://localhost:8983/solr/core2/select?fl=*,score&qf=namesearch&pf=namesearch&start=0&rows=10&q=bill&qt=standard&pt=41.9244,-87.6473&d=10.9344&fq={!sfilt%20fl=store_lat_lon}&sort=hsin(6371,true,store_lat_lon,vector(41.9244,-87.6473))+asc,+score+desc&debugQuery=on
> 1 result.
> http://10.0.1.37:8983/solr/core2/select?fl=*,score&qf=namesearch&pf=namesearch&start=0&rows=10&q=bill&qt=standard&pt=47.7651,-122.362&d=10.9344&fq={!sfilt%20fl=store_lat_lon}&sort=hsin(6371,true,store_lat_lon,vector(47.7651,-122.362))+asc,+score+desc&debugQuery=on
> 2 results.
> {code}
> {code}
> schema.xml:
> <fieldType name="latLon" class="solr.LatLonType" subFieldSuffix="_latLon"/>
>  <field name="store_lat_lon" type="latLon" indexed="true" stored="true" multiValued="true"/>
>  
> sample.xml to import:
> <add>
>   <doc>
>     <field name="address">2300 North Childrens Plaza</field>
>     <field name="id">1</field>
>     <field name="store_lat_lon">41.9244,-87.6473</field>
>     <field name="store_lat_lon">47.7651,-122.362</field>
>     <field name="zipcode">60614</field>
>   </doc>
>   <doc>
>     <field name="address">357 North West Richmond Beach Road</field>
>     <field name="id">2</field>
>     <field name="store_lat_lon">47.7651,-122.362</field>
>     <field name="zipcode">98177</field>
>   </doc>
>   <doc>
>     <field name="address">7555 North Overfield Road</field>
>     <field name="id">3</field>
>     <field name="store_lat_lon">32.948,-111.653</field>
>     <field name="zipcode">85294</field>
>   </doc>
> </add>
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org