问题标签 [linq-to-lucene]

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.

0 投票
1 回答
157 浏览

asp.net-mvc - 类型存在于两个库中

我正在尝试将Linq 与 Lucene合并到我的 Asp.net-mvc 项目中。
与大多数 Web 项目一样,我使用放在我的个人帮助程序库中的PagedList类型并在所有地方使用它。
但是 Linq to Lucene 也是如此......由于我的库和 L2L 库都希望将 PagedList 类型添加到 System.Collections.Generic 命名空间,因此我收到一条冲突消息。

有没有办法解决这个冲突而不必重写我的项目或 L2L 项目?

0 投票
1 回答
1215 浏览

c# - Linq to Lucene:“Lucene Term 的谓词不能是空字符串。”

我正在尝试在我的项目中实现 Linq To Lucene,但是在尝试搜索某些内容时,我总是得到一个Enumeration yielded no results结果,当我调试并尝试[IndexContext].[TableProperty]Watch窗口中打开我时,我收到以下消息:

Lucene Term 的谓词不能是空字符串。

我曾尝试在 Google 中搜索此内容,但显然它没有返回任何结果!

有没有人遇到过这个消息?我该如何解决?因为目前它没有返回任何数据

[更新]

显然问题是当Between我使用. 举个例子:MatchLikeLucine.Linq.Extensions

以下查询返回结果:db.Artists.Where(a => a.Name == "Camel");

但是这个没有:db.Artists.Where(a => a.Search("Camel"));

[更新]

经过进一步测试,我意识到Match扩展方法确实返回了结果,而其他方法 ( Search, Like) 没有。我仍在为这个问题而苦苦挣扎

0 投票
1 回答
268 浏览

c# - 将 LinqToLucene 与 NHibernate 和 NHibernate.Search 一起使用

是否有人已经将LinqToLucene与 NHibernate.Search 一起使用?

如何开始?

谢谢。

0 投票
1 回答
483 浏览

asp.net - 正确的 LINQ to Lucene 索引ASP.NET 的使用模式?

LINQ to Lucene 的正确使用模式是Index<T>什么?

它实现IDisposible了,所以我认为将它包装在 using 语句中最有意义:

我偶尔会遇到意外删除磁盘上的索引的情况。如果索引的多个实例同时存在,似乎 100% 的时间会发生。我使用 PLINQ 编写了一个测试以并行运行 2 个搜索,并且 1 个搜索有效,而另一个返回 0 个结果,因为索引已清空。

  • 我应该改用单个静态实例吗?
  • 我应该把它包起来Lazy<T>吗?
  • 当多个用户同时访问静态索引时,我是否会对其他问题敞开心扉?

我还想根据需要定期重新索引,可能使用另一个进程,如 Windows 服务。如果用户在重建索引时搜索,我是否也会遇到问题?

0 投票
1 回答
481 浏览

.net - 有没有使用 Lucene.Net.Linq 和数据库(EF)?

文档中没有数据库使用示例

我知道 lib LinqToLucene,但我想尝试 Lucene.Net.Linq。

请帮我找到任何例子。

0 投票
0 回答
62 浏览

c# - c# LinqToLucene 索引每次都重新创建

我正在尝试使用 LinqToLucene。该索引保存在 Ram 中,并在每次重新编译应用程序时重新生成。这样,上传我网站的新版本需要几分钟的停机时间。有没有更好的方法可以将索引保存在不必每次都重新创建的地方?

0 投票
2 回答
2955 浏览

linq-to-lucene - difference between LinqToLucene and Lucene.Net.Linq

  1. Are the LinqToLucene and the Lucene.Net.Linq projects different?
  2. What are the pros and cons of each of them?
  3. Since I found Lucene.Net.Linq to be updated more recently relative to LinqToLucene and it is available in nuget I want to use it in my simple project, but I came across lack of documentation and I can't find how can I use lucene advanced queries with this package like what are possible in LinqToLucene for example:

    If this extension functions aren't available then what is the point of this project?

  4. If it is not the point how can i use advance queries in LINQ to Lucene.Net?
0 投票
0 回答
127 浏览

c# - 将 Linq 中的错误映射到 Lucene.Net

我有以下用于 Linq TO Lucene 的文档规范

问题是当我尝试像这样使用它时

问题是当我执行此代码时,出现以下错误

System.Collections.Generic.IList`1[Doc1] 类型的属性事件无法从 System.String 转换

请问有没有其他方法可以做到这一点

提前致谢

这是完整的堆栈跟踪