Open bernji opened 8 years ago
@bernji The latest version 0.1.0 has been released over https://grails.org/plugin/elasticsearch with the support of Elasticsearch 2.x for Grails 2.x. I'll work on updating the documentation. For the time being you could refer to Documentation here and feel free to reach out to me in case you face any issues.
Updated documentation. Please let me know if you find any issues with it.
Hi,
First of all the documentation seems overall pretty good as far as i can see, thanks.
One thing the documentation does currently not explain is how to use aggregations. As far as i understand the aggregations should appear in the result map of the elasticSearchService.search function. The commit 276dfe1697c740a919a14d75309f8db86d6b5a56 where this functionallity was first added did not help me all that much and that is as far as i got by looking through the code.
What i tried was to add a aggs section in the Closure given to the elasticSearchService.search Method. Something like:
{
bool { ... }
aggs {
aggregationName {
terms {field: "fieldName"}
}
}
}
Which did not change the result. It seems to completly ignore the aggs part of the query. I also tried it with aggregations instead of aggs
Also adding a query around the bool did throw a MethodNotFound Exception, so the following did not work at all:
{
query {
bool { ... }
}
aggs { ... }
}
In one of the issues (#87) it was explained how to use the elasticSearchHelper.withElasticSearch function. But for that i would need Classes, which do not come with the plugin (at least version 0.1.0, because I still need to use grails 2.4.x). I guess when using the elasticSearchHelper one also needs to have all of elasticSearch in the classpath or maybe only the Java API?
Thanks for the feedback @glont. I will surely look into this over coming weekend and try to update documentation.
+1 for aggs documentation. Previously, I ended up coding them using the java interface which definitely isn't as readable as the groovy way.
Hi,
I know all developers hate to write documentations. So do I. But now, as I am a user of your plugin, I am kind of left alone. The documentation provided is very old.
But the worst: I am using grails 2.x and would like to upgrade to the newest version of EL as possible. I cannot find any reference which version I could use.
As I notices. Most developers of grails plugins have 2 different branches: one for grais 2.x and one for grails 3.x
To which version can I upgrade?