I have implemented ZendSearch
into my Laravel
application. I am using it as my search engine where users will type a search word, and then ZendSearch
will return me an array of results ordered by relevance. However, the array that ZendSearch
returns, only returns my record ID's (it doesn't return any of the actual record information).
What would next be the correct way to query my Model to retrieve the results based on the ZendSearch
array results which is just an array of ID's ordered based on relevance.
I know of Model::find(1)
which would return my record with an ID of 1, but how can I feed that find()
method an array of ID's that I want to be returned in the order I am giving it.
findMany
in the document either, and it's in the API document. – Ziegfeld