title: Best way to search function in symfony 2
body: <p>I have a search function on my website implemented with elasticsearch.
  Now I have a little question about design.</p>
  
  <p>I have a <code>searchAction</code> with route <code>/search</code> that takes a parameter in the query string. Like <code>/search?terms=...</code>.</p>
  
  <p>I would like to make the results list filterable, but I have some doubts about the right design to achieve this.</p>
  
  <p>What is the best solution to make a list of filtered results? </p>
  
  <p>If I pass the filter parameter I need to specify a form action with the current url and append the current query string like a link, right?
  Example:</p>
  
  <pre><code>&lt;form action="{{ current_pat }} ~ {{ query_string }}" method="post"&gt;
      &lt;input type="checkbox" name="filter_one"&gt;....
  </code></pre>
  
  <p>In this case the url will like: <code>/search?terms=...</code> and in <code>$post</code> I have the filter. Is this the right solution, or is a list of links better?
  Example:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;a href="{{current_path}} ~ {{ query_string }} ~ {{ this_filter }}"&gt;... 
      &lt;li&gt;&lt;a href="{{current_path}} ~ {{ query_string }} ~ {{ this_another_filter }}"&gt;
  ...
  </code></pre>
  
  <p>In this case the url will be like: <code>/search?terms=...&amp;this_filter=...</code></p>
  
  <p>In the form case with the get parameter and post filter I need to take both type of parameters in the search action. Is this good?</p>
  
  <p>Instead the link will now have all parameters in the <code>$get</code> request, but I don't like to build the url with query strings in the template.</p>
  
  <p>What's the best way?</p>