Examples of DefaultSimilarity


Examples of org.apache.lucene.search.DefaultSimilarity

      this.thresholds = Collections.EMPTY_MAP;
    }
    if (sim != null) {
      this.sim = sim;
    } else {
      sim = new DefaultSimilarity();
    }
    is = new IndexSearcher(in);
    is.setSimilarity(sim);
  }
View Full Code Here

Examples of org.apache.lucene.search.DefaultSimilarity

    /**
     * Constructor requiring an IndexReader.
     */
    public MoreLikeThis(IndexReader ir) {
        this(ir, new DefaultSimilarity());
    }
View Full Code Here

Examples of org.apache.lucene.search.DefaultSimilarity

    private DefaultSimilarity similarity;

    @Inject public DefaultSimilarityProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
        super(index, indexSettings, name);
        this.similarity = new DefaultSimilarity();
    }
View Full Code Here

Examples of org.apache.lucene.search.DefaultSimilarity

    try{
      similarity = core.getSchema().getSimilarity();
    }
    catch(Exception e){
      log.error(e.getMessage()+", defaulting to "+DefaultSimilarity.class,e);
      similarity = new DefaultSimilarity();
    }
   
    SolrConfig config = core.getSolrConfig();
 
    int batchSize = config.getInt("zoie.batchSize",1000);
View Full Code Here

Examples of org.apache.lucene.search.DefaultSimilarity

    _realtimeIndexing = rtIndexing;
    _interpreter = interpreter;

    _analyzer = analyzer == null ? new StandardAnalyzer(Version.LUCENE_CURRENT)
    : analyzer;
    _similarity = similarity == null ? new DefaultSimilarity() : similarity;
    log.info("creating Zoie instance --> "
        + _dirMgr.toString()
        + "\t"
        + _interpreter.toString()
        + "\t"
View Full Code Here

Examples of org.apache.lucene.search.DefaultSimilarity

  }

  public static <D, V extends ZoieVersion> ZoieSystem<IndexReader, D, V> buildDefaultInstance(File idxDir, ZoieIndexableInterpreter<D> interpreter,
      int batchSize, long batchDelay, boolean realtime, ZoieVersionFactory<V> zoieVersionFactory)
  {
    return buildDefaultInstance(idxDir, interpreter, new StandardAnalyzer(Version.LUCENE_CURRENT), new DefaultSimilarity(), batchSize, batchDelay, realtime,
        zoieVersionFactory);
  }
View Full Code Here

Examples of org.apache.lucene.search.DefaultSimilarity

    this.analyzer = analyzer;
  }

  public Similarity getSimilarity()
  {
    return similarity == null ? new DefaultSimilarity() : similarity;
  }
View Full Code Here

Examples of org.apache.lucene.search.DefaultSimilarity

  protected final void search(final Query query, final DocumentFrequencyWritable freqs, final String[] shards,
          final HitsMapWritable result, final int max, Sort sort, long timeout) throws IOException {
    timeout = getCollectorTiemout(timeout);
    final Query rewrittenQuery = rewrite(query, shards);
    final int numDocs = freqs.getNumDocsAsInteger();
    final Weight weight = rewrittenQuery.weight(new CachedDfSource(freqs.getAll(), numDocs, new DefaultSimilarity()));
    int totalHits = 0;
    final int shardsCount = shards.length;

    // Run the search in parallel on the shards with a thread pool.
    CompletionService<SearchResult> csSearch = new ExecutorCompletionService<SearchResult>(_threadPool);
View Full Code Here

Examples of org.apache.lucene.search.DefaultSimilarity

 
  /**
   * Constructor requiring an IndexReader.
   */
  public MoreLikeThis(IndexReader ir) {
    this(ir, new DefaultSimilarity());
  }
View Full Code Here

Examples of org.apache.lucene.search.similarities.DefaultSimilarity

    if (VERBOSE) {
      System.out.println("TEST: searcher=" + searcher);
    }
    // even though this uses a boost-only rewrite, this test relies upon queryNorm being the default implementation,
    // otherwise scores are different!
    searcher.setSimilarity(new DefaultSimilarity());
   
    writer.close();
    String line;
    while ((line = reader.readLine()) != null) {
      String params[] = line.split(",");
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.