-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Change mapping of index-pattern fields to text #9353
Change mapping of index-pattern fields to text #9353
Conversation
@ycombinator I agree. I've updated the PR with these changes. Could you take another look? |
Just kidding. I just noticed f107e96 👅 |
@lukasolson A test needs to be updated:
|
@@ -147,7 +147,7 @@ export default function SavedObjectFactory(es, kbnIndex, Promise, Private, Notif | |||
properties: { | |||
// setup the searchSource mapping, even if it is not used but this type yet | |||
searchSourceJSON: { | |||
type: 'keyword' | |||
type: 'string' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be text
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GAH sorry
LGTM. |
Does this fix being able to create an index pattern for a Metricbeat index? |
@tsullivan Yes it should, assuming you were running into an error like this: {"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[nij2QMp][127.0.0.1:9300][indices:data/write/index[p]]"}],"type":"illegal_argument_exception","reason":"Document contains at least one immense term in field=\"fields\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: '[91, 123, 34, 110, 97, 109, 101, 34, 58, 34, 114, 101, 100, 105, 115, 46, 105, 110, 102, 111, 46, 99, 108, 117, 115, 116, 101, 114, 46, 101]...', original message: bytes can be at most 32766 in length; got 106706","caused_by":{"type":"max_bytes_length_exceeded_exception","reason":"bytes can be at most 32766 in length; got 106706"}},"status":400} You will, of course, need to |
@ycombinator awesome - I confirmed this also fixes index patterns for twitter data 🐔 |
Code changes LGTM but I wouldn't know if there are any other areas that need to be touched. |
Fixes #9352.
This simply changes the type of all JSON fields in the
index-pattern
mapping fromkeyword
totext
. This change is because we don't want to treat these fields askeyword
fields, because they can store lots and lots of information, and if they're stored as a single term, they will easily pass the limit of 32766 characters, and will cause errors when you try to save them.