Showing results from json-string in Wordpress search results page
We're using a service called Pandosearch which indexes your website and provides a json-string with results after a call to the service.
Example call: When you search for pandosearch in the developer.pandosearch.com-collection you can call - https://public.pandosearch.com/developer.pandosearch.com/search?q=pandosearch.
Example result:
{total:10,hits:[{type:page,url:https://developer.pandosearch.com/api/search/,fields:{title:Search,body:When processing a request, bPandosearch/b is using multiple fields for each document in the collection. The exact fields depend on the specific configuration for the collection. Request To retrieve search results from bPandosearch/b, make a GET request to the…}},{type:page,url:https://developer.pandosearch.com/api/,fields:{title:Introduction,body:Introduction The bPandosearch/b API allows you to perform search requests against collections of indexed content. Possibilities include searching, filtering, sorting, autocomplete suggestions, and more. Terminology Although we try to use plain language as…}},{type:page,url:https://developer.pandosearch.com/,fields:{title:Developer documentation,body:…documentation Hi! Welcome to the bPandosearch/b developer documentation. These pages contain technical guides and reference documentation for working with bPandosearch/b. Intended readers are people implementing bPandosearch/b, such as software developers and…}}],facets:{docType:[{display:page,key:page,count:10}]},request:{q:pandosearch,page:1,size:3,facets:{},full:false,nocorrect:false,track:true,notiming:false},received:{q:pandosearch,size:3},pagination:{current:1,numPages:4,numResults:10,prelink:?q=pandosearchsize=3,resultsPerPage:3},timing:{search:5.98,search:took:4,request:9.58}}
I've got this integrated into the Wordpress search result page with a template_redirect
action/hook, but I can't seem to get to show the results like Wordpress search results properly. Does anyone have an example on how to do this?
Topic plugin-json-api json plugin-development Wordpress search
Category Web