/lucene-3.6.0/solr/client/ruby/solr-ruby/lib/solr/response/ |
H A D | standard.rb | 31 def hits method in class:Solr 54 # supports enumeration of hits 55 # TODO revisit - should this iterate through *all* hits by re-requesting more?
|
/lucene-3.6.0/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/ |
H A D | TestRealTime.java | 52 assertEquals(1, collector.hits); 61 assertEquals(2, collector.hits); 66 private int hits = 0; field in class:TestRealTime.Collector 75 hits++;
|
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/ |
H A D | TestSearchForDuplicates.java | 105 ScoreDoc[] hits = searcher.search(query, null, MAX_DOCS, sort).scoreDocs; 106 printHits(out, hits, searcher); 107 checkHits(hits, MAX_DOCS, searcher); 113 hits = null; 120 hits = searcher.search(query, null, MAX_DOCS, sort).scoreDocs; 121 printHits(out, hits, searcher); 122 checkHits(hits, MAX_DOCS, searcher); 130 private void printHits(PrintWriter out, ScoreDoc[] hits, Searcher searcher ) throws IOException { argument 131 out.println(hits.length + " total results\n"); 132 for (int i = 0 ; i < hits 140 checkHits(ScoreDoc[] hits, int expectedCount, Searcher searcher) argument [all...] |
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/ |
H A D | TestTopDocsMerge.java | 184 System.out.println(" top search: " + topHits.totalHits + " totalHits; hits=" + (topHits.scoreDocs == null ? "null" : topHits.scoreDocs.length)); 211 System.out.println(" shard=" + shardIDX + " " + subHits.totalHits + " totalHits hits=" + (subHits.scoreDocs == null ? "null" : subHits.scoreDocs.length)); 224 System.out.println(" mergedHits: " + mergedHits.totalHits + " totalHits; hits=" + (mergedHits.scoreDocs == null ? "null" : mergedHits.scoreDocs.length)); 249 private void rebaseDocIDs(int docBase, TopDocs hits) { argument 251 if (hits instanceof TopFieldDocs) { 252 TopFieldDocs fieldHits = (TopFieldDocs) hits; 260 for(int hitIDX=0;hitIDX<hits.scoreDocs.length;hitIDX++) { 261 final ScoreDoc sd = hits.scoreDocs[hitIDX];
|
H A D | TestCustomSearcherSort.java | 94 // search and check hits 109 // search and check hits 124 // search and check hits 134 // store hits in TreeMap - TreeMap does not allow duplicates; existing 147 // besides the sorting both sets of hits must be identical 164 // log("All hits matched"); 166 log("Couldn't match " + resultMap.size() + " hits."); 172 * Check the hits for duplicates. 174 * @param hits 176 private void checkHits(ScoreDoc[] hits, Strin argument [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/search/ |
H A D | TestTopDocsMerge.java | 184 System.out.println(" top search: " + topHits.totalHits + " totalHits; hits=" + (topHits.scoreDocs == null ? "null" : topHits.scoreDocs.length)); 211 System.out.println(" shard=" + shardIDX + " " + subHits.totalHits + " totalHits hits=" + (subHits.scoreDocs == null ? "null" : subHits.scoreDocs.length)); 224 System.out.println(" mergedHits: " + mergedHits.totalHits + " totalHits; hits=" + (mergedHits.scoreDocs == null ? "null" : mergedHits.scoreDocs.length)); 249 private void rebaseDocIDs(int docBase, TopDocs hits) { argument 251 if (hits instanceof TopFieldDocs) { 252 TopFieldDocs fieldHits = (TopFieldDocs) hits; 260 for(int hitIDX=0;hitIDX<hits.scoreDocs.length;hitIDX++) { 261 final ScoreDoc sd = hits.scoreDocs[hitIDX];
|
H A D | TestCustomSearcherSort.java | 94 // search and check hits 109 // search and check hits 124 // search and check hits 134 // store hits in TreeMap - TreeMap does not allow duplicates; existing 147 // besides the sorting both sets of hits must be identical 164 // log("All hits matched"); 166 log("Couldn't match " + resultMap.size() + " hits."); 172 * Check the hits for duplicates. 174 * @param hits 176 private void checkHits(ScoreDoc[] hits, Strin argument [all...] |
/lucene-3.6.0/solr/core/src/java/org/apache/solr/spelling/ |
H A D | SpellCheckCollation.java | 24 private int hits; field in class:SpellCheckCollation 46 return hits; 49 public void setHits(int hits) { argument 50 this.hits = hits;
|
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/ |
H A D | TestSearchForDuplicates.java | 115 ScoreDoc[] hits = searcher.search(query, null, MAX_DOCS, sort).scoreDocs; 116 printHits(out, hits, searcher); 117 checkHits(hits, MAX_DOCS, searcher); 123 hits = null; 130 hits = searcher.search(query, null, MAX_DOCS, sort).scoreDocs; 131 printHits(out, hits, searcher); 132 checkHits(hits, MAX_DOCS, searcher); 140 private void printHits(PrintWriter out, ScoreDoc[] hits, Searcher searcher ) throws IOException { argument 141 out.println(hits.length + " total results\n"); 142 for (int i = 0 ; i < hits 150 checkHits(ScoreDoc[] hits, int expectedCount, Searcher searcher) argument [all...] |
/lucene-3.6.0/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/ |
H A D | ShingleAnalyzerWrapperTest.java | 95 protected void compareRanks(ScoreDoc[] hits, int[] ranks) throws Exception { argument 96 assertEquals(ranks.length, hits.length); 98 assertEquals(ranks[i], hits[i].doc); 107 ScoreDoc[] hits = queryParsingTest(new ShingleAnalyzerWrapper 111 compareRanks(hits, ranks); 118 ScoreDoc[] hits = queryParsingTest(new ShingleAnalyzerWrapper 122 compareRanks(hits, ranks); 129 ScoreDoc[] hits = queryParsingTest(new ShingleAnalyzerWrapper 133 compareRanks(hits, ranks); 140 ScoreDoc[] hits [all...] |
/lucene-3.6.0/lucene/contrib/remote/src/test/org/apache/lucene/search/ |
H A D | TestRemoteSort.java | 220 // hits are sorted 349 TopDocs hits = searcher.search (query, null, expectedResult.length(), sort); 350 ScoreDoc[] result = hits.scoreDocs; 351 assertEquals(hits.totalHits, expectedResult.length()); 364 private HashMap<String, Float> getScores (ScoreDoc[] hits, Searcher searcher) argument 367 int n = hits.length; 369 Document doc = searcher.doc(hits[i].doc); 372 scoreMap.put (v[0], Float.valueOf(hits[i].score));
|
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/index/ |
H A D | TestBackwardsCompatibility.java | 282 private void testHits(ScoreDoc[] hits, int expectedCount, IndexReader reader) throws IOException { argument 283 final int hitCount = hits.length; 284 assertEquals("wrong number of hits", expectedCount, hitCount); 286 reader.document(hits[i].doc); 287 reader.getTermFreqVectors(hits[i].doc); 338 ScoreDoc[] hits = searcher.search(new TermQuery(new Term("content", "aaa")), null, 1000).scoreDocs; 342 Document d = searcher.doc(hits[0].doc); 345 testHits(hits, 34, searcher.getIndexReader()); 352 hits = searcher.search(new TermQuery(new Term("utf8", "\u0000")), null, 1000).scoreDocs; 353 assertEquals(34, hits [all...] |
/lucene-3.6.0/lucene/test-framework/src/java/org/apache/lucene/search/ |
H A D | CheckHits.java | 32 * Utility class for asserting expected hits in tests. 169 ScoreDoc[] hits = searcher.search(query, 1000).scoreDocs; 177 for (int i = 0; i < hits.length; i++) { 178 actual.add(Integer.valueOf(hits[i].doc)); 187 public static void checkDocIds(String mes, int[] results, ScoreDoc[] hits) argument 189 Assert.assertEquals(mes + " nr of hits", hits.length, results.length); 191 Assert.assertEquals(mes + " doc nrs for hit " + i, results[i], hits[i].doc);
|
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/index/ |
H A D | TestBackwardsCompatibility.java | 278 private void testHits(ScoreDoc[] hits, int expectedCount, IndexReader reader) throws IOException { argument 279 final int hitCount = hits.length; 280 assertEquals("wrong number of hits", expectedCount, hitCount); 282 reader.document(hits[i].doc); 283 reader.getTermFreqVectors(hits[i].doc); 334 ScoreDoc[] hits = searcher.search(new TermQuery(new Term("content", "aaa")), null, 1000).scoreDocs; 338 Document d = searcher.doc(hits[0].doc); 341 testHits(hits, 34, searcher.getIndexReader()); 348 hits = searcher.search(new TermQuery(new Term("utf8", "\u0000")), null, 1000).scoreDocs; 349 assertEquals(34, hits [all...] |
/lucene-3.6.0/lucene/backwards/src/test-framework/java/org/apache/lucene/search/ |
H A D | CheckHits.java | 164 ScoreDoc[] hits = searcher.search(query, 1000).scoreDocs; 172 for (int i = 0; i < hits.length; i++) { 173 actual.add(Integer.valueOf(hits[i].doc)); 182 public static void checkDocIds(String mes, int[] results, ScoreDoc[] hits) argument 184 Assert.assertEquals(mes + " nr of hits", hits.length, results.length); 186 Assert.assertEquals(mes + " doc nrs for hit " + i, results[i], hits[i].doc);
|
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/ |
H A D | FastLRUCache.java | 218 private static String calcHitRatio(long lookups, long hits) { argument 220 if (lookups == hits) return "1.00"; 221 int hundredths = (int) (hits * 100 / lookups); // rounded down 231 long hits = stats.getCumulativeHits(); 237 lst.add("hits", hits); 238 lst.add("hitratio", calcHitRatio(lookups, hits));
|
H A D | LFUCache.java | 224 private static String calcHitRatio(long lookups, long hits) { argument 226 if (lookups == hits) return "1.00"; 227 int hundredths = (int) (hits * 100 / lookups); // rounded down 237 long hits = stats.getCumulativeHits(); 243 lst.add("hits", hits); 244 lst.add("hitratio", calcHitRatio(lookups, hits));
|
H A D | LRUCache.java | 41 AtomicLong hits = new AtomicLong(); field in class:LRUCache.CumulativeStats 51 private long hits; field in class:LRUCache 134 // only increment lookups and hits if we are live. 138 hits++; 139 stats.hits.incrementAndGet(); 245 private static String calcHitRatio(long lookups, long hits) { argument 247 if (lookups==hits) return "1.00"; 248 int hundredths = (int)(hits*100/lookups); // rounded down 253 int ones = (int)(hits*100 / lookups); 254 int tenths = (int)(hits*100 [all...] |
/lucene-3.6.0/solr/core/src/java/org/apache/solr/util/ |
H A D | ConcurrentLFUCache.java | 96 e.hits.incrementAndGet(); 179 ce.hitsCopy = ce.hits.get(); 182 ce.hits.set(ce.hitsCopy >>> 1); 188 // If the hits are not equal, we can remove before adding 236 ce.hitsCopy = ce.hits.get(); 241 // If the hits are not equal, we can remove before adding 280 ce.hitsCopy = ce.hits.get(); 285 // If the hits are not equal, we can remove before adding 320 volatile AtomicLong hits = new AtomicLong(0); field in class:ConcurrentLFUCache.CacheEntry 353 return "key: " + key + " value: " + value + " hits [all...] |
/lucene-3.6.0/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/ |
H A D | HighlighterTest.java | 102 TopDocs hits; field in class:HighlighterTest 116 TopDocs hits = searcher.search(query, 10); 122 for (int i = 0; i < hits.scoreDocs.length; i++) { 123 Document doc = searcher.doc(hits.scoreDocs[i].doc); 127 .getIndexReader(), hits.scoreDocs[i].doc, FIELD_NAME, doc, analyzer); 195 for (int i = 0; i < hits.totalHits; i++) { 196 String text = searcher.doc(hits.scoreDocs[i].doc).get(FIELD_NAME); 244 for (int i = 0; i < hits.totalHits; i++) { 245 String text = searcher.doc(hits.scoreDocs[i].doc).get(FIELD_NAME); 266 for (int i = 0; i < hits 1933 doStandardHighlights(Analyzer analyzer, IndexSearcher searcher, TopDocs hits, Query query, Formatter formatter) argument 1938 doStandardHighlights(Analyzer analyzer, IndexSearcher searcher, TopDocs hits, Query query, Formatter formatter, boolean expandMT) argument [all...] |