code: private void calculateDocFilter() throws IOException
     {
        PerQueryCache cache = PerQueryCache.getInstance();
        @SuppressWarnings("unchecked")
        Map<String, BitSet> readerCache = 
                 (Map<String, BitSet>)cache.get(MatchAllScorer.class, reader);
        if (readerCache == null)
        {
           readerCache = new HashMap<String, BitSet>();
           cache.put(MatchAllScorer.class, reader, readerCache);
        }
        // get BitSet for field
        docFilter = (BitSet)readerCache.get(field);
  
        if (docFilter != null)
        {
           // use cached BitSet;
           return;
        }
  
        // otherwise calculate new
        docFilter = new BitSet(reader.maxDoc());
        // we match all terms
        String namedValue = FieldNames.createNamedValue(field, "");
        TermEnum terms = reader.terms(new Term(FieldNames.PROPERTIES, namedValue));
        try
        {
           TermDocs docs = reader.termDocs();
           try
           {
              while (terms.term() != null && terms.term().field() == FieldNames.PROPERTIES
                 && terms.term().text().startsWith(namedValue))
              {
                 docs.seek(terms);
                 while (docs.next())
                 {
                    docFilter.set(docs.doc());
                 }
                 terms.next();
              }
           }
           finally
           {
              docs.close();
           }
        }
        finally
        {
           terms.close();
        }
  
        // put BitSet into cache
        readerCache.put(field, docFilter);
     }
docs: Calculates a BitSet filter that includes all the nodes
  that have content in properties according to the field name
  passed in the constructor of this MatchAllScorer.
  
  @throws IOException if an error occurs while reading from
  the search index.