Package org.apache.lucene.index.memory

Examples of org.apache.lucene.index.memory.MemoryIndex.search()


      throw new IllegalArgumentException("queryAnalyzer must not be null");
   
    if (DEFAULT_CAPACITY <= 0) { // cache disabled?
      MemoryIndex index = new MemoryIndex();
      index.addField(FIELD_NAME, text, textAnalyzer);
      return index.search(parse(query, queryAnalyzer));
    }

    Object key = Pool.createHashKeys(new Object[] {text, query, textAnalyzer, queryAnalyzer});
    Float score = (Float) entries.get(key); // hit/miss ratio is app specific
//    Float score = null;
View Full Code Here


       * multiple concurrent readers, but I'm not sure that's also true
       * for the luceneQuery instance. For the moment better safe than
       * sorry...
       */
      synchronized (luceneQuery) {
        score = new Float(index.search(luceneQuery));
      }
     
      entries.put(key, score);
    }
    return score.floatValue();
View Full Code Here

    }
   
    // Search all queries against the one document index
    for (SearchQuery query : searchQueryProvider.getSearchQueries(aCAS)) {

      float score = index.search(query.query());

      if (score > matchingThreshold) {
       
        // Add a FS to the CAS with the search result
        FeatureStructure searchResult = aCAS.createFS(searchResultType);
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.