code: @SuppressWarnings("unchecked")
      public Q filter(Filter filter) {
          if (filters.isEmpty()) {
              this.filter = filter;
              filters = ImmutableList.of(filter);
          } else {
              this.filter = null;
              if (filters.size() == 1) {
                  filters = new ArrayList<Filter>();
              }
              filters.add(filter);
          }
          return (Q) this;
      }
docs: Apply the given Lucene filter to the search results
  
  @param filter
  filter
  @return the current object