title: React InstantSearch: RefinementList filters overrides Configure filters
body: <h1>Question</h1>
  <p>How can I apply custom search filters in a way that is compatible with the filters being applied by the <code>RefinementList</code>?</p>
  <h1>Background</h1>
  <p>I am trying to design search functionality where users can search in two ways:</p>
  <ol>
  <li>The &quot;normal&quot; way of searching for a given string to appear anywhere in any search document</li>
  <li>A specific lookup of a given set if IDs. Users would expect the search result to be all of the search documents that contain any of the IDs given. No more, no less.</li>
  </ol>
  <p>I switch from search option one to option two when I detect that the search input contains only IDs in a valid format</p>
  <h1>Current Implementation</h1>
  <p>I have found that the easiest way to get my search engine (typesense) to return results for search option two is to only use the <code>filter_by</code> option with an asterisk search, like so:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;query_by&quot;:&quot;product_number,ean_number&quot;,
      &quot;collection&quot;:&quot;products&quot;,
      &quot;q&quot;:&quot;*&quot;,
      &quot;filter_by&quot;: &quot;product_number:=[123, 456]&quot;
  }
  </code></pre>
  <p>Which will return any search document with <code>product_number</code> 123 or 456.</p>
  <p>So, in my custom <code>SearchBox</code> component I call <code>refine('*')</code> and set the filters in the <code>Configure</code> component when I detect that the search should follow option two.</p>
  <pre class="lang-js prettyprint-override"><code>&lt;InstantSearch&gt;
    &lt;Configure facetFilters={ buildFilterBy(...) } /&gt;
    &lt;CustomRefinementList {...} /&gt;
  &lt;/InstantSearch&gt;
  </code></pre>
  <p>This works well, but whenever the users selects additional refinements in the <code>CustomRefinementList</code>, the <code>Configure</code> filters are being overwritten and the search now returns <em>all</em> documents that matches the refinements (due to the asterisk search).</p>
  <p>Reading around, it seems like I am not supposed to use the <code>Configure</code> component to apply filters beyond the initial search/render. I would think there should be a way to apply filters through the <code>refine</code> function, though the documentation on what parameters beyond the search string the<code>refine</code> function can accept seems a bit lacking.</p>