简体   繁体   中英

lucene: store queries on disk/persist queries

I'm new to Lucene (4.7.1) so I apologise if this is a silly question.

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 . Moreover, String representation should consume less storage space. More details are also available here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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