Package org.apache.lucene.search

Examples of org.apache.lucene.search.MultiSearcher


        Searchable[] searchers = new Searchable[indexDirs.length];
        for (int i = 0; i < indexDirs.length; i++) {
          searchers[i] = new IndexSearcher((new File(indexDirs[i].getPath().
            toUri()).getAbsolutePath()));
        }
        searcher = new MultiSearcher(searchers);
      } else {
        throw new IOException("no index directory found");
      }

      HTable table = new HTable(conf, TABLE_NAME);
View Full Code Here


      searchers[i] = indexAccessor.getPrioritizedSearcher();
      multiSearcherAccessors.put(searchers[i], indexAccessor);
      i++;
    }

    MultiSearcher multiSearcher = new MultiSearcher(searchers);

    return multiSearcher;
  }
View Full Code Here

      searchers[i] = indexAccessor.getSearcher(this.similarity, null);
      multiSearcherAccessors.put(searchers[i], indexAccessor);
      i++;
    }

    MultiSearcher multiSearcher = new MultiSearcher(searchers);

    return multiSearcher;
  }
View Full Code Here

      searchers[i] = indexAccessor.getSearcher(this.similarity, indexReader);
      multiSearcherAccessors.put(searchers[i], indexAccessor);
      i++;
    }

    MultiSearcher multiSearcher = new MultiSearcher(searchers);

    return multiSearcher;
  }
View Full Code Here

      searchers[i] = indexAccessor.getSearcher(similarity, indexReader);
      multiSearcherAccessors.put(searchers[i], indexAccessor);
      i++;
    }

    MultiSearcher multiSearcher = new MultiSearcher(searchers);

    return multiSearcher;
  }
View Full Code Here

        Searchable[] searchers = new Searchable[indexDirs.length];
        for (int i = 0; i < indexDirs.length; i++) {
          searchers[i] = new IndexSearcher((new File(indexDirs[i].
            toUri()).getAbsolutePath()));
        }
        searcher = new MultiSearcher(searchers);
      } else {
        throw new IOException("no index directory found");
      }

      HTable table = new HTable(conf, new Text(TABLE_NAME));
View Full Code Here

        Searchable[] searchers = new Searchable[indexDirs.length];
        for (int i = 0; i < indexDirs.length; i++) {
          searchers[i] = new IndexSearcher((new File(indexDirs[i].
            toUri()).getAbsolutePath()));
        }
        searcher = new MultiSearcher(searchers);
      } else {
        throw new IOException("no index directory found");
      }

      HTable table = new HTable(c, new Text(TABLE_NAME));
View Full Code Here

        Searchable[] searchers = new Searchable[indexDirs.length];
        for (int i = 0; i < indexDirs.length; i++) {
          searchers[i] = new IndexSearcher((new File(indexDirs[i].getPath().
            toUri()).getAbsolutePath()));
        }
        searcher = new MultiSearcher(searchers);
      } else {
        throw new IOException("no index directory found");
      }

      HTable table = new HTable(conf, TABLE_NAME);
View Full Code Here

    // 1. Search the same store which works
    IndexSearcher[] arrSearcher = new IndexSearcher[2];
    arrSearcher[0] = new IndexSearcher(indexStoreA, true);
    arrSearcher[1] = new IndexSearcher(indexStoreB, true);
    MultiSearcher searcher = new MultiSearcher(arrSearcher);
    int numHits = searcher.search(query, null, 1000).totalHits;
    arrSearcher[0].close();
    arrSearcher[1].close();

    // Will fail here
    // We expect 2 but only one matched
View Full Code Here

                searchers = new IndexSearcher[numToSearch];
                for (int i = 0; i < numToSearch; i++) {
                    curI = searchList.get(i);
                    searchers[i] = new IndexSearcher(IndexReader.open(curI.indexerPath));
                }
                searcher = new MultiSearcher(searchers);
            } // numtosearch greater than zero
            else
                log("NO INDEXES FOUND");
        } else
            log("NO INDEXES FOUND");
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.MultiSearcher

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.