简体   繁体   English

ids参数表在solr查询中如何工作? 并能帮助我调试分片问题吗?

[英]How does the ids paremeter work in a solr query? and will it help me in debugging a sharding issue?

We have a large number of solr shards and are trying to setup multi-levels of aggregators. 我们有大量的solr分片,并正在尝试设置多层聚合器。 My understanding is that one aggregator should have no more than 200 cores associated with it. 我的理解是,一个聚合器与之关联的核心数量不应超过200个。 Our current plan has our first level of aggregators working on 100 cores each. 我们当前的计划是将聚合器的第一级工作在每个100个核心上。 We will then have another level of aggregators collecting these together. 然后,我们将有另一个级别的聚合器将它们收集在一起。 So far this is not working for us and when we query our second level we are getting 500 Internal Server Errors. 到目前为止,这对我们不起作用,当我们查询第二级时,我们收到500个内部服务器错误。 Digging into this we find our level one aggregators are give NPEs. 深入研究这一点,我们发现一级聚合器得到了NPE。 We've also found there's some translation of the query going on. 我们还发现查询正在进行一些翻译。 For instance, we give our level 2 aggregator something like this: 例如,我们为第2级聚合器提供以下内容:

http://l2agghostname:8080/solr/core-00/select?q=*

It sends the following to the level 1: 它将以下内容发送到级别1:

http://l1agghostname:8080/solr/core-00/select?ids=a6_370573660942_76697809790_0,a7_370573660942_76697809790_4&wt=xml&q=*

That suggests it's receiving the IDs to return, but I'm not sure exactly what that "ids" parameter is supposed to do. 这表明它正在接收要返回的ID,但是我不确定“ ids”参数应该做什么。 If I plug that same query directly in to the level 1 aggregator I get the same error, however if I give it only one doc id, as so: 如果我将同一查询直接插入到1级聚合器中,则会遇到相同的错误,但是如果我仅给它一个文档ID,则这样:

http://l1agghostname:8080/solr/core-00/select?ids=a6_370573660942_76697809790_0&wt=xml&q=*

Then it will return the information! 然后它将返回信息!

This seems very weird but I'm also not sure I should be spending time trying to understand how this ids parameter is working. 这似乎很奇怪,但我也不确定我是否应该花时间尝试了解此ids参数的工作方式。 Am I following a red herring? 我在追赶红鲱鱼吗?

PS: http://l1agghostname:8080/solr/core-00/select?q=* does return results as expected. PS: http://l1agghostname:8080/solr/core-00/select?q=*确实返回了预期的结果。

What we eventually found was that Solr was not able to handle searches like this. 我们最终发现,Solr无法处理这样的搜索。 Solr would send the initial query through the stack. Solr将通过堆栈发送初始查询。 The aggregators would then collect the IDs and send those back. 然后,聚合器将收集ID并将其发送回去。 Solr is then supposed to retrieve the documents using IDs. 然后应该假定Solr使用ID检索文档。 Once the IDs were returned it would not be able to recall the path to retrieve them all. 返回ID后,将无法重新调用所有ID。 It thus sent the queries to the wrong machines and errors occurred. 因此,它将查询发送到错误的计算机,并发生了错误。

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

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