Package org.hbasene.index.search

Examples of org.hbasene.index.search.HBaseIndexSearcher.search()


public class TestHBaseIndexReader extends AbstractHBaseneTest {

  @Test
  public void testSearch() throws IOException {
    IndexSearcher searcher = new HBaseIndexSearcher(this.indexReader);
    TopDocs docs = searcher.search(new TermQuery(new Term("content", "plays")),
        3);
    Assert.assertTrue(docs.totalHits > 3 );
        //"At least 3 terms with the keyword plays available");
    for (ScoreDoc scoreDoc : docs.scoreDocs) {
      Assert.assertTrue(scoreDoc.doc >= 0);// "Doc Id  " + scoreDoc.doc
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.