我使用的是Lucene.net 3.0.3.0(现在是最新版本)。我想知道在生产环境中使用单个实例IndexWriter和IndexSearcher是否是一个很好的选择(考虑到线程安全)。我在文档中看到,为这些实例创建新对象是一项昂贵的操作,而在内部lucene很好地处理并发请求。
这是一个向在生产环境中使用lucene.net的人提出的问题,请告诉我这是否可行!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Luce
我的示例代码是:
Searchable[] remoteSearch = new Searchable[sindexes.Length];
for (int i = 0; i < sindexes.Length; i++)
{
if(sindexes[i].Trim().Length>0)
remoteSearch[i] = new IndexSearcher(sindexes[i]);
}
基本上,我有一个非常简单的数据库,我想用Lucene来建立索引。域包括:
// Person domain
class Person {
Set<Pair> keys;
}
// Pair domain
class Pair {
KeyItem keyItem;
String value;
}
// KeyItem domain, name is unique field within the DB (!!)
class KeyItem{
String name;
}
我有数以千万计的配置文件和数以亿计的配对,然而,由于大多数KeyItem的"name“
我正在做一些测试,当我用我已经工作过的searcher运行测试时,出现了这个错误 System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> OpenQA.Selenium.ElementNotInteractableException : element not interactable 然后我试着运行一个测试,我知道它是有效的,当使用搜索器的时候,同样的错误出现了,它有点奇怪,因为我在HTML代码中看不到任何差异,如果我