-
Notifications
You must be signed in to change notification settings - Fork 590
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
Groovy removed from Elasticsearch 6 #575
Comments
@r3dham I'm working on a PR for this. I have TimeSketch working cleanly with ES 6.x at https://github.com/mari0d/timesketch/tree/mari0d/painless and we are using that fork internally, but it currently isn't fully compatible with ES 5.x. Once I have the ES 5.x support back in I will open the PR (may need some handholding). |
@berggren is it worth me taking the time to do a PR for the work above? Not sure how far along you are with it; just noticed that you mentioned in issue 557 that you had the work queued up. |
@mari0d Sorry for the delay. We already have painless scripts ready in the repository. We just need to update the documentation and make some minor changes to the loading. Example: I will make this a priority to have Timesketch be ES 6.x ready by default. |
Same error for annotation as bellow with painless scripts in @mari0d's and master branch
|
Looks like the ‘file’ key is now ‘source’, but that change has not been made in the fork you mention. |
@berggren ES 6.x removed file scripts itself.(elastic/elasticsearch#24627) We need to use "Stored Script" with "id" parameter. https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-using.html#modules-scripting-stored-scripts Or embedded painless scripts with "source" parameter. |
Yeah, thanks for the heads-up. We will need to figure out a clean migration to 6.x without brake all 5.x users. Will take a look asap. |
Fix Issue google#575 (Elasticsearch 6 solution only)
Please note that the commit attempt above only support Elasticsearch 6 using embedded painless scripts as suggested by @r3dham. |
Side note: Elasticsearch version can probably retrieved from self.client.info(). How about using scripts embedded in code with a selection based on Elasticsearch version ? I also noted that the histogram is only showing a single bar using this commit. I don't know yet if the commit is the cause. |
Also elasticsearch 6 now apparently requises specifying path:timesketch_label in nested querie. This is required for star or hidden queries. |
Fix Issue google#575 (Elasticsearch 6 solution only)
Fix Issue google#575. Elasticsearch 5 support by checking elasticsearch version through the client. The selected solution is to run an embedded query using the right script language depending on the elasticsearch version.
https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_60_scripting_changes.html
As TimeSketch is still using Groovy, annotation and stars don't work on Elasticsearch 6.
Could you update the script to Painless?
The text was updated successfully, but these errors were encountered: