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

Mapping limited to last 5 indices #2928

Closed
jimmyjones2 opened this issue Feb 6, 2015 · 4 comments
Closed

Mapping limited to last 5 indices #2928

jimmyjones2 opened this issue Feb 6, 2015 · 4 comments

Comments

@jimmyjones2
Copy link
Contributor

Usecase: searching system logs from systemd journal (using the JSON output)

Discover says I have some fields without a cached mapping... turns out components/index_patterns/_mapper.js limits the mapping to the last 5 indices that match the pattern. In my case I only ran libvirt last month, which is more than 5 daily indicies ago, so the field LIBVIRT_DOMAIN (and others) are not available so there is no way for me to visualize them.

Would rather not have to figure out the systemd schema and add a static mapping...

@rashidkpc
Copy link
Contributor

Yeah, this is sort of a challenge, we can expand the number of indices we look at, but that causes the returned response to grow, causing issues with larger mappings. The real solution is creating a way for elasticsearch to tell us about all of the indices that match the pattern, but to reduce the response on the elasticsearch side to just the stuff we need to know.

@jimmyjones2
Copy link
Contributor Author

@rashidkpc How about using the hash of the mapping to determine if its changed? I've got a monster mapping over lots of indices, if I get them all from elasticsearch at once takes less than a second to return the 5MB mapping (I presume elasticsearch has it cached somewhere). Should be quick for Kibana to hash this response to figure out if it needs to parse the whole thing. Obviously the first time it would need to parse them all, but with a progress bar I don't think people would mind.

@zhaakhi
Copy link

zhaakhi commented Mar 10, 2015

A workaround is to change this line in index.js:

return existing.matches.slice(-5); // Grab the most recent 5

to e.g.:

return existing.matches.slice(-100);

You can do this client-side in e.g. the Chrome debugger without changing files on disk

@jimmyjones2
Copy link
Contributor Author

Superseded by #6498

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

No branches or pull requests

4 participants