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

[Backport 2.x] [DerivedField] Support DerivedField object type and integration with Mapper #14105

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 9da6170 from #13720.

…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 <[email protected]>

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

Signed-off-by: Rishabh Maurya <[email protected]>

* Index and cluster setting to control derived fields

Signed-off-by: Rishabh Maurya <[email protected]>

* Fix test

Signed-off-by: Rishabh Maurya <[email protected]>

* Fixed missing javadoc

Signed-off-by: Rishabh Maurya <[email protected]>

* Fix the rewrite issue when profile is set as true

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* Use conjuction query with filter on source_indexed_field query and DerivedFieldQuery

Signed-off-by: Rishabh Maurya <[email protected]>

* support source_indexed_field for non-object type derived fields

Signed-off-by: Rishabh Maurya <[email protected]>

* rename source_indexed_field to prefilter_field

Signed-off-by: Rishabh Maurya <[email protected]>

---------

Signed-off-by: Rishabh Maurya <[email protected]>
(cherry picked from commit 9da6170)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Jun 9, 2024

✅ Gradle check result for 1fb514a: SUCCESS

@rishabhmaurya
Copy link
Contributor

There are changes in following classes because of which breaking change check is failing -


MODIFIED | org.opensearch.index.mapper.DerivedField
-- | --
NEW | org.opensearch.index.mapper.DerivedFieldResolver
MODIFIED (!) | org.opensearch.index.mapper.DerivedFieldValueFetcher

MODIFIED	[org.opensearch.index.mapper.DerivedField](https://github.com/opensearch-project/OpenSearch/pull/14105#org.opensearch.index.mapper.DerivedField)
NEW	[org.opensearch.index.mapper.DerivedFieldResolver](https://github.com/opensearch-project/OpenSearch/pull/14105#org.opensearch.index.mapper.DerivedFieldResolver)
MODIFIED (!)	[org.opensearch.index.mapper.DerivedFieldValueFetcher](https://github.com/opensearch-project/OpenSearch/pull/14105#org.opensearch.index.mapper.DerivedFieldValueFetcher)

Since DerivedField wasn't launched in 2.14 and was still in partial state, so it is fine to proceed with these breaking changes.

@dblock dblock merged commit 24af354 into 2.x Jun 10, 2024
55 of 60 checks passed
@andrross andrross deleted the backport/backport-13720-to-2.x branch June 10, 2024 18:02
@andrross
Copy link
Member

This PR should not have been merged with the failing compat check, as future PRs to 2.x will fail now because the check compares against the 2.14 released artifacts. @rishabhmaurya is going to raise a PR to add back the public methods that were removed.

@rishabhmaurya
Copy link
Contributor

@andrross created #14143
thanks for pointing it out.

@dblock
Copy link
Member

dblock commented Jun 10, 2024

This PR should not have been merged with the failing compat check, as future PRs to 2.x will fail now because the check compares against the 2.14 released artifacts. @rishabhmaurya is going to raise a PR to add back the public methods that were removed.

My bad. Will be more careful with this moving forward.

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 <[email protected]>
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog v2.15.0 Issues and PRs related to version 2.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants