-
Notifications
You must be signed in to change notification settings - Fork 340
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
[9.x] Use scout key when mapping keys from search results #652
Conversation
I am closing this pull request because it lacks sufficient explanation, tests, or both. It is difficult for us to merge pull requests without these things because the change may introduce breaking changes to the framework. Feel free to re-submit your change with a thorough explanation of the feature and tests - integration tests are preferred over unit tests. Please include it's benefit to end users; the reasons it does not break any existing features; how it makes building web applications easier, etc. Thanks! |
@flexchar please see the pr template when submitting pr's and add a thorough description to your PR |
Fair enough. Unfortunately I'm not available today but I'd love to try submitting a proper PR for the experience. I could totally do it this weekend @driesvints. :) |
@flexchar since this is only happening in the meilisearch engine maybe we should revert the changes to the base engine class and do them in the |
I'm back online! Let me try to tackle this right now. Can you link to the commit of changes you're talking about, @driesvints? |
There's only a few changes in this PR so not sure what you want me to link to? |
Perhaps! What do you mean by this part?
|
You added changes to |
Ah... gotcha. I thought you were referring to a change made in the past. To be honest as much as I'm looking at the abstract base On the contrary, adding using Line 111 in 48aeabd
OR. Now that I think there is nothing stopping us from overloading a |
I have the proper commit ready if I may force push one last time - somehow things got messed up this time. |
Sure. Was just trying to fix stuff |
@driesvints should be good & ready for the review now. Thank you for the opportunity to practice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems okay to me but would like a review from @mmachatschek as well if possible.
I think I agree with @mmachatschek. @flexchar let's send this to master instead and maybe look forward to prepare Scout v10. |
I'm working on several projects that are soon to receive custom searchable attributes thus causing this issue arise. Is v10 close down the road? :) And I can send one directly to v10. It seems like the change with less code! Should I sent PR against |
Actually, on second thought the overwriting of the behavior of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taylorotwell this one is ready for review now.
Thanks @flexchar |
Trying a fix against #651
This PR overloads the
keys()
method in the base Engine class providingMeilisearchEngine
the exact Scout key to be used when mapping search results.Previously the key was determined by taking the first key of the array in the search response. However as recently discovered in the aforementioned issue - Meilisearch will return random array order depending on its index configuration.