Esempio n. 1
0
        /// <summary>
        /// Expert: by default, the cached filter will be shared
        /// across reopened segments that only had changes to their
        /// deletions.  
        /// </summary>
        /// <param name="filter">Filter to cache results of</param>
        /// <param name="deletesMode">See <see cref="DeletesMode" /></param>
        ///
        public CachingWrapperFilter(Filter filter, DeletesMode deletesMode)
        {
            this.filter = filter;
            cache = new AnonymousFilterCache(deletesMode);

            //cache = new FilterCache(deletesMode)
            // {
            //  public Object mergeDeletes(final IndexReader r, final Object docIdSet) {
            //    return new FilteredDocIdSet((DocIdSet) docIdSet) {
            //      protected boolean match(int docID) {
            //        return !r.isDeleted(docID);
            //      }
            //    };
            //  }
            //};
        }
 public FilterCache(DeletesMode deletesMode)
 {
     this.deletesMode = deletesMode;
 }
 public AnonymousFilterCache(DeletesMode deletesMode) : base(deletesMode)
 {
 }