title: Algolia instantsearch.js : how to display the results with a random order?
body: <p>I am using Algolia instantsearch.js to display candidates to an election (here: <a href="https://laprimaire.org/candidats/" rel="nofollow noreferrer">https://laprimaire.org/candidats/</a>). I would like the initial display of candidates to be random so that every candidate gets more or less the same visibility.</p>
  
  <p>I read in this answer that it is not a feature of Algolia but that it should be possible to do it anyway with a little js trick : <a href="https://stackoverflow.com/questions/33123488/is-it-possible-to-sort-randomly-and-to-query-on-field-if-it-exists">Is it possible to sort randomly, and to query on field if it exists?</a></p>
  
  <p>Problem is I am using instantsearch.js and I cannot find how to implement the above searchFunction in the case of instantsearch.js.</p>
  
  <p>I see from the documentation that instantsearch can be initialized with a searchFunction which receives a helper as a parameter:
  <a href="https://community.algolia.com/instantsearch.js/documentation/#initialization" rel="nofollow noreferrer">https://community.algolia.com/instantsearch.js/documentation/#initialization</a></p>
  
  <p>However it did not find documentation about this helper and how to manipulate it, so that I can apply the random function to the search results.</p>
  
  <p>Any help would be greatly appreciated !
  Thanks a lot</p>
  
  <p>Thibauld</p>