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

Add overlapping fields (index-alias for index state management) #7611

Closed
wants to merge 1 commit into from

Conversation

vagimeli
Copy link
Collaborator

@vagimeli vagimeli commented Jul 2, 2024

Description

Address feedback about documenting overlapping fields

Issues Resolved

#4336

Version

Backport 2.15

Frontend features

If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Melissa Vagi <[email protected]>
@vagimeli vagimeli self-assigned this Jul 2, 2024
@vagimeli vagimeli added the Needs SME Waiting on input from subject matter expert label Jul 2, 2024
@@ -272,3 +272,58 @@ DELETE index-1/_alias/alias1
{% include copy-curl.html %}

After running the request, `alias1` no longer refers to `index-1` but still refers to `index-2`.

## Overlapping field names
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technical reviewer: Please confirm this example is relevant to an OpenSearch user and addresses the following user feedback: Undocumented behavior for when two indexes with overlapping field names are associated with the same alias. What happens when these are different types? There appears to be some kind of implicit casting that occurs. I tested the example using Dev Tools. If another example is more appropriate, please replace the draft example with your example. Thank you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any problem case they provided? I'm not sure what is this implicit casting they are refering to.

Copy link
Collaborator Author

@vagimeli vagimeli Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quote reply

@bowenlan-amzn This is feedback from a user via the documentation comments. No other info provided. I found this info, but don't know if it's related https://forum.opensearch.org/t/help-with-text-field-mapping-and-implicit-conversion-of-integer-and-boolean-to-text/16226. Should we close this and open a new PR when we have more details?

@vagimeli
Copy link
Collaborator Author

@bowenlan-amzn Would you or other index management team member be available to technical review this PR? It addresses community feedback about Undocumented behavior for when two indexes with overlapping field names are associated with the same alias. What happens when these are different types? There appears to be some kind of implicit casting that occurs. Thank you.

@vagimeli vagimeli added 3 - Tech review PR: Tech review in progress and removed Needs SME Waiting on input from subject matter expert labels Aug 30, 2024
@bowenlan-amzn
Copy link
Member

@vagimeli commented on Jul 11, 2024, 11:16 PM GMT+8:

@bowenlan-amzn Would you or other index management team member be available to technical review this PR? It addresses community feedback about Undocumented behavior for when two indexes with overlapping field names are associated with the same alias. What happens when these are different types? There appears to be some kind of implicit casting that occurs. Thank you.

I'm not sure there's implicit casting. I suggest we wait for an example showing this is happening. I did a very simple experiment by creating 2 indexes like you wrote in the documentation. Then index some data and do a simple search, I don't see any casting.
There maybe some circumstances that some query can do the casting behind the scene but I am not aware.


## Overlapping field names

When querying an alias that points to multiple indexes with overlapping field names of different data types, OpenSearch attempts to merge the data from these indexes. However, due to the conflicting data types, OpenSearch performs implicit casting or type conversion on the field values to reconcile the differences.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When querying an alias that points to multiple indexes with overlapping field names of different data types, OpenSearch attempts to merge the data from these indexes. However, due to the conflicting data types, OpenSearch performs implicit casting or type conversion on the field values to reconcile the differences.
When querying an alias that points to multiple indexes with overlapping field names of different data types, OpenSearch attempts to merge the data from these indexes.

@vagimeli
Copy link
Collaborator Author

vagimeli commented Oct 8, 2024

@vagimeli commented on Jul 11, 2024, 11:16 PM GMT+8:

@bowenlan-amzn Would you or other index management team member be available to technical review this PR? It addresses community feedback about Undocumented behavior for when two indexes with overlapping field names are associated with the same alias. What happens when these are different types? There appears to be some kind of implicit casting that occurs. Thank you.

I'm not sure there's implicit casting. I suggest we wait for an example showing this is happening. I did a very simple experiment by creating 2 indexes like you wrote in the documentation. Then index some data and do a simple search, I don't see any casting. There maybe some circumstances that some query can do the casting behind the scene but I am not aware.

@bowenlan-amzn I'm closing this PR. This was to address community feedback. When the issue arises, the dev team can create open a new PR. Thanks for your help.

@vagimeli vagimeli closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Tech review PR: Tech review in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants