![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lucene
Jasonfong436
这个作者很懒,什么都没留下…
展开
-
使用lucene4.6进行排序时报错:java.lang.IllegalArgumentException: after must be a FieldDoc; got doc=411 score=1
我的lucene 4.6的分页、排序代码是: private ScoreDoc getLastScoreDoc(int pageNum,int pageRecord,Query query,IndexSearcher searcher,Sort sort) throws IOException { if(pageNum==1)return null;//如果是第一页就返回原创 2017-06-08 16:35:59 · 1099 阅读 · 0 评论 -
lucene使用IndexWriter时遇到LockObtainFailedException: Lock obtain timed out 异常原因及解决办法
问题原因:IndexWriter原因是在上一次使用该对象进行索引写入的时候,并没有完全关闭资源—表现为写索引的目录下有名称类似“lock”(一般在最后一行)的文件,即witer对象处在锁状态,可能是为了避免同时写入导致数据出错。解决办法:在写索引的方法中,使用finally语句块将IndexWriter关闭。indexWriter.close();原创 2017-11-20 17:35:11 · 4923 阅读 · 0 评论