gpt4 book ai didi

lucene - 避免 lucence QueryParser Parse 异常?

转载 作者:行者123 更新时间:2023-12-04 14:19:13 25 4
gpt4 key购买 nike

在第 3 行,我收到异常,例如“IOException:读取过去的 eof”和“LookaheadSuccess:应用程序中的错误”。
有什么办法可以避免这种情况吗?我讨厌每次执行搜索时中断并按两次继续

请注意,当我告诉 Visual Studios 向我展示即使被捕获也会抛出的异常时,我才会注意到这一点。我没有得到异常,我只是看到它们被抛出,因此每次搜索时都会抛出两个(或三个)断点。该应用程序运行良好。

var searcher = new IndexSearcher(directory, true);
var parser = new QueryParser(Lucene.Net.Util.Version.LUCENE_29, "all", 分析器);
var query = parser.Parse(text);//这里

最佳答案

这些是在 Lucene 中发生和捕获的第一次机会异常。您已将 Visual Studio 配置为中断所有异常,而不仅仅是那些未处理的异常。使用“异常(exception)”对话框 (ctrl-alt-e iirc) 并更改您的设置。

关于lucene - 避免 lucence QueryParser Parse 异常?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4523524/

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