Package org.apache.lucene.benchmark.byTask.feeds

Examples of org.apache.lucene.benchmark.byTask.feeds.QueryMaker


   */
  synchronized public QueryMaker getQueryMaker(ReadTask readTask) {
    // mapping the query maker by task class allows extending/adding new search/read tasks
    // without needing to modify this class.
    Class<? extends ReadTask> readTaskClass = readTask.getClass();
    QueryMaker qm = readTaskQueryMaker.get(readTaskClass);
    if (qm == null) {
      try {
        qm = qmkrClass.newInstance();
        qm.setConfig(config);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
      readTaskQueryMaker.put(readTaskClass,qm);
    }
View Full Code Here


   */
  synchronized public QueryMaker getQueryMaker(ReadTask readTask) {
    // mapping the query maker by task class allows extending/adding new search/read tasks
    // without needing to modify this class.
    Class<? extends ReadTask> readTaskClass = readTask.getClass();
    QueryMaker qm = readTaskQueryMaker.get(readTaskClass);
    if (qm == null) {
      try {
        qm = qmkrClass.newInstance();
        qm.setConfig(config);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
      readTaskQueryMaker.put(readTaskClass,qm);
    }
View Full Code Here

    }
   
    if (withSearch()) {
      res++;
      IndexSearcher searcher = new IndexSearcher(ir);
      QueryMaker queryMaker = getQueryMaker();
      Query q = queryMaker.makeQuery();
      Hits hits = searcher.search(q);
      //System.out.println("searched: "+q);
     
      if (withTraverse()) {
        Document doc = null;
View Full Code Here

   */
  public QueryMaker getQueryMaker(ReadTask readTask) {
    // mapping the query maker by task class allows extending/adding new search/read tasks
    // without needing to modify this class.
    Class readTaskClass = readTask.getClass();
    QueryMaker qm = (QueryMaker) readTaskQueryMaker.get(readTaskClass);
    if (qm == null) {
      try {
        qm = (QueryMaker) qmkrClass.newInstance();
        qm.setConfig(config);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
      readTaskQueryMaker.put(readTaskClass,qm);
    }
View Full Code Here

   */
  public QueryMaker getQueryMaker(ReadTask readTask) {
    // mapping the query maker by task class allows extending/adding new search/read tasks
    // without needing to modify this class.
    Class readTaskClass = readTask.getClass();
    QueryMaker qm = (QueryMaker) readTaskQueryMaker.get(readTaskClass);
    if (qm == null) {
      try {
        qm = (QueryMaker) qmkrClass.newInstance();
        qm.setConfig(config);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
      readTaskQueryMaker.put(readTaskClass,qm);
    }
View Full Code Here

    }
   
    if (withSearch()) {
      res++;
      IndexSearcher searcher = new IndexSearcher(ir);
      QueryMaker queryMaker = getQueryMaker();
      Query q = queryMaker.makeQuery();
      Hits hits = searcher.search(q);
      //System.out.println("searched: "+q);
     
      if (withTraverse() && hits!=null) {
        int traversalSize = Math.min(hits.length(), traversalSize());
View Full Code Here

    }

    if (withSearch()) {
      res++;
      IndexSearcher searcher = new IndexSearcher(ir);
      QueryMaker queryMaker = getQueryMaker();
      Query q = queryMaker.makeQuery();
      Sort sort = getSort();
      Hits hits;
      if(sort != null) {
        hits = searcher.search(q, sort);
      } else {
View Full Code Here

   */
  synchronized public QueryMaker getQueryMaker(ReadTask readTask) {
    // mapping the query maker by task class allows extending/adding new search/read tasks
    // without needing to modify this class.
    Class readTaskClass = readTask.getClass();
    QueryMaker qm = (QueryMaker) readTaskQueryMaker.get(readTaskClass);
    if (qm == null) {
      try {
        qm = (QueryMaker) qmkrClass.newInstance();
        qm.setConfig(config);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
      readTaskQueryMaker.put(readTaskClass,qm);
    }
View Full Code Here

   */
  synchronized public QueryMaker getQueryMaker(ReadTask readTask) {
    // mapping the query maker by task class allows extending/adding new search/read tasks
    // without needing to modify this class.
    Class readTaskClass = readTask.getClass();
    QueryMaker qm = (QueryMaker) readTaskQueryMaker.get(readTaskClass);
    if (qm == null) {
      try {
        qm = (QueryMaker) qmkrClass.newInstance();
        qm.setConfig(config);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
      readTaskQueryMaker.put(readTaskClass,qm);
    }
View Full Code Here

      if (closeReader) {
        searcher = new IndexSearcher(ir);
      } else {
        searcher = getRunData().getIndexSearcher();
      }
      QueryMaker queryMaker = getQueryMaker();
      Query q = queryMaker.makeQuery();
      Sort sort = getSort();
      TopDocs hits;
      final int numHits = numHits();
      if (numHits > 0) {
        if (sort != null) {
View Full Code Here

TOP

Related Classes of org.apache.lucene.benchmark.byTask.feeds.QueryMaker

Copyright © 2018 www.massapicom. 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.