final float norm = similarity.computeNorm(field.name(), invertState); bnorm.add(Similarity.getDefault().encodeNormValue(norm));
/** * Creates a new scorer * @param reader */ NotQueryScorer(IndexReader reader) { super(Similarity.getDefault()); this.reader = reader; }
/** * Creates a new scorer * @param reader */ NotQueryScorer(IndexReader reader) { super(Similarity.getDefault()); this.reader = reader; }
/** * Creates a new scorer * @param reader */ NotQueryScorer(IndexReader reader) { super(Similarity.getDefault()); this.reader = reader; }
public Similarity getSimilarity() { return Similarity.getDefault(); } };
/** * Creates a new MatchAllScorer. * * @param reader the IndexReader * @param field the field name to match. * @throws IOException if an error occurs while collecting hits. * e.g. while reading from the search index. */ MatchAllScorer(IndexReader reader, String field, PerQueryCache cache) throws IOException { super(Similarity.getDefault()); this.reader = reader; this.field = field; calculateDocFilter(cache); }
/** * Creates a new MatchAllScorer. * * @param reader the IndexReader * @param field the field name to match. * @throws IOException if an error occurs while collecting hits. * e.g. while reading from the search index. */ MatchAllScorer(IndexReader reader, String field, PerQueryCache cache) throws IOException { super(Similarity.getDefault()); this.reader = reader; this.field = field; calculateDocFilter(cache); }
private Similarity similarity = Similarity.getDefault();
/** * Creates a new MatchAllScorer. * * @param reader the IndexReader * @param field the field name to match. * @throws IOException if an error occurs while collecting hits. * e.g. while reading from the search index. */ MatchAllScorer(IndexReader reader, String field) throws IOException { super(Similarity.getDefault()); this.reader = reader; this.field = field; calculateDocFilter(); }
private Similarity similarity = Similarity.getDefault();
/** * {@inheritDoc} */ public Explanation explain(IndexReader reader, int doc) throws IOException { return new Explanation(Similarity.getDefault().idf(reader.maxDoc(), reader.maxDoc()), "matchAll"); } }
/** * {@inheritDoc} */ public Explanation explain(IndexReader reader, int doc) throws IOException { return new Explanation(Similarity.getDefault().idf(reader.maxDoc(), reader.maxDoc()), "matchAll"); } }
/** * {@inheritDoc} */ @Override public Explanation explain(IndexReader reader, int doc) throws IOException { return new Explanation(Similarity.getDefault().idf(reader.maxDoc(), reader.maxDoc()), "matchAll"); } }
public void testMigration() throws Exception { List<Document> docs = new ArrayList<Document>(); docs.add(createDocument("ab", "a")); docs.add(createDocument("a", "b")); docs.add(createDocument("abcd", "c")); docs.add(createDocument("abc", "d")); DirectoryManager dirMgr = new RAMDirectoryManager(); PersistentIndex idx = new PersistentIndex("index", new StandardAnalyzer(Version.LUCENE_36), Similarity.getDefault(), new DocNumberCache(100), new IndexingQueue(new IndexingQueueStore(new RAMDirectory())), dirMgr, 0); idx.addDocuments(docs.toArray(new Document[docs.size()])); idx.commit(); IndexMigration.migrate(idx, dirMgr, SEP_CHAR); }