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

Include not analyzed fields in saved objects #10348

Closed
stacey-gammon opened this issue Feb 14, 2017 · 9 comments
Closed

Include not analyzed fields in saved objects #10348

stacey-gammon opened this issue Feb 14, 2017 · 9 comments
Labels
discuss Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@stacey-gammon
Copy link
Contributor

stacey-gammon commented Feb 14, 2017

In working on a solution to #10073, I realize we only have an analyzed title field stored in the .kibana index. I don't think it's possible to do an exact match on an analyzed title field.

I can do a match_phrase but it will return more results then I want (e.g. a search for "New" will return "New Visualization"). I can loop through the results manually, but running into this issue makes me think we should change our index to also store raw, not analyzed fields, in case we want to change this in the future.

Thoughts?

/cc @spalger @epixa ... and platform team I guess?

@stacey-gammon stacey-gammon added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc discuss labels Feb 14, 2017
@Bargs
Copy link
Contributor

Bargs commented Feb 14, 2017

A multi-field would be nice. I think text was chosen back when the ID matched the title so it didn't matter. A re-index of the .kibana index would be required, so if we were to do this it should be done at the same time we handle the 5.0 -> 6.0 upgrade where strings will be removed.

@spalger
Copy link
Contributor

spalger commented Feb 14, 2017

Yeah, and the default mapping for JSON strings is probably sufficient too, though we should probably rethink the mappings anyway.

@Bargs
Copy link
Contributor

Bargs commented Feb 14, 2017

I might be misunderstanding you @spalger, but the JSON fields need to be keyword because they get too long for text. Lukas updated that recently #9353

@spalger
Copy link
Contributor

spalger commented Feb 15, 2017

I meant the default mapping for the strings we send to elasticsearch in the JSON request, which it maps to a text field with a .keyword multi-value field.

@spalger
Copy link
Contributor

spalger commented Feb 15, 2017

I forgot that we are actually defining the mapping for saved object types

@stacey-gammon
Copy link
Contributor Author

stacey-gammon commented May 9, 2017

Do we have any plans to add this to 6.0? Turns out that because we limit the # of saved objects retrieved from our loaders, our sorting is broken, and without this, we can't tell elasticsearch to sort on the title field. #11415 (comment)

@Bargs
Copy link
Contributor

Bargs commented May 9, 2017

@jbudz ^ (since you were working on the static mappings)

@stacey-gammon
Copy link
Contributor Author

related: #14754

@epixa epixa changed the title Include not analyzed fields in .kibana Include not analyzed fields in saved objects Oct 16, 2018
@epixa
Copy link
Contributor

epixa commented Oct 16, 2018

I'm going to close this since I don't think there's anything we'll do globally to address this. Saved object migrations now allow plugins to change their existing mappings, add fields, etc., and the owning plugin for each type of saved object should be making the decisions about how it is stored.

If you still want to use this for warning on name collisions, that should be doable now on a type by type basis, so I recommend opening individual issues for the types you'd like to address.

@epixa epixa closed this as completed Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

4 participants