Skip to content

Commit

Permalink
Made hybrid QPS extending QueryPhaseSearcherWrapper (#356) (#364)
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Gaievski <[email protected]>
(cherry picked from commit 2c5d150)

Co-authored-by: Martin Gaievski <[email protected]>
  • Loading branch information
1 parent 848ec21 commit 9e12de8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 9e12de8

Please sign in to comment.