Hello I am currently using search api and I want to get the top five result from search query How I can get that result in search Api
Etkö löydä elokuvaa tai TV-ohjelmaa? Kirjaudu sisään lisätäksesi se.
Haluatko pisteyttää vai lisätä tämän nimikkeen listaan?
Ei rekisteröitynyt jäsen?
Vastaus käyttäjältä Travis Bell
3 lokakuu 2016 klo 5:20PM
Hi Ahmed,
The search method returns a
results
field which is just an array. If you are only interested in seeing the top 5 results, you can just grab the first five items from the array. Most languages have an easy way of doing this, in Ruby it's as simple as:Hope that helps.