简体   繁体   English

Solr LatLonType multivalued = true,以按多个点中最接近的点对文档进行排序

[英]Solr LatLonType multivalued=true, to sort document by nearest one of multiple points

The official Solr documentation were clear about this issue : Solr的官方文档对此问题很清楚:

Fields using LatLonType must be single valued (ie multiValued="false") 使用LatLonType的字段必须为单值(即multiValued =“ false”)

The question is why there is such limitation, and how it's possible to extend Solr to support this feature. 问题是为什么会有这样的限制,以及如何扩展Solr以支持此功能。 Any tips would be useful. 任何提示将是有用的。

Problem Details : I have a solr core that contains multiple documents (ex: place) with multiple location for each. 问题详细信息 :我有一个Solr核心,其中包含多个文档(例如:place),每个文档具有多个位置。 Solr does not yet support AFAIK storing multivalued LatLonType . Solr尚不支持AFAIK存储多值LatLonType I have to implement a solution for this, by creating a query function that maps the multiple lat/lng locations to the nearest one using a given center point parameter ie multivalued geodist function. 我必须通过创建一个查询函数来实现此解决方案,该查询函数使用给定的中心点参数(即多值geodist函数)将多个经纬度位置映射到最近的位置。 But I need some tips for doing that, from any experienced solr/lucene. 但是我需要一些经验丰富的solr / lucene来提供一些技巧。

You can take a look at: Is it possible to add multiple location for a single node and solr can show all location for a search? 您可以看一下: 是否可以为单个节点添加多个位置,并且solr可以显示搜索的所有位置? You can index multiple geolocation for a node, the problem is, when you search you will find just the first geolocation. 您可以为一个节点索引多个地理位置,问题是,当您搜索时,您只会找到第一个地理位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM