Skip to content

Commit

Permalink
Fix split package in search business rules module (elastic#78139)
Browse files Browse the repository at this point in the history
The CappedScore lucene query exists in search-business-rules, but split
the lucene search package. This commit moves the implementation class
into the existing module package name.
  • Loading branch information
rjernst committed Sep 22, 2021
1 parent 9ee2bd6 commit d7f6038
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
7 changes: 0 additions & 7 deletions x-pack/plugin/search-business-rules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,3 @@ dependencies {
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation project(":test:framework")
}

tasks.named('splitPackagesAudit').configure {
// Lucene classes should be owned by Lucene!
ignoreClasses 'org.apache.lucene.search.CappedScoreQuery',
'org.apache.lucene.search.CappedScoreWeight',
'org.apache.lucene.search.CappedScorer'
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,29 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
package org.apache.lucene.search;
package org.elasticsearch.xpack.searchbusinessrules;

import java.io.IOException;
import java.util.Objects;

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BoostQuery;
import org.apache.lucene.search.BulkScorer;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.FilterLeafCollector;
import org.apache.lucene.search.FilterScorable;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.LeafCollector;
import org.apache.lucene.search.Matches;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.Scorable;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.Bits;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
* 2.0.
*/

package org.apache.lucene.search;
package org.elasticsearch.xpack.searchbusinessrules;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.Term;

import java.io.IOException;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
* 2.0.
*/

package org.apache.lucene.search;
package org.elasticsearch.xpack.searchbusinessrules;

import org.apache.lucene.search.FilterScorer;
import org.apache.lucene.search.Scorer;
import org.apache.lucene.search.Weight;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
package org.elasticsearch.xpack.searchbusinessrules;

import org.apache.lucene.search.BoostQuery;
import org.apache.lucene.search.CappedScoreQuery;
import org.apache.lucene.search.ConstantScoreQuery;
import org.apache.lucene.search.DisjunctionMaxQuery;
import org.apache.lucene.search.MatchNoDocsQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import com.fasterxml.jackson.core.io.JsonStringEncoder;

import org.apache.lucene.search.CappedScoreQuery;
import org.apache.lucene.search.DisjunctionMaxQuery;
import org.apache.lucene.search.Query;
import org.elasticsearch.common.ParsingException;
Expand Down

0 comments on commit d7f6038

Please sign in to comment.