-
Notifications
You must be signed in to change notification settings - Fork 57
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
Searching dates #5
Comments
Range searches are not yet supported. But it seems like an excellent feature for the next version. In the meantime, you could try using an Advanced Query Callback to modify the query before it gets sent. |
Can you provide any example? I dont know how could i do it. |
Yeah it's bit complicated to use the advanced query callback and requires you to really dive into the package and understand the internals. Essentially you can get access to the driver's client and then use exposed methods to do advanced queries, but you will be tied to that driver for that implementation. Here's the example from the readme. See how it is altering the $results = Search::index('posts')->select('id', 'created_at')
->search('content', 'fox')
->addCallback(function ($query) {
// Adjust pagination for an elasticsearch query array.
$query['from'] = 0;
$query['size'] = 20;
return $query;
}, 'elasticsearch')
->get(); |
Hi,
This is a question regarding ranges so mark it please.
My question is that is there support for date search? I`m building a portal and i need to implement ranged search with dates, for example i need to search the posts which were published in the past month.
Thanks!
The text was updated successfully, but these errors were encountered: