-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: implement default model id for neural sparse
Signed-off-by: zhichao-aws <[email protected]>
- Loading branch information
1 parent
9acad2e
commit e6202af
Showing
4 changed files
with
39 additions
and
12 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
src/main/java/org/opensearch/neuralsearch/query/ModelInferenceQueryBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package org.opensearch.neuralsearch.query; | ||
|
||
/** | ||
* Query builders which calls ml-commons API to do model inference. | ||
* The model inference result is used for search on target field. | ||
*/ | ||
|
||
public interface ModelInferenceQueryBuilder { | ||
/** | ||
* Get the model id used by ml-commons model inference. Return null if the model id is absent. | ||
*/ | ||
public String modelId(); | ||
|
||
/** | ||
* Set a new model id for the query builder. | ||
*/ | ||
public ModelInferenceQueryBuilder modelId(String modelId); | ||
|
||
/** | ||
* Get the field name for search. | ||
*/ | ||
public String fieldName(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters