lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vanlerberghe, Luc" <>
Subject Solr/Lucene 6.x: Multiple public Query classes not immutable (yet)
Date Thu, 03 Mar 2016 10:23:23 GMT

While checking how to migrate my custom components from lucene/solr 5.1 to 6.x I stumbled
upon the fact that is not immutable like most other implementations
(see e.g.:

Since it is part of the public API I would suggest splitting it in an immutable class and
a builder like was done for most other Queries *before* releasing an official 6.x version.

I did a quick scan through all derived classes of Query and I compiled the following list
(ignoring sources in test or contrib folders)
Some of them are already marked as experimental (but should perhaps receive the "official"
@lucene.experimental tag ?)
For some it's possibly not an issue since they should never end up in a filter cache (like
MoreLikeThisQuery ?), but then a comment specifying the exception to the rule should perhaps
be added.

I'll probably already have a go at the MultiPhraseQuery case shortly and create a JIRA issue
with a PR for it.

Luc Vanlerberghe


- org.apache.lucene.queries.CommonTermsQuery
- org.apache.lucene.queries.CustomScoreQuery (marked as @lucene.experimental)
- org.apache.lucene.queries.mlt.MoreLikeThisQuery

- (marked as @lucene.experimental)

- org.apache.lucene.facet.DrillDownQuery (marked as @lucene.experimental)

  Several derived classes, among which:
  - org.apache.solr.query.FilterQuery
  - org.apache.solr.query.SolrRangeQuery (marked as @lucene.experimental)
  - (marked in comment as experimental, but not its derived
- (marked as @lucene.experimental)
- (marked in comment as experimental, but not
the derived FunctionRangeQuery)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message