/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/analysis/ |
H A D | TestISOLatin1AccentFilter.java | 26 ISOLatin1AccentFilter filter = new ISOLatin1AccentFilter(stream); 27 CharTermAttribute termAtt = filter.getAttribute(CharTermAttribute.class); 28 assertTermEquals("Des", filter, termAtt); 29 assertTermEquals("mot", filter, termAtt); 30 assertTermEquals("cles", filter, termAtt); 31 assertTermEquals("A", filter, termAtt); 32 assertTermEquals("LA", filter, termAtt); 33 assertTermEquals("CHAINE", filter, termAtt); 34 assertTermEquals("A", filter, termAtt); 35 assertTermEquals("A", filter, termAt [all...] |
H A D | TestASCIIFoldingFilter.java | 43 ASCIIFoldingFilter filter = new ASCIIFoldingFilter(stream); 45 CharTermAttribute termAtt = filter.getAttribute(CharTermAttribute.class); 46 filter.reset(); 47 assertTermEquals("Des", filter, termAtt); 48 assertTermEquals("mot", filter, termAtt); 49 assertTermEquals("cles", filter, termAtt); 50 assertTermEquals("A", filter, termAtt); 51 assertTermEquals("LA", filter, termAtt); 52 assertTermEquals("CHAINE", filter, termAtt); 53 assertTermEquals("A", filter, termAt [all...] |
H A D | TestLengthFilter.java | 29 LengthFilter filter = new LengthFilter(false, stream, 2, 6); 30 assertTokenStreamContents(filter, 39 LengthFilter filter = new LengthFilter(true, stream, 2, 6); 40 assertTokenStreamContents(filter,
|
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/analysis/ |
H A D | TestISOLatin1AccentFilter.java | 26 ISOLatin1AccentFilter filter = new ISOLatin1AccentFilter(stream); 27 CharTermAttribute termAtt = filter.getAttribute(CharTermAttribute.class); 28 assertTermEquals("Des", filter, termAtt); 29 assertTermEquals("mot", filter, termAtt); 30 assertTermEquals("cles", filter, termAtt); 31 assertTermEquals("A", filter, termAtt); 32 assertTermEquals("LA", filter, termAtt); 33 assertTermEquals("CHAINE", filter, termAtt); 34 assertTermEquals("A", filter, termAtt); 35 assertTermEquals("A", filter, termAt [all...] |
H A D | TestASCIIFoldingFilter.java | 35 ASCIIFoldingFilter filter = new ASCIIFoldingFilter(stream); 37 CharTermAttribute termAtt = filter.getAttribute(CharTermAttribute.class); 38 filter.reset(); 39 assertTermEquals("Des", filter, termAtt); 40 assertTermEquals("mot", filter, termAtt); 41 assertTermEquals("cles", filter, termAtt); 42 assertTermEquals("A", filter, termAtt); 43 assertTermEquals("LA", filter, termAtt); 44 assertTermEquals("CHAINE", filter, termAtt); 45 assertTermEquals("A", filter, termAt [all...] |
H A D | TestLengthFilter.java | 27 LengthFilter filter = new LengthFilter(false, stream, 2, 6); 28 assertTokenStreamContents(filter, 37 LengthFilter filter = new LengthFilter(true, stream, 2, 6); 38 assertTokenStreamContents(filter,
|
/lucene-3.6.0/lucene/contrib/remote/src/java/org/apache/lucene/search/ |
H A D | RemoteCachingWrapperFilter.java | 26 * The cache is keyed on Filter's hashCode(), so if it sees the same filter twice 44 protected Filter filter; field in class:RemoteCachingWrapperFilter 46 public RemoteCachingWrapperFilter(Filter filter) { argument 47 this.filter = filter; 51 * Uses the {@link org.apache.lucene.search.FilterManager} to keep the cache for a filter on the 58 Filter cachedFilter = FilterManager.getInstance().getFilter(filter);
|
/lucene-3.6.0/lucene/contrib/queries/src/java/org/apache/lucene/search/ |
H A D | FilterClause.java | 24 * A Filter that wrapped with an indication of how that filter 25 * is used when composed with another filter. 32 private final Filter filter; field in class:FilterClause 36 * @param filter A Filter object containing a BitSet 40 public FilterClause(Filter filter, Occur occur) { argument 42 this.filter = filter; 46 * Returns this FilterClause's filter 50 return filter; 68 return this.filter [all...] |
/lucene-3.6.0/solr/core/src/test/org/apache/solr/analysis/ |
H A D | DoubleMetaphoneFilterTest.java | 30 TokenStream filter = new DoubleMetaphoneFilter(stream, 4, false); 31 assertTokenStreamContents(filter, new String[] { "ANTR" }); 36 TokenStream filter = new DoubleMetaphoneFilter(stream, 4, true); 37 assertTokenStreamContents(filter, new String[] { "international", "ANTR" }); 42 TokenStream filter = new DoubleMetaphoneFilter(stream, 4, false); 43 assertTokenStreamContents(filter, new String[] { "KSSK", "KXFS" }); 48 TokenStream filter = new DoubleMetaphoneFilter(stream, 8, false); 49 assertTokenStreamContents(filter, new String[] { "ANTRNXNL" }); 54 TokenStream filter = new DoubleMetaphoneFilter(stream, 8, true); 55 assertTokenStreamContents(filter, ne [all...] |
/lucene-3.6.0/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/payloads/ |
H A D | DelimitedPayloadTokenFilterTest.java | 32 DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter 35 CharTermAttribute termAtt = filter.getAttribute(CharTermAttribute.class); 36 PayloadAttribute payAtt = filter.getAttribute(PayloadAttribute.class); 37 assertTermEquals("The", filter, termAtt, payAtt, null); 38 assertTermEquals("quick", filter, termAtt, payAtt, "JJ".getBytes("UTF-8")); 39 assertTermEquals("red", filter, termAtt, payAtt, "JJ".getBytes("UTF-8")); 40 assertTermEquals("fox", filter, termAtt, payAtt, "NN".getBytes("UTF-8")); 41 assertTermEquals("jumped", filter, termAtt, payAtt, "VB".getBytes("UTF-8")); 42 assertTermEquals("over", filter, termAtt, payAtt, null); 43 assertTermEquals("the", filter, termAt [all...] |
/lucene-3.6.0/lucene/contrib/remote/src/test/org/apache/lucene/search/ |
H A D | RemoteCachingWrapperFilterHelper.java | 34 public RemoteCachingWrapperFilterHelper(Filter filter, boolean shouldHaveCache) { argument 35 super(filter); 45 Filter cachedFilter = FilterManager.getInstance().getFilter(filter); 49 Assert.assertSame("First time filter should be the same ", filter, cachedFilter); 51 Assert.assertNotSame("We should have a cached version of the filter", filter, cachedFilter); 54 if (filter instanceof CachingWrapperFilterHelper) {
|
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/ |
H A D | CachingSpanFilter.java | 25 * filters to simply filter, and then wrap with this class to add caching. 28 private SpanFilter filter; field in class:CachingSpanFilter 38 * @param filter Filter to cache results of 40 public CachingSpanFilter(SpanFilter filter) { argument 41 this(filter, CachingWrapperFilter.DeletesMode.RECACHE); 45 * @param filter Filter to cache results of 48 public CachingSpanFilter(SpanFilter filter, CachingWrapperFilter.DeletesMode deletesMode) { argument 49 this.filter = filter; 82 result = filter [all...] |
H A D | FilterManager.java | 34 * Also could be used as a persistent storage for any filter as long as the 35 * filter provides a proper hashCode(), as that is used as the key in the cache. 102 * Returns the cached version of the filter. Allows the caller to pass up 103 * a small filter but this will keep a persistent version around and allow 104 * the caching filter to do its job. 106 * @param filter The input filter 107 * @return The cached version of the filter 109 public Filter getFilter(Filter filter) { argument 112 fi = cache.get(Integer.valueOf(filter 128 public Filter filter; field in class:FilterManager.FilterItem 131 FilterItem(Filter filter) argument [all...] |
/lucene-3.6.0/lucene/test-framework/src/java/org/apache/lucene/search/ |
H A D | CachingWrapperFilterHelper.java | 26 * A unit test helper class to test when the filter is getting cached and when it is not. 33 * @param filter Filter to cache results of 35 public CachingWrapperFilterHelper(Filter filter) { argument 36 super(filter); 60 return "CachingWrapperFilterHelper("+filter+")"; 66 return this.filter.equals(o); 71 return this.filter.hashCode() ^ 0x5525aacb;
|
/lucene-3.6.0/lucene/backwards/src/test-framework/java/org/apache/lucene/search/ |
H A D | CachingWrapperFilterHelper.java | 26 * A unit test helper class to test when the filter is getting cached and when it is not. 33 * @param filter Filter to cache results of 35 public CachingWrapperFilterHelper(Filter filter) { argument 36 super(filter); 60 return "CachingWrapperFilterHelper("+filter+")"; 66 return this.filter.equals(o); 71 return this.filter.hashCode() ^ 0x5525aacb;
|
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/ |
H A D | TestPrefixFilter.java | 50 PrefixFilter filter = new PrefixFilter(new Term("category", "/Computers")); 51 Query query = new ConstantScoreQuery(filter); 57 filter = new PrefixFilter(new Term("category", "/Computers/Mac")); 58 query = new ConstantScoreQuery(filter); 63 filter = new PrefixFilter(new Term("category", "/Computers/Linux")); 64 query = new ConstantScoreQuery(filter); 69 filter = new PrefixFilter(new Term("category", "/Computers/Windows")); 70 query = new ConstantScoreQuery(filter); 75 filter = new PrefixFilter(new Term("category", "/Computers/ObsoleteOS")); 76 query = new ConstantScoreQuery(filter); [all...] |
H A D | TestCachingWrapperFilter.java | 43 MockFilter filter = new MockFilter(); 44 CachingWrapperFilter cacher = new CachingWrapperFilter(filter); 46 // first time, nested filter is called 48 assertTrue("first time", filter.wasCalled()); 53 // second time, nested filter should not be called 54 filter.clear(); 56 assertFalse("second time", filter.wasCalled()); 69 final Filter filter = new Filter() { 75 CachingWrapperFilter cacher = new CachingWrapperFilter(filter); 77 // the caching filter shoul 111 assertDocIdSetCacheable(IndexReader reader, Filter filter, boolean shouldCacheable) argument [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/search/ |
H A D | TestPrefixFilter.java | 50 PrefixFilter filter = new PrefixFilter(new Term("category", "/Computers")); 51 Query query = new ConstantScoreQuery(filter); 57 filter = new PrefixFilter(new Term("category", "/Computers/Mac")); 58 query = new ConstantScoreQuery(filter); 63 filter = new PrefixFilter(new Term("category", "/Computers/Linux")); 64 query = new ConstantScoreQuery(filter); 69 filter = new PrefixFilter(new Term("category", "/Computers/Windows")); 70 query = new ConstantScoreQuery(filter); 75 filter = new PrefixFilter(new Term("category", "/Computers/ObsoleteOS")); 76 query = new ConstantScoreQuery(filter); [all...] |
H A D | TestCachingWrapperFilter.java | 43 MockFilter filter = new MockFilter(); 44 CachingWrapperFilter cacher = new CachingWrapperFilter(filter); 46 // first time, nested filter is called 48 assertTrue("first time", filter.wasCalled()); 53 // second time, nested filter should not be called 54 filter.clear(); 56 assertFalse("second time", filter.wasCalled()); 69 final Filter filter = new Filter() { 75 CachingWrapperFilter cacher = new CachingWrapperFilter(filter); 77 // the caching filter shoul 111 assertDocIdSetCacheable(IndexReader reader, Filter filter, boolean shouldCacheable) argument [all...] |
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/ |
H A D | LuceneQueryOptimizer.java | 87 filterQuery.add(q, BooleanClause.Occur.MUST); // filter it 88 //System.out.println("WooHoo... qualified to be hoisted to a filter!"); 94 Filter filter = null; 97 filter = (Filter)cache.get(filterQuery); 99 if (filter == null) { // miss 100 filter = new CachingWrapperFilter(new QueryWrapperFilter(filterQuery)); // construct new entry 102 cache.put(filterQuery, filter); // cache it 107 // YCS: added code to pass out optimized query and filter 110 queryOut[0] = query; filterOut[0] = filter; 113 return searcher.search(query, filter, numHit [all...] |
H A D | SolrConstantScoreQuery.java | 30 * A query that wraps a filter and simply returns a constant score equal to the 31 * query boost for every document in the filter. This Solr extension also supports 40 public SolrConstantScoreQuery(Filter filter) { argument 41 super(filter); 44 /** Returns the encapsulated filter */ 47 return filter; 94 if (filter instanceof SolrFilter) 95 ((SolrFilter)filter).createWeight(context, searcher); 134 result.setDescription("ConstantScoreQuery(" + filter 141 result.setDescription("ConstantScoreQuery(" + filter [all...] |
/lucene-3.6.0/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/ |
H A D | OffsetLimitTokenFilterTest.java | 40 OffsetLimitTokenFilter filter = new OffsetLimitTokenFilter(stream, 10); 41 assertTokenStreamContents(filter, new String[] {"short", "toolong"}); 47 filter = new OffsetLimitTokenFilter(stream, 12); 48 assertTokenStreamContents(filter, new String[] {"short", "toolong"}); 54 filter = new OffsetLimitTokenFilter(stream, 30); 55 assertTokenStreamContents(filter, new String[] {"short", "toolong",
|
/lucene-3.6.0/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/position/ |
H A D | PositionFilterTest.java | 122 PositionFilter filter = new PositionFilter(new TestTokenStream(TEST_TOKEN)); 123 assertTokenStreamContents(filter, TEST_TOKEN, TEST_TOKEN_POSITION_INCREMENTS); 124 filter.reset(); 125 // Make sure that the reset filter provides correct position increments 126 assertTokenStreamContents(filter, TEST_TOKEN, TEST_TOKEN_POSITION_INCREMENTS); 135 ShingleFilter filter = new ShingleFilter(new TestTokenStream(TEST_TOKEN), 6); 136 assertTokenStreamContents(new PositionFilter(filter),
|
/lucene-3.6.0/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/tr/ |
H A D | TestTurkishLowerCaseFilter.java | 33 * Test the Turkish lowercase filter. 43 TurkishLowerCaseFilter filter = new TurkishLowerCaseFilter(stream); 44 assertTokenStreamContents(filter, new String[] {"istanbul", "izmir", 54 TurkishLowerCaseFilter filter = new TurkishLowerCaseFilter(stream); 55 assertTokenStreamContents(filter, new String[] {"istanbul", "izmir", 67 TurkishLowerCaseFilter filter = new TurkishLowerCaseFilter(stream); 68 assertTokenStreamContents(filter, new String[] {"i\u0316stanbul", "izmir",
|
/lucene-3.6.0/lucene/contrib/analyzers/phonetic/src/test/org/apache/lucene/analysis/phonetic/ |
H A D | DoubleMetaphoneFilterTest.java | 37 TokenStream filter = new DoubleMetaphoneFilter(stream, 4, false); 38 assertTokenStreamContents(filter, new String[] { "ANTR" }); 43 TokenStream filter = new DoubleMetaphoneFilter(stream, 4, true); 44 assertTokenStreamContents(filter, new String[] { "international", "ANTR" }); 49 TokenStream filter = new DoubleMetaphoneFilter(stream, 4, false); 50 assertTokenStreamContents(filter, new String[] { "KSSK", "KXFS" }); 55 TokenStream filter = new DoubleMetaphoneFilter(stream, 8, false); 56 assertTokenStreamContents(filter, new String[] { "ANTRNXNL" }); 61 TokenStream filter = new DoubleMetaphoneFilter(stream, 8, true); 62 assertTokenStreamContents(filter, ne [all...] |