地理位置情報ポイント A から特定の半径内のすべての結果を返すことができますが、各検索結果のポイント A までの距離を返したいと考えています。
私はこれを読んでいました: http://wiki.apache.org/solr/SpatialSearch
私はこのSolrクエリを持っています:
http://localhost:8983/solr/tt/select/?indent=on&facet=true&fq={!geofilt}&pt=51.4416420,5.4697225&sfield=geolocation&d=20&sort=geodist()%20asc&q=*:*&start=0&rows=10&fl=_dist_:geodist(),id,title,lat,lng,geolocation,location&facet.mincount=1
そして、これは私のschema.xmlにあります
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
<field name="geolocation" type="location" indexed="true" stored="true"/>
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/>
これは結果の 1 つです。
<doc>
<str name="geolocation">51.4231086,5.474830699999984</str>
<str name="id">122</str>
<str name="lat">51.4231086</str>
<str name="lng">5.474830699999984</str>
<str name="title">Eindhoven Museum</str>
</doc>
ただし、現在のクエリ文字列では、ドキュメントに距離フィールドが表示されません。
私は何が欠けていますか?