Solr中的分布式搜索,每个分片具有不同的查询(Distributed Search in Solr with different queries per shard)
我有2个核心。
一个包含活动数据,另一个包含历史数据(用于从活动数据中删除的文档)。
我想在两者上运行分布式搜索并获得统一结果(由Solr分布式搜索支持,我没有使用Solr Cloud)。
我的问题是每个核心的查询是不同的。
有没有办法为每个核心指定不同的查询,仍然让Solr统一查询结果?
例如:
活动数据核心查询:选择所有绿色文档
历史核心查询:选择DocVersion = 4的所有绿色文档
- 一种选择是向两者发送统一查询,但随后每个核心将无缘无故地更加努力。
I have 2 cores.
One with active data and one with historical data (for documents which were removed from the active one).
I want to run Distributed Search on both and get the unified result (as supported by Solr Distributed Search, I'm not using Solr Cloud).
My problem is that the query for each core is different.
Is there a way to specify different query per core and still let Solr to unify the query results?
For example:
Active data core query: select all green docs
History core query: select all green docs with DocVersion=4
- One option is to send a unified query to both but then each core will work harder for no reason.
原文:https://stackoverflow.com/questions/23779229
最满意答案
来自
:help 'paste'
:由于“粘贴”处于活动状态时映射不起作用,因此您需要使用“pastetoggle”选项将“粘贴”选项与某个键切换。
所以解决方案是例如
:set pastetoggle=<F12>
并在粘贴时使用以下序列:
<F12>i
(粘贴)<Esc><F12>
From
:help 'paste'
:Since mapping doesn't work while 'paste' is active, you need to use the 'pastetoggle' option to toggle the 'paste' option with some key.
So the solution is to e.g.
:set pastetoggle=<F12>
and to use the following sequence when pasting:
<F12>i
(paste)<Esc><F12>
相关问答
更多-
红帽linux下文本编辑的命令是什么?[2022-08-28]
vim -
这是另一个通用解决方案 library(dplyr) dat %>% group_by(id) %>% summarise(indx = toString(sort(unique(Rx)))) %>% ungroup() %>% count(indx) # Source: local data table [3 x 2] # # indx n # 1 1, 2 2 # 2 1 2 # 3 2 2 与data.table类似 library(data.table) set ...
-
我们使用ctrl + shift + up / ctrl + shift + down来移动列表中的项目。 我们在几个应用程序中使用过这种行为,它似乎运行良好。 因此,您可以选项卡到列表,使用向上/向下移动列表中的焦点/选择,或使用shift +向上/向下进行扩展选择,或使用ctrl +向上/向下进行非连续选择(全部标准列表键盘行为), 然后使用ctrl + shift +向上/向下移动整个选择向上或向下。 我们还支持拖放重新排序,但ctrl + shift + up / down是键盘或屏幕阅读器用户可以 ...
-
此行为是由会话引起的。 Php无法启动第二个会话(具有相同的会话名称),而第一个会话尚未关闭。 据我所知,没有办法避免这种锁定。 尝试使用以下函数asap释放会话文件,以允许执行第二个请求。 session_write_close(); This behaviour is due to sessions. Php can`t start second session (with the same session name) while the first one is not closed yet. As ...
-
好的。 所以这是几种可能的解决方案中的一种。 您仍然需要计算出治疗类型3(生物制剂)的开关,并找出如何处理同一日期有多个条目的地方。 但这应该让你去! 准备数据 proc format; value treatType 1 = "Topical" 2 = "Non-biologic systemics" 3 = "Biologics"; run; data have; format pnr 8. tType treatType ...
-
Spark Dataframe异常处理的非常具体的要求(very specific requirement for outlier treatment in Spark Dataframe)[2023-02-17]
你必须知道第一组和第二组的数量和名称,可以按照如下方式完成 import org.apache.spark.sql.functions._ val first_two_values = df.groupBy("market", "responseVariable").agg(count("blabla").as("count")).orderBy($"count".desc).take((2)).map(row => (row(1) -> row(2))).toList val rowsToFilter = ... -
异常治疗的最佳实践(Exception treatment best practice)[2022-03-15]
将字符串转换为数字时,最佳做法是不要使用Try-Catch 。 因此,您应该使用类似int.TryParse的TryParse方法。 // note that here is also a possible error-source string valorToken = xmlnode[i].ChildNodes.Item(2).InnerText.Trim(); int valor; if(!int.TryParse(valorToken, out valor)) { // log this ... -
问题在于 String query = "update incident set intervenants = ? where id_incident like '%'"; 此查询更新所有行 ( id_incident,如'%' )! 你需要使用过滤器主键(我认为它id_incident )! 您必须执行此查询 String query = "update incident set intervenants = ? where id_incident = ? ; preparedStmt.setStri ...
-
如何制作一些治疗后的vim地图通过自然治疗(How to make a vim map to after some treatment pass foward to the natural treatment)[2023-06-26]
来自:help 'paste' : 由于“粘贴”处于活动状态时映射不起作用,因此您需要使用“pastetoggle”选项将“粘贴”选项与某个键切换。 所以解决方案是例如 :set pastetoggle=并在粘贴时使用以下序列: i (粘贴) From :help 'paste': Since mapping doesn't work while 'paste' is active, you need to use the 'pastetoggle' optio ... -
治疗NaN's(Treatment of NaN's)[2023-04-13]
我相信, pandas使用与bottleneck nanmean功能相同的代码,因此自动忽略了nan 。 numpy并不适合你。 然而,你真正想做的是掩盖两个系列中的纳米值并将其传递给t检验: mask = numpy.logical_and(numpy.isfinite(A), numpy.isfinite(B)) st.ttest_ind(A[mask], B[mask]) pandas uses the same code as the bottleneck nanmean function, I ...