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

Not all string-fields need to be analyzed and sortable #246

Open
majsan opened this issue Apr 4, 2024 · 2 comments
Open

Not all string-fields need to be analyzed and sortable #246

majsan opened this issue Apr 4, 2024 · 2 comments

Comments

@majsan
Copy link
Member

majsan commented Apr 4, 2024

For the ES mapping, if the configuration says: "type": "string", we use multi-fields to add a raw field (with no analysis at all) and a sort field with icu_collation_keyword type, used for sorting.

Some fields that are of string type do not need sorting or analysis.

If anaysis is not needed, use "type": "keyword" in the Elasticsearch mapping and skip the raw-field.

If there is no need to sort, do not add sort-field. Also, sorting might need more configuration in the future, in case we have fields with other sorting rules.

The question is how to do this in our configuration. Maybe type can accept an object instead of a string when the type needs more configuration. For example:

"type": {
    "name": "string",
    "analysis": false,
    "sorting": false
}
@majsan
Copy link
Member Author

majsan commented Oct 8, 2024

Simply "type": "keyword"?

@majsan
Copy link
Member Author

majsan commented Oct 8, 2024

Salex internal ID fields should use this type and also the coming internal field _id (see the internal field _entry_version etc) so that users can search for equals|@id|ABC123.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant