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

Fix Elasticsearch order filter on related entity property #2949

Closed

Conversation

bastnic
Copy link
Contributor

@bastnic bastnic commented Jul 24, 2019

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

I use Elasticsearch integration and I want to sort on properties like user.id where user is a related entity and id is an integer. The serialization and the ES mapping allow the order to operate.

Current implementation try to check dotted properties after searching if the property exists, period. So the whole code seems to be for nothing.

I'm not sure if the real fix should be that hasProperty return true even for dotted property. But currently this patch seems to be ok for me, so Hi!

@bastnic bastnic changed the title Fix order Elasticsearch filter on related entity property Fix Elasticsearch order filter on related entity property Jul 24, 2019
@bastnic bastnic force-pushed the feature/elasticsearch-filter-dotted branch from 4912309 to 5a9fcdd Compare July 24, 2019 20:12
@bastnic
Copy link
Contributor Author

bastnic commented Jul 25, 2019

Humm it works for one to many relationship, but not for many to many as APIP make the asumption that colletions of objects are nested.

In my case, many to many are not mapped as nested as nested is quite costly in performance and we don't need them to be treated as differents objects.

@soyuka
Copy link
Member

soyuka commented Jul 26, 2019

Humm it works for one to many relationship, but not for many to many

We can still merge this imo, could you add some functional test?

@stale
Copy link

stale bot commented Nov 5, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 5, 2022
@stale
Copy link

stale bot commented Jan 4, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 4, 2023
@stale stale bot closed this Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants