Algolia OR Condition
<p>I noticed that separating search terms by a comma results in an AND condition: dog, cat = dog AND cat.
Is there a way to execute an OR condition?</p>

<p>Does this look like it would do the trick?</p>

<pre><code>index.search("shirts", {
  "facets": "*",
  "hitsPerPage": 10,
  "facetFilters": [
    "size:M",
    "size:L",
  ],
  "maxValuesPerFacet": 100
});
</code></pre>

<p>Does this look like it might work for dynamically passing the facet values?  It says in the docs:</p>

<blockquote>
  <p>You can also use a JSON string array encoding (for example <code>encodeURIComponent('[["category:Book","category:Movie"],"author:John Doe"]')</code> ). </p>
</blockquote>

<pre><code>"facetFilters": json_encode(["size:M","size:L"])
</code></pre>

<hr>

<p>For anyone looking for how to search using an OR condition, they are called "OR refinements" in the docs.  Here is some code that worked:</p>

<pre><code>$algolia_config_settings = array("facets" =&gt; "*",
                                 "facetFilters" =&gt; array( array("pa_size:xxs", 
                                                                "pa_size:5xl") ),
                                 "hitsPerPage" =&gt; 1000); 
</code></pre>