简体   繁体   English

lucene:将查询存储在磁盘上/持久查询

[英]lucene: store queries on disk/persist queries

I'm new to Lucene (4.7.1) so I apologise if this is a silly question. 我是Lucene(4.7.1)的新手,所以如果这是一个愚蠢的问题,我深表歉意。

What is the best way for me to store the queries to persist them across sessions? 对我而言,存储查询以在会话之间持久化查询的最佳方法是什么? Should I leave them as strings in a DB or is it better to store them as Query objects? 我应该将它们作为字符串保留在数据库中还是最好将它们存储为查询对象?

Store them as strings. 将它们存储为字符串。

Queries are no longer Serializable , although they used to be . 查询不再是可 Serializable ,尽管以前是可 Serializable Moreover, String representation should consume less storage space. 此外, String表示应消耗更少的存储空间。 More details are also available here . 更多详细信息也可以在这里找到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM