Displaying list result from Algolia search

We are facing issue while displaying data from Algolia search result in Community version.

<input type="text" id="search-input" class="form-control" name="q" placeholder="Search"  value="{{ $search }}">
<div id="hits-container"></div>
<div id="pagination"></div>
      


<script src="https://cdn.jsdelivr.net/npm/instantsearch.js@2.3/dist/instantsearch.min.js"></script>

And my search.js

  search.addWidget(
  instantsearch.widgets.hits({
    container: '#hits-container',
    templates: {
      empty: 'No results',
    }
  }));

search.addWidget(
  instantsearch.widgets.pagination({
    container: '#pagination'
  })
);

search.addWidget(
  instantsearch.widgets.searchBox({
    container: '#search-input',
    placeholder: 'Search for products',
    autofocus: true,
    poweredBy: true,
    reset: true,
    loadingIndicator: true,
    cssClasses: {
    	input: ['input-group', 'input', 'form-element'],
    }
  })
);

search.start();

Algolia will return result on search API. But it is not displayed in DIV tag. Any widget definition is missing here?

I think you’re just missing your item template.

search.addWidget(
  instantsearch.widgets.hits({
    container: '#hits-container',
    templates: {
      empty: 'No results',
      item: document.getElementById('hit-template').innerHTML,
    }
  }));

Related docs:

@chad : I have tried item: '<strong>Hit {{objectID}}</strong>: {{{_highlightResult.name.value}}}' . But no luck.

API response :
{
“results”:[
{
“hits”:[
{
“id”:1,
“category”:" “import”",
“category_type”:“Product”,
" name":“abc”,
" description":“abc”,
“website”:“abc”,
“contact”:"",
" email":"",
" country":"",
" state":"",
" image_url":"",
" facebook_url":"",
" linkedin_url":"",
" twitter_url":"",
" video_url":"",
" blog_url":"",
" keywords":"",
“objectID”:“4XXX551”,
“_highlightResult”:{

Is there anyway we can debug this using console? I’m not getting any error also.

It looks like conflicting with another js file. I have included js file here https://codepen.io/anon/pen/rvVeML. How we can avoid conflicts?