SolrNet:索引时 synonym.txt 文件的大小会成为问题吗?
我的索引最初运行良好。然后,我将架构更改为在索引时使用 SynonymFilterFactory。我的 synonym.txt 文件有 1.27MB。从那时起,每当我尝试使用同义词重新索引时,我都会收到此随机“请求已中止:请求已取消”。错误。
奇怪的是,有些项目被索引,有些则没有。我只是不明白问题出在哪里。唯一的区别是 Synonymfilter 的使用。 synonym.txt 的格式很好。由于几乎所有项目在引发错误之前都会获取索引,因此我不能说架构有问题。
那么 synonym.txt 的大小会导致索引时出错吗?任何提示、建议将不胜感激。
My indexing was working fine initially. I then changed my schema to use SynonymFilterFactory while indexing. My synonym.txt file is 1.27MB. Since then whenever I have tried to reindex using synonym, I get this random "The request was aborted: The request was canceled." error.
It is strange that some of the items were indexed and some were not. I just can't figure out what the issue is. The only difference is the usage of Synonymfilter. the format of synonym.txt is fine. Since almost of the items do get index before the error is thrown, I can't say that there is something wrong with the schema.
So can the size of synonym.txt result in an error at index time? Any tips, suggestions will be highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该错误意味着 SolrNet 在向 Solr 发送文档时超时。如果您在索引时扩展同义词(您可以在查询时执行此操作,甚至两者都执行),则同义词文件很大这一事实是相关的,因为 Solr 分析输入数据将花费更长的时间。
不过,我怀疑单个文档是否会超时。如果确实如此,您唯一能做的就是增加超时时间。如果您一次发送多个文档(很可能),则必须减少一次发送的文档数量,即发送更多但小批量的文档。
The error means that SolrNet is timing out when sending documents to Solr. The fact that your synonym file is large is relevant if you're expanding synonyms at index-time (you can do it at query-time instead, or even both), since it will take longer for Solr to analyze the input data.
Still, I doubt that it will time out for a single document. If it does, the only thing you can do is increasing the timeout. If you're sending multiple documents at once (most likely), you'll have to use decrease the amount of documents sent at once, i.e. send more but smaller batches of documents.