问题标签 [lucene.net]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
asp.net - 何时使用 Lucene.NET 更新索引?异步与否?
通常是否足够快以同步进行简单更新?例如,对于一个 ASP.NET Web 应用程序,如果我更改此人的姓名......作为“保存”机制的一部分同步更新索引是否会有任何问题?
或者是让其他异步过程进行索引更新的唯一安全方法?
.net - 使用 MultiFieldQueryParser 时,Lucene 中哪个字段有我的搜索文本?
我正在使用Lucene.Net 的 MultiFieldQueryParser在我的文档中搜索多个字段。我想找出找到文本的字段。例如,我的搜索可能如下所示:
我想确定是否在答案或问题字段中找到了搜索短语
lucene - 对多个请求使用相同的 indexSearcher 实例时出现问题
我在 .net Web 应用程序中使用 Lucene API。我想对所有请求使用相同的 Indexsearcher 实例。因此我将 indexsearcher 实例存储在 http 缓存中。
这是我的代码:
当我执行下面的语句时,我得到一个运行时错误:“对象引用未设置为对象的实例。”
点击 hits = searcher.Search(myQuery);
我在这里想念什么?
谢谢阅读!
lucene - 跨多个应用服务器同步 Lucene.net 索引
我们正在为企业 Web 应用程序设计搜索架构。我们将为此使用 Lucene.net。索引不会很大(大约 100,000 个文档),但搜索服务必须始终处于运行状态并且始终处于最新状态。将一直有新文档添加到索引和并发搜索。由于我们必须为搜索系统提供高可用性,因此我们有 2 个应用程序服务器,它们公开 WCF 服务来执行搜索和索引(服务的副本在每个服务器中运行)。然后服务器使用 lucene.net API 来访问索引。
问题是,保持索引始终同步的最佳解决方案是什么?我们考虑了几个选项:
使用一台服务器进行索引并让第二台服务器通过 SMB 访问索引:不行,因为我们有单点故障情况;
对两台服务器建立索引,基本上每个索引都写入两次:可能性能很差,并且可能会出现不同步,例如。服务器 1 索引正常,服务器 2 磁盘空间不足或其他什么;
使用 SOLR 或 KATTA 包装对索引的访问:不,我们不能在服务器上运行 tomcat 或类似的东西,我们只有 IIS。
将索引存储在数据库中:我发现这可以使用 Lucene 的 java 版本(JdbcDirectory 模块)来完成,但我找不到与 Lucene.net 类似的任何东西。即使这意味着对性能的小幅影响,我们也会选择这个选项,因为它可以干净地解决最小开发的并发和同步问题。
使用 Lucene.net DistributedSearch contrib 模块:我无法提交包含有关此文档的单个链接。通过查看代码我什至不知道这段代码做了什么,但在我看来,它实际上将索引拆分到多台机器上,这不是我们想要的。
rsync 和朋友,在 2 个服务器之间来回复制索引:这对我们来说感觉很骇人且容易出错,而且,如果索引变大,可能需要一段时间,在此期间我们将返回损坏或不一致数据给客户端,所以我们必须制定一些我们不希望的临时锁定策略。
我知道这是一个复杂的问题,但我相信很多人以前都遇到过。欢迎任何帮助!
lucene - 使用 Lucene 的 MultiSearcher 类的优缺点
我正在将 Lucene 搜索 API 用于 .net Web 应用程序。我能知道使用 MultiSearcher 的优缺点吗?我应该在什么场景下使用它?
谢谢阅读!
svn - 如何快速搜索 subversion 存储库?
我们正在考虑使用 Lucene.Net 编写一个站点来搜索我们的 Subversion 存储库,但在我们这样做之前,是否有其他人已经解决了这个问题?对于我们的私有源代码,像谷歌这样的东西会很棒。
lucene - 使用 Lucene 搜索 API 查找完全匹配
我正在使用 Lucene 开发公司搜索 API。我的 Lucene 公司索引有 2 家公司:1.Abigail Adams National Bancorp, Inc. 2.National Bancorp
如果用户键入 National Bancorp,则只应返回公司#2(即 National Bancorp)而不是#1.....即。只应返回完全匹配。如何实现此功能?
谢谢阅读。
lucene.net - Best practices for combining Lucene.NET and a relational database?
I'm working on a project where I will have a LOT of data, and it will be searchable by several forms that are very efficiently expressed as SQL Queries, but it also needs to be searched via natural language processing.
My plan is to build an index using Lucene for this form of search.
My question is that if I do this, and perform a search, Lucene will then return the ID's of matching documents in the index, I then have to lookup these entities from the relational database.
This could be done in two ways (That I can think of so far):
- N amount of queries (Horrible)
- Pass all the ID's to a stored procedure at once (Perhaps as a comma delimited parameter). This has the downside of being limited to the max parameter size, and the slow performance of a UDF to split the string into a temporary table.
I'm almost tempted to mirror everything into lucenes index, so that I can periodicly generate the index from the backing store, but only need to access it for the frontend.
Advice?
indexing - 如何识别文件夹中是否存在 Lucene.Net 索引?
我正在使用 Lucene.Net 来索引和搜索文档,并且我正在使用以下代码来创建或打开索引(如果存在):
现在,如何IndexExists
以简单的方式实现?我不需要抛出任何异常。
.net - Lucene.Net 最佳实践
使用 Lucene.Net 的最佳实践是什么?或者我在哪里可以找到一个好的 lucene.net 使用示例?