Reputation: 39138
Are Lucene's Query objects reusable/stateless ?
Query
If not, will clone()ing a TermQuery be faster than rebuilding it ?
clone()
TermQuery
Upvotes: 6
Views: 395
Reputation: 3195
yes: The purpose of Weight is to ensure searching does not modify a Query, so that a Query instance can be reused.
Upvotes: 1