diff --git a/CHANGELOG.md b/CHANGELOG.md index da2ae9ec9..6f448684a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,4 +20,5 @@ Support sparse semantic retrieval by introducing `sparse_encoding` ingest proces ### Infrastructure ### Documentation ### Maintenance +Consumed latest changes from core, use QueryPhaseSearcherWrapper as parent class for Hybrid QPS ([#356](https://github.com/opensearch-project/neural-search/pull/356)) ### Refactoring diff --git a/src/main/java/org/opensearch/neuralsearch/search/query/HybridQueryPhaseSearcher.java b/src/main/java/org/opensearch/neuralsearch/search/query/HybridQueryPhaseSearcher.java index abf1b8813..f65e30222 100644 --- a/src/main/java/org/opensearch/neuralsearch/search/query/HybridQueryPhaseSearcher.java +++ b/src/main/java/org/opensearch/neuralsearch/search/query/HybridQueryPhaseSearcher.java @@ -33,6 +33,7 @@ import org.opensearch.search.internal.SearchContext; import org.opensearch.search.query.QueryCollectorContext; import org.opensearch.search.query.QueryPhase; +import org.opensearch.search.query.QueryPhaseSearcherWrapper; import org.opensearch.search.query.QuerySearchResult; import org.opensearch.search.query.TopDocsCollectorContext; import org.opensearch.search.rescore.RescoreContext; @@ -45,7 +46,11 @@ * upstream standard implementation of searcher is called. */ @Log4j2 -public class HybridQueryPhaseSearcher extends QueryPhase.DefaultQueryPhaseSearcher { +public class HybridQueryPhaseSearcher extends QueryPhaseSearcherWrapper { + + public HybridQueryPhaseSearcher() { + super(); + } public boolean searchWith( final SearchContext searchContext, @@ -58,7 +63,7 @@ public boolean searchWith( if (query instanceof HybridQuery) { return searchWithCollector(searchContext, searcher, query, collectors, hasFilterCollector, hasTimeout); } - return super.searchWithCollector(searchContext, searcher, query, collectors, hasFilterCollector, hasTimeout); + return super.searchWith(searchContext, searcher, query, collectors, hasFilterCollector, hasTimeout); } @VisibleForTesting