我正在尝试在Lucene中调试索引文档,我需要查看索引的内容,以便我可以确切地看到文档是如何编入索引的.据说Luke做到了这一点,但是没有任何文档,当我把它指向索引目录时(在任何一个,虽然我不知道为什么它无法弄清楚哪一个是正确的) ,我一无所获.当然有一些简单的方法可以做到这一点?
我在http://code.google.com/p/luke/downloads/list上下载了"Lukeall-3.5.0" 这是一个JAR文件,但我不知道它是如何工作的?有人能告诉我运行卢克的详细步骤吗?谢谢!
我想在luke中为luncene索引文档启动一个查询.我想在获取结果之前对结果进行排序.什么是用于对数据进行排序的lucene语法.我不需要特定于java /或语言的代码来排序; 而是原始的lucene语法来排序数据?
任何人都可以给我一个示例,按2个字段按降序排序吗?
干杯
我有一个使用apache solr 1.4的现有索引构建.
我想在版本3.3中使用此现有索引.如您所知,索引格式在3.x之后更改,那么如何才能执行此操作?
我使用Luke to XML导出了现有索引(即1.4版本).
在使用大约16GB的索引文件写入索引文件之后,使用Lucene的索引器似乎在索引操作期间崩溃.
写入控制台的堆栈跟踪重复三次,原因我不知道.为简洁起见,我只提供了重复的单个部分.这是Lucene写给conolse的堆栈跟踪:
Lucene.Net.Index.MergePolicy+MergeException: Exception of type 'Lucene.Net.Index.MergePolicy+MergeException' was thrown. --->
System.IO.FileNotFoundException: Could not find file 'PATH_TO_MY_INDEX_DIRECTORY\_xx.cfs'.
File name: 'PATH_TO_MY_INDEX_DIRECTORY\_xx.cfs'
at Lucene.Net.Index.IndexWriter.HandleMergeException(Exception t, OneMerge merge)
at Lucene.Net.Index.IndexWriter.Merge(OneMerge merge)
at Lucene.Net.Index.ConcurrentMergeScheduler.MergeThread.Run()
--- End of inner exception stack trace ---
at Lucene.Net.Index.ConcurrentMergeScheduler.HandleMergeException(Exception exc)
at Lucene.Net.Index.ConcurrentMergeScheduler.MergeThread.Run()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Run Code Online (Sandbox Code Playgroud)
当我用Luke的Java版本打开生成的日志时,索引被删除(可能是因为它已损坏,例如"write.lock"文件仍然存在),尽管这可能是Luke的错误或错误配置.
创建这个索引大约需要36个小时,而且我不想第三次再次这样做(这不是第一次发生).
我不知道是什么造成了这个.我能做什么?
我正在使用Lucene.net 2.9.2,因为它是为.NET 3.5构建的最后一个版本.
我正在尝试学习和理解 lucene 是如何工作的,lucene 索引里面有什么。基本上我想看看数据在 lucene 索引中是如何表示的?
我用作lucene-core 8.6.0
依赖项
下面是我非常基本的 Lucene 代码
private Document create(File file) throws IOException {
Document document = new Document();
Field field = new Field("contents", new FileReader(file), TextField.TYPE_NOT_STORED);
Field fieldPath = new Field("path", file.getAbsolutePath(), TextField.TYPE_STORED);
Field fieldName = new Field("name", file.getName(), TextField.TYPE_STORED);
document.add(field);
document.add(fieldPath);
document.add(fieldName);
//Create analyzer
Analyzer analyzer = new StandardAnalyzer();
//Create IndexWriter pass the analyzer
Path indexPath = Files.createTempDirectory("tempIndex");
Directory directory = FSDirectory.open(indexPath);
IndexWriterConfig indexWriterCOnfig = new IndexWriterConfig(analyzer);
IndexWriter iwriter = new IndexWriter(directory, …
Run Code Online (Sandbox Code Playgroud) 所以我第一次尝试使用Luke,我遇到了一些麻烦.我指向我想要的目录,但看到这个:
org.apache.lucene.index.IndexFormatTooNewException:不支持格式化版本(资源:SimpleFSIndexInput(path ="C:\ Users*me*\Chat Data\chat-data\index\segments.gen")): - (需要介于-2和-2之间)
有谁知道如何解决这一问题?这是兼容性问题吗?我迷路了.
如何用luke打开弹性搜索索引?
我尝试从3.5到4.8,使用elasticsearch 1.1到1.2,似乎没有任何工作.
似乎唯一适用的资源是http://rosssimpson.com/blog/2014/05/06/using-luke-with-elasticsearch/,遗憾的是它不起作用.
如何使用Luke检查我的solr索引?我试着指向我的索引位置(solr/core1/data/index).但是我收到了错误
Unknown format version: -12
Run Code Online (Sandbox Code Playgroud) 我正在努力了解Lucene,并希望用Luke来研究它.我尝试使用Lucene 4.3中的IndexFiles演示构建索引,然后尝试使用最新版本的Luke查看索引,并且我收到消息:
Invalid directory at the location, check console for more information. Last exception:
org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource: ChecksumIndexInput(MMapIndexInput(path="/home/lavin/sep20.index/segments_2"))): 1 (needs to be between 0 and 0)
Run Code Online (Sandbox Code Playgroud)
任何想法有什么问题以及如何解决?我的Lucene版本对Luke来说是否太新了?有没有办法告诉Lucene写一个旧版索引?提前谢谢, - 马克