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 mapping parameters documentation #7115

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

vagimeli
Copy link
Collaborator

@vagimeli vagimeli commented May 8, 2024

Description

Add mapping parameters

Issues Resolved

#4300

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.

@vagimeli
Copy link
Collaborator Author

vagimeli commented May 8, 2024

@mgodwan I was provided your name as the SME for mappings. Please confirm you're the appropriate point of contact. We need to close documentation content gaps for mappings parameters, including individual pages for each parameter. Thank you.

@hdhalter hdhalter added 3 - Tech review PR: Tech review in progress backport 2.13 PR: Backport label for 2.13 labels May 10, 2024
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
@hdhalter hdhalter added backport 2.14 PR: Backport label for 2.14 and removed backport 2.13 PR: Backport label for 2.13 labels May 24, 2024
@hdhalter
Copy link
Contributor

@ankitkala @mgodwan - Can you please give us an ETA for the tech review? We’ve documented 4 parameters and want to make sure we’re on the right track. We need you to give a general approval. Based on your input, we'll document the remaining parameters.

@mgodwan
Copy link
Member

mgodwan commented Jun 10, 2024

Checking now

Comment on lines 15 to 23
The key functions of the `analyzer` mapping parameter are:

1. **Tokenization:** The analyzer determines how the text is broken down into individual tokens (words, numbers) that can be indexed and searched.

2. **Normalization:** The analyzer can apply various normalization techniques, such as converting text to lowercase, removing stopwords, and stemming/lemmatizing words.

3. **Consistency:** By defining the same analyzer for both indexing and searching, you ensure that the text analysis process is consistent, which helps improve the relevance of search results.

4. **Customization:** OpenSearch allows you to define custom analyzers by specifying the tokenizer, character filters, and token filters to use. This gives you fine-grained control over the text analysis process.
Copy link
Member

Choose a reason for hiding this comment

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

This can all lie in a different page later, which defines how to setup analyzer followed by an index, and can be cross references from the page. [not necessarily as part of scope of this PR]


The key functions of the `analyzer` mapping parameter are:

1. **Tokenization:** The analyzer determines how the text is broken down into individual tokens (words, numbers) that can be indexed and searched.
Copy link
Member

Choose a reason for hiding this comment

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

Caveat to call out: Each generated should not be more than 32766 bytes in length as indexing fails otherwise.

```
{% include copy-curl.html %}

In this example, the index-level `index.mapping.coerce` setting is set to `false`, which disables coercion globally. However, the `stock_count` field overrides this setting and enables coercion for that specific field.
Copy link
Member

Choose a reason for hiding this comment

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

Instead of globally, we should say for this index (globally may imply on the cluster level)


# `copy-to`

The `copy-to` parameter allows you to copy the values of multiple fields into a single field. This can be useful if you often search across multiple fields, as it allows you to search the group field instead.
Copy link
Member

Choose a reason for hiding this comment

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

copy_to

@mgodwan
Copy link
Member

mgodwan commented Jun 10, 2024

@hdhalter Apologies for the delay in reviewing this earlier.

Overall, the direction we're following looks good to me. I've left some high level comments on the documented fields.
The description, example, and explanation pattern works well.

Are we planning another documentation update where for each field type (e.g. text, integer), we will document the paramters supported for that data type? I would like to see that as well to ensure users are aware how they can customize their mappings for any supported field using these parameters.

@vagimeli vagimeli added backport 2.17 Backport for version 2.17 and removed backport 2.14 PR: Backport label for 2.14 labels Sep 30, 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 backport 2.17 Backport for version 2.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants