Skip to content
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

[DerivedField] Support DerivedField object type and integration with Mapper #13720

Merged
merged 11 commits into from
Jun 6, 2024

Conversation

rishabhmaurya
Copy link
Contributor

@rishabhmaurya rishabhmaurya commented May 16, 2024

Description

Support DerivedField object type and integration with Mapper and DerivedField query

  • Adds ValueFetcher for DerivedField of object type to parse and fetch nested fields.
  • DerivedFieldResolver to resolve DerivedField type on the fly. And DerivedFieldResolverFactory to decide between NoOp and Default implementation.
  • Introduction of new support types - text, float and object.
  • Use index analyzer for derived fields set in index settings.
  • Integrations of properties - source_indexed_field, properties, format , ignore_malformed introduced in [DerivedField] object type support in mappings and new settings for derived field  #13717 to make them functional.
  • Support of derived fields from query string
  • Disable feature when allow_expensive_query is set to false.
  • Index and cluster level setting index.query.derived_field.enabled and search.derived_field.enabled respectively, to enable/disable feature on dynamically.

PR diff will reduce once preceding PRs are merged - #13592 and #13717

Related Issues

Resolves #13715

#13592

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • API changes companion pull request created.
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • [ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • [ ] 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.

@rishabhmaurya rishabhmaurya self-assigned this May 16, 2024
@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Search:Query Capabilities labels May 16, 2024
@rishabhmaurya rishabhmaurya added skip-changelog and removed enhancement Enhancement or improvement to existing feature or request Search:Query Capabilities labels May 16, 2024
@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Search:Query Capabilities labels May 16, 2024
Copy link
Contributor

❌ Gradle check result for 0af215e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

…rivedFieldQuery

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
Copy link
Contributor

github-actions bot commented Jun 5, 2024

❕ Gradle check result for 1d79fa8: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Contributor

github-actions bot commented Jun 5, 2024

❌ Gradle check result for 6c1ff16: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
Copy link
Contributor

github-actions bot commented Jun 5, 2024

✅ Gradle check result for a78b936: SUCCESS

Copy link
Contributor

github-actions bot commented Jun 5, 2024

✅ Gradle check result for c4d2149: SUCCESS

@getsaurabh02 getsaurabh02 merged commit 9da6170 into opensearch-project:main Jun 6, 2024
30 checks passed
@rishabhmaurya rishabhmaurya added the backport 2.x Backport to 2.x branch label Jun 9, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 9, 2024
…Mapper (#13720)

* Support DerivedField object type

* ValueFetcher for DerivedField of object type to parse and fetch nested fields.
* DerivedFieldResolver to resolve DerivedField type on the fly.
* Introduction of new support types - text, float.
* Use index analyzer for derived fields set in index settings.
* Support of derived fields from query string
* Unit tests

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Derived field object type properties to also support Object as a value

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Index and cluster setting to control derived fields

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Fix test

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Fixed missing javadoc

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Fix the rewrite issue when profile is set as true

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Address PR comments

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Address PR comments

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Use conjuction query with filter on source_indexed_field query and DerivedFieldQuery

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* support source_indexed_field for non-object type derived fields

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* rename source_indexed_field to prefilter_field

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

---------

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
(cherry picked from commit 9da6170)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@rishabhmaurya rishabhmaurya mentioned this pull request Jun 10, 2024
6 tasks
dblock pushed a commit that referenced this pull request Jun 10, 2024
…Mapper (#13720) (#14105)

* Support DerivedField object type

* ValueFetcher for DerivedField of object type to parse and fetch nested fields.
* DerivedFieldResolver to resolve DerivedField type on the fly.
* Introduction of new support types - text, float.
* Use index analyzer for derived fields set in index settings.
* Support of derived fields from query string
* Unit tests



* Derived field object type properties to also support Object as a value



* Index and cluster setting to control derived fields



* Fix test



* Fixed missing javadoc



* Fix the rewrite issue when profile is set as true



* Address PR comments



* Address PR comments



* Use conjuction query with filter on source_indexed_field query and DerivedFieldQuery



* support source_indexed_field for non-object type derived fields



* rename source_indexed_field to prefilter_field



---------


(cherry picked from commit 9da6170)

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
parv0201 pushed a commit to parv0201/OpenSearch that referenced this pull request Jun 10, 2024
…Mapper (opensearch-project#13720)

* Support DerivedField object type

* ValueFetcher for DerivedField of object type to parse and fetch nested fields.
* DerivedFieldResolver to resolve DerivedField type on the fly.
* Introduction of new support types - text, float.
* Use index analyzer for derived fields set in index settings.
* Support of derived fields from query string
* Unit tests

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Derived field object type properties to also support Object as a value

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Index and cluster setting to control derived fields

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Fix test

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Fixed missing javadoc

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Fix the rewrite issue when profile is set as true

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Address PR comments

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Address PR comments

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Use conjuction query with filter on source_indexed_field query and DerivedFieldQuery

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* support source_indexed_field for non-object type derived fields

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* rename source_indexed_field to prefilter_field

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

---------

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
kkewwei pushed a commit to kkewwei/OpenSearch that referenced this pull request Jul 24, 2024
…Mapper (opensearch-project#13720) (opensearch-project#14105)

* Support DerivedField object type

* ValueFetcher for DerivedField of object type to parse and fetch nested fields.
* DerivedFieldResolver to resolve DerivedField type on the fly.
* Introduction of new support types - text, float.
* Use index analyzer for derived fields set in index settings.
* Support of derived fields from query string
* Unit tests

* Derived field object type properties to also support Object as a value

* Index and cluster setting to control derived fields

* Fix test

* Fixed missing javadoc

* Fix the rewrite issue when profile is set as true

* Address PR comments

* Address PR comments

* Use conjuction query with filter on source_indexed_field query and DerivedFieldQuery

* support source_indexed_field for non-object type derived fields

* rename source_indexed_field to prefilter_field

---------

(cherry picked from commit 9da6170)

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: kkewwei <kkewwei@163.com>
wdongyu pushed a commit to wdongyu/OpenSearch that referenced this pull request Aug 22, 2024
…Mapper (opensearch-project#13720)

* Support DerivedField object type

* ValueFetcher for DerivedField of object type to parse and fetch nested fields.
* DerivedFieldResolver to resolve DerivedField type on the fly.
* Introduction of new support types - text, float.
* Use index analyzer for derived fields set in index settings.
* Support of derived fields from query string
* Unit tests

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Derived field object type properties to also support Object as a value

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Index and cluster setting to control derived fields

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Fix test

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Fixed missing javadoc

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Fix the rewrite issue when profile is set as true

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Address PR comments

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Address PR comments

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* Use conjuction query with filter on source_indexed_field query and DerivedFieldQuery

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* support source_indexed_field for non-object type derived fields

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

* rename source_indexed_field to prefilter_field

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>

---------

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch enhancement Enhancement or improvement to existing feature or request Search:Query Capabilities skip-changelog
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature Request] Support mapping for object type and new settings for derived fields
4 participants