当我尝试保存项目时,收到“未找到字段:'Store.COMPRESS'”错误。
之前我收到 Lucene 版本 2.9.4.1 的 Lucene 版本错误,因此我更新了 web.config 中的以下设置>:
<dependentAssembly>
<assemblyIdentity name="Lucene.Net" publicKeyToken="85089178b9ac3181"/>
<bindingRedirect oldVersion="0.0.0.0-2.9.4.0" newVersion="3.0.3.0"/>
</dependentAssembly>
至
<dependentAssembly>
<assemblyIdentity name="Lucene.Net" publicKeyToken="85089178b9ac3181"/>
<bindingRedirect oldVersion="0.0.0.0-2.9.4.1" newVersion="3.0.3.0"/>
</dependentAssembly>
-维克拉姆
最佳答案
Store.COMPRESS 是 Lucene 2.x 的一项功能,3.x 不再支持。您的程序集重定向绑定(bind)仅修复绑定(bind),而不是 Lucene 的实际实现。
在我看来,您的解决方案中运行着 Lucene 2.x 代码;需要针对 Lucene 3.x 进行升级/重写。
Field.Store 的 Javadoc:http://lucene.apache.org/core/2_9_4/api/core/org/apache/lucene/document/Field.Store.html
请注意,它现在列为已弃用。
关于asp.net - 项目保存时出错 - 未找到字段 : 'Store.COMPRESS' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24238962/