gpt4 book ai didi

performance - 缓慢的 Lucene.Net 搜索性能

转载 作者:行者123 更新时间:2023-12-04 06:54:49 29 4
gpt4 key购买 nike

使用 Lucene.Net 面临缓慢的搜索性能(+ NHibernate.Search 但没关系)。

Luke 工具箱概述:

  • 字段数:33
  • 文档数:5607
  • 条款数:101377
  • 有删减吗?/优化?:是 (97478)/否

  • 索引目录是 ~200Mb 大。

    查询(使用 org.apache.lucene.analysis.SimpleAnalyzer)

    Title:lapsa~0.5 Abstract:lapsa~0.5 Content:lapsa~0.5 Location:lapsa~0.5 Author:lapsa~0.5



    平均需要约 60000 毫秒。

    我怀疑我遗漏了一些重要的东西。任何想法有什么问题?不能说这是正常的。

    试图“检查”和“修复”它们。必须打勾 Don't open IndexReader (when opening corrupted index) , 否则 Check index tool不想出现。

    检查结果:

    BAD: missingSegments



    诊断输出:

    ERROR: could not read any segments file in directory java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@D:\Temp\Index: files: at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:655) at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:538) at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:306) at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:340) at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:319) at org.getopt.luke.Luke$6.run(Unknown Source)



    试图按 Fix Index .明白啦:

    ERROR during Fix Index: java.lang.NullPointerException at org.apache.lucene.index.CheckIndex.fixIndex(CheckIndex.java:781) at org.getopt.luke.Luke$7.run(Unknown Source)

    最佳答案

    在我看来,您的索引已损坏。您的 D:\Temp\Index 文件夹中是否有任何文件?我认为必须有,否则搜索根本不起作用...您使用的是什么版本的 Lucene.Net?以前的版本过去常常为我破坏索引,但后来的版本在这方面似乎要好得多。

    如果您无法弄清楚,您可能只需要从头开始重建索引。

    关于performance - 缓慢的 Lucene.Net 搜索性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2683008/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com