Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUCENE-7064: Make MultiPhraseQuery immutable #19

Closed
wants to merge 3 commits into from

Conversation

LucVL
Copy link
Contributor

@LucVL LucVL commented Mar 3, 2016

This PR is based at the highest commit point common to master, branch_6x and branch_6_0 so it should be easy to merge with any or all of them.

My original mail to the dev list doesn't seem to get through, so I repeat it here:

While checking how to migrate my custom components from lucene/solr 5.1 to 6.x I stumbled upon the fact that oal.search.MultiPhraseQuery is not immutable like most other implementations (see e.g.: https://issues.apache.org/jira/browse/LUCENE-6531)

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

lucene/search:

  • org.apache.lucene.search.MultiPhraseQuery

lucene/queries:

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

lucene/suggest:

  • org.apache.lucene.search.suggest.document.ContextQuery (marked as @lucene.experimental)

lucene/facet:

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

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)

@asfgit asfgit closed this in 40aab73 Mar 4, 2016
asfgit pushed a commit that referenced this pull request Mar 4, 2016
asfgit pushed a commit that referenced this pull request Mar 4, 2016
msokolov pushed a commit to msokolov/lucene-solr that referenced this pull request Mar 17, 2021
bszabo97 pushed a commit to bszabo97/lucene-solr that referenced this pull request Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant