You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2016/03/08 16:36:40 UTC
[jira] [Commented] (SOLR-8802) Make remaining mutable Queries
immutable
[ https://issues.apache.org/jira/browse/SOLR-8802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185093#comment-15185093 ]
Yonik Seeley commented on SOLR-8802:
------------------------------------
This really isn't as much of an issue / requirement for Solr... we've never modified queries after we use them, and it would be an error to do so.
> Make remaining mutable Queries immutable
> ----------------------------------------
>
> Key: SOLR-8802
> URL: https://issues.apache.org/jira/browse/SOLR-8802
> Project: Solr
> Issue Type: Improvement
> Reporter: Luc Vanlerberghe
> Priority: Minor
>
> See LUCENE-6531
> Mutable queries are an issue for automatic filter caching since modifying a query after it has been put into the cache will corrupt the cache. We should make all queries immutable (up to the boost) to avoid this issue.
> Since they are part of the public API I would suggest splitting them 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.
> * solr/core:
> ** org.apache.solr.search.ExtendedQueryBase: Several derived classes, among which:
> ** org.apache.solr.query.FilterQuery
> ** org.apache.solr.query.SolrRangeQuery (marked as @lucene.experimental)
> ** org.apache.solr.search.RankQuery (marked in comment as experimental, but not its derived classes)
> ** org.apache.solr.search.WrappedQuery
> ** org.apache.solr.search.join.GraphQuery (marked as @lucene.experimental)
> ** org.apache.solr.search.SolrConstantScoreQuery (marked in comment as experimental, but not the derived FunctionRangeQuery)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org