title: Hibernate search boolean filter
body: <p>I have book entry:</p>
  
  <pre><code>@Entity
  @Indexed 
  public class Book extends BaseEntity {
  @Field
  private String subtitle;
  
  @DateBridge(resolution = Resolution.DAY)
  private Date publicationDate;
  @Field
  private int score;
  @IndexedEmbedded
  @ManyToMany(fetch = FetchType.EAGER)
  @Cascade(value = {CascadeType.ALL})
  private List&lt;Author&gt; authors = new ArrayList&lt;Author&gt;();
  @Field
  @FieldBridge(impl = BooleanBridge.class)
  private boolean prohibited;
  </code></pre>
  
  <p>And filter by boolean field "phohibited"</p>
  
  <pre><code>public class BFilter extends Filter {
  
  @Override
  public DocIdSet getDocIdSet(IndexReader indexReader) throws IOException {
      OpenBitSet bitSet = new OpenBitSet(indexReader.maxDoc());
      TermDocs termDocs = indexReader.termDocs(new Term("prohibited","false"));
      while (termDocs.next()) {
          bitSet.set(termDocs.doc());
      }
      return bitSet;
  }
  }
  </code></pre>
  
  <p>Search method</p>
  
  <pre><code>public List&lt;T&gt; findByQuery(Class c, String q) throws InterruptedException {
      FullTextSession fullTextSession = Search.getFullTextSession(session);
      fullTextSession.createIndexer().startAndWait();
  
      QueryBuilder qb = fullTextSession.getSearchFactory().buildQueryBuilder().forEntity(c).get();
  
      Query luceneQuery = qb
              .keyword()
              .fuzzy()
              .onFields("title", "subtitle", "authors.name", "prohibited", "score")
              .matching(q)
              .createQuery();
  
      FullTextQuery createFullTextQuery = fullTextSession.createFullTextQuery(luceneQuery,      Book.class, BaseEntity.class);
      createFullTextQuery.setFilter(new BFilter());
  
      return createFullTextQuery.list();
  }
  </code></pre>
  
  <p>if I apply that filter - search result is empty. Entries in the database 100% there. What am I doing wrong? If you replace the filter field to "score" that all works, and the result is not empty. Do not search it on a Boolean field</p>