首页 \ 问答 \ 通过spark-solr执行分布式搜索(Performing a distributed search through spark-solr)

通过spark-solr执行分布式搜索(Performing a distributed search through spark-solr)

我正在使用spark-solr来执行Solr查询。 但是,我的搜索不能正常工作,因为由于某些原因,由spark生成的请求阻止了搜索的分发。 我通过查看Solr日志发现了这一点,我发现在发送的请求中添加了distrib=false参数。 当用distrib=true手动执行查询(不使用spark)时,结果很好。

我试图通过更改options字典中的"solr.params"值(我正在使用pyspark )来设置spark所发送的参数:

options = {
    "collection": "collection_name",
    "zkhost": "server:port",
    "solr.params": "distrib=true"
}

spark.read.format("solr").options(**options).load().show()

此更改没有任何影响:我仍然在日志中看到distrib=false参数正在发送。 通过"solr.params"键传递的其他参数(例如fq=something )对结果有影响。 但看起来火花坚持发送distrib=false不管我做什么。

我如何通过spark-solr强制进行分布式搜索?


I'm using spark-solr in order to perform Solr queries. However, my searches don't work as they're supposed to because for some reason the requests being generated by spark prevent the searches from being distributed. I have discovered it by looking at the Solr logs where I saw that a distrib=false parameter is added to the sent requests. When executing the queries manually (not using spark) with distrib=true the results were fine.

I was trying to set the parameters sent by spark by changing the "solr.params" value in the options dictionary (I'm using pyspark):

options = {
    "collection": "collection_name",
    "zkhost": "server:port",
    "solr.params": "distrib=true"
}

spark.read.format("solr").options(**options).load().show()

This change did not have any effect: I still see in the logs that a distrib=false parameter is being sent. Other parameters passed through the "solr.params" key (such as fq=something) do have an effect on the results. But it looks like spark insists on sending distrib=false no matter what I do.

How do I force a distributed search through spark-solr?


原文:https://stackoverflow.com/questions/42420295
更新时间:2024-02-20 09:02

相关问答

更多
  • 是的,可以在TFS 2010中运行TFS 2008构建定义。 您可以使用特殊的升级过程来允许TFS 2010中的TFS 2008构建定义。 Yes, it is possible to run a TFS 2008 build definition in TFS 2010. You can use a special upgrade process to allow TFS 2008 build definitions in TFS 2010.
  • 理想情况下,您应首先创建最高分支(Accp),然后应将该文件夹分支到Test,然后将Test分支到DEV,这将设置您的层次结构,TFS将知道哪些分支具有父>子关系。 根据您的描述,您已在Windows资源管理器中创建了文件夹,然后将它们添加到TFS,因此TFS没有关于这些文件夹/分支之间关系的信息 Ideally you should create your highest branch first (Accp), you should then branch that folder to Test and ...
  • 在源代码管理资源管理器中,按CTRL + G。 这将显示“查找更改集”对话框。 不幸的是,它在VS 2008中是一种适合的方式:即使你已经知道数字,你必须在一个笨重的搜索对话框中工作。 在您的情况下,翻转单选按钮以按范围进行搜索,然后将所需的更改集编号作为范围的开始和结束。 该对话框的VS 2010版本简化了“查找单个变更集#”用例,FWIW。 我的个人喜好:如果你有一个控制台窗口打开,有一个更快的路线。 只需输入tf changeset 12345 。 如果使用电动工具,则可以使用“Get-TfsChan ...
  • 您描述的两种方式与Team Foundation Server 2010完全相同。就地升级也会自动升级您的实际数据库。 升级数据库需要相当长的时间,具体取决于数据库的大小。 确保在您的停机时间估算中计划。 如果可能,将服务器复制到可以站起来进行测试运行的VM。 它可以为您的信心创造奇迹,并有助于在问题发生之前将问题隔离开来。 最重要的是你在开始之前备份所有东西。 并不是说会出错,但如果需要的话,你希望能够回到原点。 对于现有服务器,我建议重新显示服务器,以便您可以在有限的时间内快速轻松地恢复功能。 至于流程 ...
  • 您可以使用TF MERGE / DISCARD选项 http://blogs.msdn.com/b/mohamedg/archive/2009/03/09/how-to-use-tf-merge-discard.aspx You can use the TF MERGE /DISCARD option http://blogs.msdn.com/b/mohamedg/archive/2009/03/09/how-to-use-tf-merge-discard.aspx
  • 这不可能。 之前在MSDN论坛上询问了确切的问题,您可以在这里阅读所有答案。 正如Arun所说,TFS 2010安装程序会检查计算机上是否安装了以前版本的TFS,如果检测到以前的版本,则不允许您安装TFS 2010。 有许多原因导致无法并排安装TFS 2008和TFS 2010。 其中之一就是两者都在创建一个名为“Team Foundation Server”的IIS网站。 问候, --Vladimir This is not possible. The exact question was asked b ...
  • 我不认为可以从TFS 2010指向TFS 2008数据库。 我们也迁移了TFS 2005/2008。 我们安装了全新的TFS 2010,并将旧项目迁移到新的TFS 2010中。 TFS2005 / 2008中项目的所有文件都设置为只读,工作项历史记录和变更集将迁移到新的TFS2010中。 我们决定也切换流程模板,因此我们使用Scrum模板创建了另一个团队项目。 然后将源和所有需要的文件复制到新的Scrum团队项目中。 现在,如果我让我在源代码管理下显示项目的历史记录,它会显示每个项目开始之前的历史记录(指向 ...
  • 它似乎是由先前被删除的“复活”文件(以及使用相同名称创建的另一个文件)引起的。 参考 it appears this was caused by a "resurrected" file that had previously been deleted (and another file created using the same name). reference
  • 如果选择合并,将打开以下对话框: 如果你只是选择“下一步”并保留默认设置=“所有更改都达到特定版本”,TFS将考虑你的两个变更集(1和2):换句话说,它将检查出中的Testfile.cs目标分支并编辑第5行和第13行。 如果选择“选定的变更集”(如上图所示),则会出现另一个对话框,您可以在其中选择您真正希望参与合并的候选变更集。 因此,如果您现在选择变更集2,TFS将检查目标分支中的Testfile.cs并仅编辑第13行。 你所描述的“手动”合并,是 - 对不起,这是一种可怕的做法。 编辑 在您的问题高级场 ...
  • 在TFS中没有默认的迁移变更集的方法,您需要第三方工具,如OpsHub (某些功能不是免费的),以迁移最常请求的数据。 检查: http : //www.opshub.com/products/opshub-visual-studio-migration-utility/ 或者您可以考虑从TFS 2010升级到TFS 2015,这是一个完整的数据传输。 要了解影响升级复杂性的因素, 请检查要求并查看升级过程 。 了解干运行是否对您有意义,并权衡执行预生产升级的好处和成本。 当您准备升级时,使用TfsPreU ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。