Package net.sf.katta.lib.lucene

Examples of net.sf.katta.lib.lucene.Hit


    final Random random = new Random();
    // the same number everytime to get comparable results
    random.setSeed(64567547657L);
    final List<Hit> hitList = new ArrayList<Hit>();
    for (int i = 0; i < _hitCount; i++) {
      final Hit hit = new Hit("shard", "node", random.nextFloat(), random.nextInt());
      hitList.add(hit);
    }

    final Hits hits = new Hits();
    hits.addHits(hitList);
View Full Code Here


    for (int i = 0; i < hitListsArray.length; i++) {
      hitListsArray[i] = new ArrayList<Hit>();
    }

    for (int i = 0; i < _hitCount; i++) {
      final Hit hit = new Hit("shard", "node", random.nextFloat(), random.nextInt());
      hitListsArray[random.nextInt(hitListsArray.length)].add(hit);
    }

    final Hits hits = new Hits();
    for (List<Hit> hitList : hitListsArray) {
View Full Code Here

    final Query query = new QueryParser(Version.LUCENE_30, "", new KeywordAnalyzer()).parse(textFieldName + ": "
            + textFieldContent);
    final Hits hits = client.search(query, new String[] { index.getName() }, 10);
    assertNotNull(hits);
    assertEquals(1, hits.getHits().size());
    final Hit hit = hits.getHits().get(0);
    final MapWritable details = client.getDetails(hit);
    final Set<Writable> keySet = details.keySet();
    assertEquals(1, keySet.size());
    final Writable writable = details.get(new Text(binaryFieldName));
    assertNotNull(writable);
View Full Code Here

TOP

Related Classes of net.sf.katta.lib.lucene.Hit

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.