Examples of ModifiedEntryFilter


Examples of org.apache.lucene.gdata.utils.ModifiedEntryFilter

        Searcher s = new IndexSearcher(this.reader);
        Query q = new TermQuery(new Term(fieldFeedId,feedID));
        Hits hits = s.search(q);
        assertEquals(2,hits.length());
        
        hits = s.search(q,new ModifiedEntryFilter(this.excludeList.toArray(new String[0]),StorageEntryWrapper.FIELD_ENTRY_ID));
        assertEquals(1,hits.length());
        this.excludeList.add("2");
        hits = s.search(q,new ModifiedEntryFilter(this.excludeList.toArray(new String[0]),StorageEntryWrapper.FIELD_ENTRY_ID));
        assertEquals(0,hits.length());
        this.excludeList.add(null);
        this.excludeList.add("5");
        hits = s.search(q,new ModifiedEntryFilter(this.excludeList.toArray(new String[0]),StorageEntryWrapper.FIELD_ENTRY_ID));
        assertEquals(0,hits.length());
        
    }
View Full Code Here

Examples of org.apache.lucene.gdata.utils.ModifiedEntryFilter

                    StorageEntryWrapper.FIELD_ENTRY_ID, id));
            // use an OR query
            query.add(new BooleanClause(termQuery, Occur.SHOULD));
        }

        return this.searcher.search(query, new ModifiedEntryFilter(this.buffer
                .getExculdList(),StorageEntryWrapper.FIELD_ENTRY_ID));
    }
View Full Code Here

Examples of org.apache.lucene.gdata.utils.ModifiedEntryFilter

     */
    private Hits storageFeedQuery(final String feedId, final Sort sort)
            throws IOException {
        TermQuery query = new TermQuery(new Term(
                StorageEntryWrapper.FIELD_FEED_REFERENCE, feedId));
        return this.searcher.search(query, new ModifiedEntryFilter(this.buffer
                .getExculdList(),StorageEntryWrapper.FIELD_ENTRY_ID), sort);

    }
View Full Code Here

Examples of org.apache.lucene.gdata.utils.ModifiedEntryFilter

                StorageEntryWrapper.FIELD_ENTRY_ID, entryId));
        /*
         * Filter entries inside the buffer, buffered entries might contain
         * deleted entries. These entries must be found!!
         */
        return this.searcher.search(termQuery, new ModifiedEntryFilter(
                this.buffer.getExculdList(),StorageEntryWrapper.FIELD_ENTRY_ID));

    }
View Full Code Here

Examples of org.apache.lucene.gdata.utils.ModifiedEntryFilter

        Searcher s = new IndexSearcher(this.reader);
        Query q = new TermQuery(new Term(fieldFeedId,feedID));
        Hits hits = s.search(q);
        assertEquals(2,hits.length());
        
        hits = s.search(q,new ModifiedEntryFilter(this.excludeList.toArray(new String[0]),StorageEntryWrapper.FIELD_ENTRY_ID));
        assertEquals(1,hits.length());
        this.excludeList.add("2");
        hits = s.search(q,new ModifiedEntryFilter(this.excludeList.toArray(new String[0]),StorageEntryWrapper.FIELD_ENTRY_ID));
        assertEquals(0,hits.length());
        this.excludeList.add(null);
        this.excludeList.add("5");
        hits = s.search(q,new ModifiedEntryFilter(this.excludeList.toArray(new String[0]),StorageEntryWrapper.FIELD_ENTRY_ID));
        assertEquals(0,hits.length());
        
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.