Fulltext Search with Laravel
You can use the Fulltext predicate to search a document for a given term or terms.
The fulltext predicate searches the term in any of the following fields:
- Rich Text
- Key Text
To learn more about this predicate checkout the Query Predicate Reference page.
Note that the fulltext search is not case sensitive.
This example shows how to query for all the documents of the custom type "blog-post" that contain the word "news".
'document.type', 'blog-post'), Predicates::fulltext('document', 'news') ] ); // $response contains the response object, $response->results holds the retrieved documents$response = $api->query( [ Predicates::at(
Was this article helpful?
Can't find what you're looking for? Get in touch with us on our Community Forum.