title: Solr result filter for user specific data
body: <p>I'd like to manipulate the result of a solr server search. I don't think it's possible on the Server side filter, because the information is only available on the client side at runtime.</p>
  
  <p>I tried following:</p>
  
  <pre><code>private void filterKernSortiment ( SolrDocumentList docsList )
  {
      List&lt;SolrDocument&gt; filteredItems = new ArrayList&lt;SolrDocument&gt;();
  
      Iterator&lt;SolrDocument&gt; iter = docsList.iterator();
      while ( iter.hasNext() )
      {
          SolrDocument doc = iter.next();
  
          String artnr = doc.getFieldValue( "artnr" ).toString();
          String lfnt = doc.getFieldValue( "lfnt" ).toString();
  
          if (  ! user.isForUserInStock( artnr, lfnt ) )
          {
              filteredItems.add( doc );
          }
      }
      log.debug( "filteredItems=" + filteredItems.size() );
  
      Iterator&lt;SolrDocument&gt; iterFilter = filteredItems.iterator();
      while ( iterFilter.hasNext() )
      {
          SolrDocument doc = iterFilter.next();
          docsList.remove( doc );
      }
  }
  </code></pre>
  
  <p>The SolrDocumentList is filtered correctly, but the getFacetField function gives the result of the unfiltered SolrDocumentList.
  Do I have to manipulate the FacetField Lists too or do you know a a better solution for the problem?</p>