title: search with comma separated values in elasticsearch
body: <p>I am quite new in elastic search here so if anybody can help me here</p>
  
  <p>Suppose I have selected </p>
  
  <pre><code>1) Category - Hollywood
  2) Sub-Category - Bond Special
  3) Genre - Action &amp; Drama &amp; Comedy ( as multiple selection will be there )
  4) Language - English, Russian and Hindi ( as multiple selection will be there)
  5) Release Year - 1990,1999,2000 ( as multiple selection will be there)
  6) 3D Movie - True OR False (any one will be selected)
  7) SortBy - “A-Z”OR “Z-A” OR “Date”
  </code></pre>
  
  <p>Can anyone help me in making this query for elastic-search. I will use "match_phrase" for making AND condition but the issue is matching parameters or search parameter will be multiple and comma separated (u can say).
  and my index array is given below : -</p>
  
  <pre><code>[_source] =&gt; Array (
                                  [id] =&gt; 43
                                  [value] =&gt; GREENBERG
                                  [imageName] =&gt; Done
                                  [date] =&gt; (1905) USA (Bengali)
                                  [language] =&gt; (Bengali) | 1905 |  1.47hrs
                                  [directorName] =&gt; Alejandro González Iñárritu, Ang Lee
                                  [castForSearch] =&gt; Ben Stiller, John Turturro
                                  [viewDetailsUrl] =&gt; /movie/greenberg
                                  [movieType] =&gt; Animation
                                  [rating] =&gt; 0
                                  [cast] =&gt; Ben Stiller, John Turturro, Olivier Martinez
                                  [synopsis] =&gt; A man from Los Angeles, who moved to New York years ago, returns to L.A. to figure out his life while he house-sits for his brother. He soon sparks with his brother's assistant.
                                  [code] =&gt; HLR06
                                  [type] =&gt; Non-3D
                                  [trailer] =&gt; https://www.youtube.com/watch?v=cwdliqOGTLw
                                  [imdb_code] =&gt; 1234654
                                  [tags] =&gt; Array
                                      (
                                          [0] =&gt; Animation
                                      )
  
                                  [genre] =&gt; Adventure
                                  [languages] =&gt; Bengali
                                  [categories_filter] =&gt; Array
                                      (
                                          [0] =&gt; Category 2,Hollywood
                                      )
  
                                  [sub_categories_filter] =&gt; Array
                                      (
                                          [0] =&gt; Sub-Category 1,Sub-Category 4,Sub-Category 5,Sub-Category 6,Sub-Category 7
                                      )
  
                                      )
  </code></pre>
  
  <hr>
  
  <pre><code>Weekly Sunday 12 AM
  everyday 12 AM 
  every day 12:15 AM
  daily 12:01 AM
  daily 12:01 AM
  </code></pre>
  
  <hr>
  
  <pre><code>joinScreenCancellationScheduler - Weekly Sunday 12 AM 
  0 0 * * 7 curl &lt;url&gt;
  goLiveDate - everyday 12 AM 
  0 0 * * * curl &lt;url&gt;
  nearestDateDisable - every day 12:15 AM
  15 0 * * * curl &lt;url&gt;
  reminderOfEvent - daily 12:01 AM
  01 0 * * * curl &lt;url&gt;
  thresholdNotMet - daily 12:01 AM
  daily 12:01 AM
  </code></pre>