Field.Store.COMPRESS in Lucene 3.0.2

2019-07-08 09:15发布

I am upgrading lucene 2.4.1 to 3.0.2 in my java web project in lucene API's i found that Field.Store.COMPRESS is not present in 3.0.2 so what i can use in place of Field.Store.COMPRESS? some time field data is so large that i have to compress that.

标签: lucene
1条回答
欢心
2楼-- · 2019-07-08 09:48

Lucene made the decision to not compress fields, as it was really slow, and not Lucene's forte. The Javadocs say:

Please use CompressionTools instead. For string fields that were previously indexed and stored using compression, the new way to achieve this is: First add the field indexed-only (no store) and additionally using the same field name as a binary, stored field with CompressionTools.compressString(java.lang.String).

查看更多
登录 后发表回答