Skip to content

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

Merged
merged 1 commit into from
Apr 17, 2025
Merged

Conversation

bzhangam
Copy link
Contributor

@bzhangam bzhangam commented Mar 11, 2025

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

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (b0b8b29) to head (c678c25).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +15 to +21
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";
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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?

@bzhangam bzhangam force-pushed the main branch 3 times, most recently from c7890a2 to 3147dcb Compare April 17, 2025 18:55
@junqiu-lei junqiu-lei merged commit 39b4892 into opensearch-project:main Apr 17, 2025
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancements Increases software capabilities beyond original client specifications neural-search
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PROPOSAL] Neural Search field type
6 participants