<!--
    sphinxcontrib-lunrsearch injects its own search template at the front of the
    line, so to overwrite it, I'm using this template with a different name, and
    specifying it in html_sidebars. This is a temporary measure until we replace
    or remove sphinxcontrib-lunrsearch
-->

<script type="text/javascript">
var Search = {
    store : null,
    setIndex : function (data) {
        this.store = data.store;
    },
};
</script>
{# The script searchindex.js contains the code Search.setIndex(...) where
   the content is an object built from IndexBuilder.freeze(). So we need to
   setup the Search.setIndex function beforehand just to store the data.
   This should all be finished when onload fires, and at that point the code in
   searchbox.js will pull the data out of Search.store and build the actual
   index and callbacks.
 #}
<script src="{{ pathto('searchindex.js', 1) }}" type="text/javascript"></script>

<form class="search" action="" method="get">
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
  <input type="hidden" id="ls_lunrsearch-highlight" value="{{ lunrsearch_highlight }}" />
  <input type="text" class="search-field" id="ls_search-field" name="q" placeholder="Search API..." autocomplete="off" />
  <ul class="results" id="ls_search-results"></ul>
</form>
