-
Notifications
You must be signed in to change notification settings - Fork 757
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
New Query API #1395
Comments
This will be great. I recently had to create the graphql-searchkick gem to work around using Searchkick with GraphQL pagination. Any chance this will support lazy |
@chadwilken Yeah, all the current options are available as methods. |
@ankane -- Are there any plans to deprecate or discontinue the current interface? Over here at Leafly, we've had really great success moving from Searchkick 3 -> 4 -> and now to 5. Pretty minimal changes on our side, but super huge value in terms of insulating us from the ES DSL and preparing us for smooth upgrades for ES major versions. If the old interface were to be deprecated and/or removed, it would be, I think, a major upheaval for us -- We have many, many queries constructing hashes internally and converting these to the relation-based interface would not be straight-forward. Presumably something we could plan for if we knew it were coming, so I wanted to check in 😄 . Cheers and thank you for the great library! |
Currently my team is trying to streamline our search code as we have been using both
But after reading this thread it appears we should be converting all this to |
@philipbjorge Passing options to @daande Either should be fine ( |
@ankane Kindly asking to add the possibility to get Also we noticed that delegate_missing_to :private_execute triggers the query execution upon any random |
Hey @stengineering0, thanks for reporting the Also, I'm not sure I understand the ask about |
Definitively I saw the def page(value)
clone.page!(value)
end will clone
I mean that sometimes might be better to operate by true |
Well, honestly we have a huge framework around Rails controllers, including third-party gems like We can fix all of these and perhaps we will do this some day, but for now the easiest way to go ahead is doing like following at the beginning of action dispatcher: def index
collection = User.search(...).send(:private_execute)
respond_with(collection)
end For sure this approach effectively switches back to the legacy non-lazy searching - but it's a way cheaper for certain cases ) |
My bad, that was another bug. Fixed in the commit above. Can you explain more about the issue you're seeing with |
In short, as per previous Searchkick interface we used the singular Most of those responders rely on duck-typing, i.e. them take
This is just one example, we face a number of similar issues - which can be fixed one-by-one some day for sure.. But for now we decided to turn |
The current plan is
for Searchkick 5to have a new query API similar to Active Record.You can still use pass options to
search
for backwards compatibility, but queries will be performed lazily instead of eagerly.Edit: This wasn't included in Searchkick 5, but there's experimental support for some methods in the latest release. If you have any feedback, please comment below.
The text was updated successfully, but these errors were encountered: