-
Notifications
You must be signed in to change notification settings - Fork 90
Add semantic field mapper. #1225
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
Conversation
src/main/java/org/opensearch/neuralsearch/mapper/SemanticFieldMapper.java
Show resolved
Hide resolved
src/main/java/org/opensearch/neuralsearch/mapper/SemanticFieldMapper.java
Show resolved
Hide resolved
src/main/java/org/opensearch/neuralsearch/mapper/SemanticFieldMapper.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/neuralsearch/mapper/SemanticFieldMapper.java
Show resolved
Hide resolved
src/main/java/org/opensearch/neuralsearch/mapper/SemanticFieldMapper.java
Show resolved
Hide resolved
...ain/java/org/opensearch/neuralsearch/mapper/semanticFieldTypes/SemanticFieldTypeFactory.java
Outdated
Show resolved
Hide resolved
.../java/org/opensearch/neuralsearch/mapper/semanticFieldTypes/SemanticFieldTypeParameters.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/neuralsearch/constants/SemanticFieldConstants.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/neuralsearch/mapper/SemanticFieldMapper.java
Outdated
Show resolved
Hide resolved
...ain/java/org/opensearch/neuralsearch/mapper/semanticFieldTypes/SemanticFieldTypeFactory.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/neuralsearch/mapper/semanticFieldTypes/SemanticFieldType.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/neuralsearch/mapper/semanticFieldTypes/SemanticFieldTypeTests.java
Outdated
Show resolved
Hide resolved
...java/org/opensearch/neuralsearch/mapper/semanticFieldTypes/SemanticStringFieldTypeTests.java
Outdated
Show resolved
Hide resolved
...main/java/org/opensearch/neuralsearch/mapper/semanticFieldTypes/SemanticNumberFieldType.java
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1225 +/- ##
============================================
- Coverage 80.63% 0 -80.64%
============================================
Files 127 0 -127
Lines 5722 0 -5722
Branches 932 0 -932
============================================
- Hits 4614 0 -4614
+ Misses 753 0 -753
+ Partials 355 0 -355 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/main/java/org/opensearch/neuralsearch/mapper/dto/SemanticParameters.java
Show resolved
Hide resolved
src/main/java/org/opensearch/neuralsearch/mapper/SemanticFieldMapper.java
Outdated
Show resolved
Hide resolved
77df55c
to
1926bc4
Compare
public static final String MODEL_ID = "model_id"; | ||
|
||
/** | ||
* Name of the search model id parameter. We use this key to define the id of the ML model that we will use to | ||
* inference the query text during the search. If this parameter is not defined we will use the model_id instead. | ||
*/ | ||
public static final String SEARCH_MODEL_ID = "search_model_id"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need 2 model_id
fields? Can we only keep 1 model_id
field? Why we need separate model_ids for inferencing for index and search?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's needed to support the sparse model use case.
@@ -214,17 +225,6 @@ public Map<String, Processor.Factory> getProcessors(Processor.Parameters paramet | |||
|
|||
@Override | |||
public Optional<QueryPhaseSearcher> getQueryPhaseSearcher() { | |||
// we're using "is_disabled" flag as there are no proper implementation of FeatureFlags.isDisabled(). Both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why removing NEURAL_SEARCH_HYBRID_SEARCH_DISABLED
and related lines is included in this cr?
c7890a2
to
3147dcb
Compare
Signed-off-by: Bo Zhang <[email protected]>
Description
Add semantic field mapper to support the semantic field type.
Also remove the incorrect FF NEURAL_SEARCH_HYBRID_SEARCH_DISABLED.
Related Issues
Resolves #[803]
Resolves part of the issue #1226
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.