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

is it possible to use ElasticUI with elasticsearch 5.x? #107

Open
seralf opened this Issue Feb 19, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@seralf
Contributor

seralf commented Feb 19, 2017

Hi

I'm trying to use the library, using the demo as a quick reference, for creating a small prototype with Elasticsearch 5.x.
When I click on a single or multiple facet, i get the following error:

...Unknown key for a START_OBJECT in [filter]...

The problem seems to be related to the construction of filter part in the elasticsearch DSL, which -at least as far as I konw- had some chenges during the last updates.
Where do I have to look for, for updating the query creation in order to make the demo applyable to versions 5.x? thank in advance for any suggestion

@tackaberry

This comment has been minimized.

Show comment
Hide comment
@tackaberry

tackaberry Apr 7, 2017

@seralf did you happen to figure this out?

tackaberry commented Apr 7, 2017

@seralf did you happen to figure this out?

@seralf

This comment has been minimized.

Show comment
Hide comment
@seralf

seralf Apr 7, 2017

Contributor

no sorry, I did some testing, but then I had no more time to invest in explorations / other testing, and at the moment I can't use the library in my prototype :-(

Contributor

seralf commented Apr 7, 2017

no sorry, I did some testing, but then I had no more time to invest in explorations / other testing, and at the moment I can't use the library in my prototype :-(

@jedihe

This comment has been minimized.

Show comment
Hide comment
@jedihe

jedihe Apr 25, 2017

Update: proper fix below.

I hit the same issue and found a work around: ES 5.x doesn't support "filter" in the top-level for the search request; ElasticUI sets it when a eui-filter is defined. The solution I found was to not use eui-filter, but instead build any kind of filtering behavior directly in the aggregations/query like this ejs.FilterAggregation().filter(ejs.SomeFilter).agg(OriginalAggregation)

Unfortunately, doing this breaks the mechanism that makes the aggregation result available in aggResult variable... I'm still trying to solve that.

jedihe commented Apr 25, 2017

Update: proper fix below.

I hit the same issue and found a work around: ES 5.x doesn't support "filter" in the top-level for the search request; ElasticUI sets it when a eui-filter is defined. The solution I found was to not use eui-filter, but instead build any kind of filtering behavior directly in the aggregations/query like this ejs.FilterAggregation().filter(ejs.SomeFilter).agg(OriginalAggregation)

Unfortunately, doing this breaks the mechanism that makes the aggregation result available in aggResult variable... I'm still trying to solve that.

@jedihe

This comment has been minimized.

Show comment
Hide comment
@jedihe

jedihe Apr 28, 2017

Just opened a PR (#109) with a solution for this: replace deprecated Request.filter() with Request.post_filter(), both in elastic.js and elasticui.

Deprecation record: https://www.elastic.co/guide/en/elasticsearch/reference/5.1/breaking_50_search_changes.html#_top_level_literal_filter_literal_parameter
Docs for post_filter: https://www.elastic.co/guide/en/elasticsearch/reference/5.1/search-request-post-filter.html

Even though post_filter seems to work a bit differently than how filter did, ElasticUI already injects all the filters explicitly into the aggregations, which should guarantee that the behavior stays the same.

Hopefully somebody will find the time to properly upstream the change to elastic.js and run the build for ElasticUI (instead of directly hacking the unminified version as I did).

jedihe commented Apr 28, 2017

Just opened a PR (#109) with a solution for this: replace deprecated Request.filter() with Request.post_filter(), both in elastic.js and elasticui.

Deprecation record: https://www.elastic.co/guide/en/elasticsearch/reference/5.1/breaking_50_search_changes.html#_top_level_literal_filter_literal_parameter
Docs for post_filter: https://www.elastic.co/guide/en/elasticsearch/reference/5.1/search-request-post-filter.html

Even though post_filter seems to work a bit differently than how filter did, ElasticUI already injects all the filters explicitly into the aggregations, which should guarantee that the behavior stays the same.

Hopefully somebody will find the time to properly upstream the change to elastic.js and run the build for ElasticUI (instead of directly hacking the unminified version as I did).

@YousefED

This comment has been minimized.

Show comment
Hide comment
@YousefED

YousefED May 4, 2017

Owner

Hi Guys,

Sorry for the delay. Thanks for the work on this. As you might have noticed I'm not very active in this project anymore. If anyone would love to help out, I'd be happy to give complete contributor access to bring ElasticUI up to par with the latest angular / elastic versions :)

Owner

YousefED commented May 4, 2017

Hi Guys,

Sorry for the delay. Thanks for the work on this. As you might have noticed I'm not very active in this project anymore. If anyone would love to help out, I'd be happy to give complete contributor access to bring ElasticUI up to par with the latest angular / elastic versions :)

@seralf

This comment has been minimized.

Show comment
Hide comment
@seralf

seralf May 22, 2017

Contributor

Thanks YousefED for the updates

Uhm I'm not sure about how many time I could spend for a full support.
I suggest you could write some lines to illustrate the main component and where to start, so people can eventually divide the work between different committers.
my 2 cents

Contributor

seralf commented May 22, 2017

Thanks YousefED for the updates

Uhm I'm not sure about how many time I could spend for a full support.
I suggest you could write some lines to illustrate the main component and where to start, so people can eventually divide the work between different committers.
my 2 cents

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