首页 \ 问答 \ 需要SOLR和PHP帮助(SOLR and PHP help needed)

需要SOLR和PHP帮助(SOLR and PHP help needed)

我已经了解了如何将xml文件添加到SOLR并能够通过SOLR ADMIN接口搜索它们...

我需要知道,如何使SOLR与PHP一起工作,并索引MYSQL记录......

这就是我想要做的:我有一个mysql table ,我想添加到SOLR (索引它),所以我不是直接通过PHP搜索MYSQL表,而是首先使用querystring ,将其发送给SOLR,然后SOLR以ID:nrs形式发回结果,然后使用ID:s查询mysql并获取正确的记录......

我不知道如何使用PHP与SOLR通信,任何帮助表示赞赏!

谢谢


I have understood how to add xml files to SOLR and be able to search them via the SOLR ADMIN interface...

I need to know however, how to make SOLR work with PHP, and index MYSQL records...

This is what I want to do: I have a mysql table, which I would like to add to SOLR (index it), so that instead of searching the MYSQL table directly via PHP, I first take the querystring, send it to SOLR, and then SOLR sends back results in form of ID:nrs, then use the ID:s to query mysql and fetch proper records...

I have no clue on how to communicate with SOLR using PHP, any help is appreciated!

Thanks


原文:https://stackoverflow.com/questions/2082928
更新时间:2023-04-16 12:04

最满意答案

您可以尝试www.winhost.com,如下所述:

如何在共享托管环境中运行RavenDB?

它具有所需的完全信任允许 ,这是RavenDB应该寻找的东西,以避免当前的安全权限问题...

注意:我刚尝试过这个主机并且可以确认它在完全信任的RavenDB中运行良好...... :-)


You can try www.winhost.com as described here:

How can I run RavenDB in a shared hosting environment?

It has the so desired Full Trust Allowed which is something one should look for in the case of RavenDB to avoid the current security permissions problems...

NOTE: I just tried this host and can confirm that it works great with RavenDB in Full Trust... :-)

相关问答

更多
  • 没有区别,导入/导出使用与走私者相同的代码 There is no difference, Import/Export uses the same code as smuggler
  • 尝试检查RavenOverflow 。 在那里,我有一个假数据的FakeData项目(硬编码和随机生成)。 然后可以在我的测试项目或主网站中使用它 :) 这是一些示例代码...... if (isDataToBeSeeded) { HelperUtilities.CreateSeedData(documentStore); } .... public static void CreateSeedData(IDocumentStore documentStore) { Condition.R ...
  • 区别在于,在第一种情况下,您在投影之前已经有了一个ToList()调用。 因此,LINQ提供商唯一需要担心的是Where调用。 它将获取每个Contact 所有数据,然后在LINQ to Objects中进行投影。 在你的第二个代码中, Select调用也需要由LINQ提供程序处理 - 并且可能是它没有做正确的事情。 所以是的,这听起来像是RavenDB LINQ提供程序中的一个错误,在Select handling中。 请注意,强制其余查询在LINQ to Objects中执行的另一种方法是使用AsEnu ...
  • 你真的设置了SENTRY_DNS或SENTRY_DSN吗? 设置SENTRY_DSN时,主要配置变量的实例化会自动发生(包括SENTRY_SERVERS , SENTRY_PUBLIC_KEY , SENTRY_SECRET_KEY和SENTRY_PROJECT ) Were you really setting SENTRY_DNS or SENTRY_DSN? When you set SENTRY_DSN the instantiation of the major config variables ...
  • Raven可以做很多事情,无法在简单的linq查询中表达。 例如,Map / Reduce,Multimap,Transformation,自定义分析等等。 此外,Joachim的观点是正确的 - 表达需要新动态索引的查询的第一个用户将获得命中。 要么他们不会得到合理数量的数据,要么你明确等待非陈旧结果,他们将等待很长时间。 动态查询非常适合快速原型设计,但在某些时候,您应该回顾实际构建的内容并考虑为这些操作创建静态索引。 There are a ton of things that Raven can d ...
  • 我刚刚为我当前的项目做了这个。 我将数据分成几块,并将每个块保存在一个新的会话中。 这也可能对你有用。 请注意,此示例一次显示1024个文档的分块,但在我们确定值得分块之前需要至少2000个。 到目前为止,我的插件在块大小为4096时获得了最佳性能。我认为这是因为我的文档相对较小。 internal static void WriteObjectList(List objectList) { int numberOfObjectsThatWarrantChunking = 2000; ...
  • 看看Knockout-mapping-plugin 。 它将通过一次调用“自动”生成与淘汰兼容的视图模型。 你会做的事情 var viewModel.myRavenDbData = ko.mapping.fromJSON(json data variable); var unwrappedData = viewModel.myRavenDbData(); // need only if viewModel.myRavenDbData is an observable 在你有了这个工作之后,在调用映射和探索 ...
  • 您可以尝试www.winhost.com,如下所述: 如何在共享托管环境中运行RavenDB? 它具有所需的完全信任允许 ,这是RavenDB应该寻找的东西,以避免当前的安全权限问题... 注意:我刚尝试过这个主机并且可以确认它在完全信任的RavenDB中运行良好...... :-) You can try www.winhost.com as described here: How can I run RavenDB in a shared hosting environment? It has the ...
  • 实际上,Reduce会在结果上多次处理。 您的索引假定这只发生一次,并且可以访问整个结果集。 您的索引需要如下所示: public class VisitSummaryByDateIndex : AbstractMultiMapIndexCreationTask { public VisitSummaryByDateIndex() { AddMap(sessions => from s in sessions ...
  • 问题可能是陈旧的索引:最近创建了用户,索引没有机会更新。 (通常这需要几毫秒,但在大型数据库上可能需要更长时间。) 您可以在此处执行以下三项操作来解决问题: 选项1:根据电子邮件地址创建用户ID。 然后你根本不必乱用索引。 选项2:您可以保留用户ID,但等待非陈旧索引。 选项3:创建用户时,请等待索引更新。 我将在下面描述以下每个选项: 选项1: 使您的用户ID众所周知,这样您就不必拥有用户索引。 假设您的对象名为User。 注册用户时,您的代码将如下所示: public void RegisterUser ...

相关文章

更多

最新问答

更多
  • 获取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的基本操作命令。。。