Examples of Hit

  • es.mahulo.battleship.model.Hit
  • net.paoding.analysis.dictionary.Hit
    Hit是检索字典时返回的结果。检索字典时,总是返回一个非空的Hit对象表示可能的各种情况。

    Hit对象包含2类判断信息:

  • 要检索的词语是否存在于词典中: {@link #isHit()}
  • 词典是否含有以给定字符串开头的其他词语: {@link #isUnclosed()}

  • 如果上面2个信息都是否定的,则 {@link #isUndefined()}返回true,否则返回false.

    如果 {@link #isHit()}返回true,则 {@link #getWord()}返回查找结果, {@link #getNext()}返回下一个词语。
    如果 {@link #isHit()}返回false,但 {@link #isUnclosed()}返回true, {@link #getNext()}返回以所查询词语开头的位置最靠前的词语。

    @author Zhiliang Wang [qieqie.wang@gmail.com] @see Dictionary @see BinaryDictionary @see HashBinaryDictionary @since 1.0

  • net.sf.katta.lib.lucene.Hit
    Note: this class has a natural ordering that is inconsistent with equals.
  • org.apache.camel.processor.lucene.support.Hit
  • org.apache.lucene.search.Hit
    Wrapper used by {@link HitIterator} to provide a lazily loaded hitfrom {@link Hits}. @author Jeremy Rayner
  • org.apache.nutch.searcher.Hit
    A document which matched a query in an index.
  • org.encuestame.persistence.domain.Hit
    Hits. @author Morales, Diana Paola paolaATencuestame.org @since September 08, 2011
  • org.jayasoft.woj.common.model.search.Hit
  • org.opensolaris.opengrok.egrok.model.Hit
  • org.opensolaris.opengrok.search.Hit
    The hit class represents a single search hit @author Trond Norbye
  • org.vosao.search.Hit
  • org.watermint.sourcecolon.org.opensolaris.opengrok.search.Hit
    The hit class represents a single search hit @author Trond Norbye
  • org.wltea.analyzer.dic.Hit
    IK Analyzer v3.2 表示词典检索的命中结果 @author 林良益

  • Examples of es.mahulo.battleship.model.Hit

       
        logger.info("Shot " + gameId + " " + sc.getUserPrincipal().getName() + " " + shot);
       
        Boolean isHit = gameService.shot(gameId,sc.getUserPrincipal().getName(), shot);
       
        Hit hit = new Hit();
        hit.setHit(isHit);
       
        return hit;
      }
    View Full Code Here

    Examples of net.paoding.analysis.dictionary.Hit

          // 大概有5639个字有词语,故取0x2fff=x^13>8000>8000*0.75=6000>5639
          vocabularyDictionary = new HashBinaryDictionary(
              getVocabularyWords(), 0x2fff, 0.75f);
          Dictionary noiseWordsDic = getNoiseWordsDictionary();
          for (int i = 0; i < noiseWordsDic.size(); i++) {
            Hit hit = vocabularyDictionary.search(noiseWordsDic.get(i), 0, noiseWordsDic.get(i).length());
            if (hit.isHit()) {
              hit.getWord().setNoiseWord();
            }
          }
          Dictionary noiseCharactorsDic = getNoiseCharactorsDictionary();
          for (int i = 0; i < noiseCharactorsDic.size(); i++) {
            Hit hit = vocabularyDictionary.search(noiseCharactorsDic.get(i), 0, noiseCharactorsDic.get(i).length());
            if (hit.isHit()) {
              hit.getWord().setNoiseCharactor();
            }
          }
         
        }
        return vocabularyDictionary;
    View Full Code Here

    Examples of net.paoding.analysis.dictionary.Hit

          chs[curWord.length()] = (char) -1;
          Beef beef = new Beef(chs, 0, curWord.length() + 1);
          final BitSet bs = new BitSet(curWord.length());
          knife.dissect(new Collector(){
            public void collect(String word, int offset, int end) {
              Hit hit = vocabularyDictionary.search(word, 0, word.length());
              if (hit.isHit() && hit.getWord().length() != curWord.length()) {
                for (int j = offset; j < end; j++) {
                  bs.set(j, true);
                }
              }
            }
    View Full Code Here

    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

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

        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

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

        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

    Examples of org.apache.camel.processor.lucene.support.Hit

            int numberOfHits = doSearch(searchPhrase, maxNumberOfHits, luceneVersion);
            searchHits.setNumberOfHits(numberOfHits);

            for (ScoreDoc hit : hits) {
                Document selectedDocument = indexSearcher.doc(hit.doc);
                Hit aHit = new Hit();
                aHit.setHitLocation(hit.doc);
                aHit.setScore(hit.score);
                aHit.setData(selectedDocument.get("contents"));
                searchHits.getHit().add(aHit);
            }       

            return searchHits;
        }
    View Full Code Here

    Examples of org.apache.camel.processor.lucene.support.Hit

            int numberOfHits = doSearch(searchPhrase, maxNumberOfHits, luenceVersion);
            searchHits.setNumberOfHits(numberOfHits);

            for (ScoreDoc hit : hits) {
                Document selectedDocument = indexSearcher.doc(hit.doc);
                Hit aHit = new Hit();
                aHit.setHitLocation(hit.doc);
                aHit.setScore(hit.score);
                aHit.setData(selectedDocument.get("contents"));
                searchHits.getHit().add(aHit);
            }       

            return searchHits;
        }
    View Full Code Here

    Examples of org.apache.camel.processor.lucene.support.Hit

            int numberOfHits = doSearch(searchPhrase, maxNumberOfHits, luenceVersion);
            searchHits.setNumberOfHits(numberOfHits);

            for (ScoreDoc hit : hits) {
                Document selectedDocument = indexSearcher.doc(hit.doc);
                Hit aHit = new Hit();
                aHit.setHitLocation(hit.doc);
                aHit.setScore(hit.score);
                aHit.setData(selectedDocument.get("contents"));
                searchHits.getHit().add(aHit);
            }       

            return searchHits;
        }
    View Full Code Here

    Examples of org.apache.camel.processor.lucene.support.Hit

            int numberOfHits = doSearch(searchPhrase, maxNumberOfHits);
            searchHits.setNumberOfHits(numberOfHits);

            for (ScoreDoc hit : hits) {
                Document selectedDocument = indexSearcher.doc(hit.doc);
                Hit aHit = new Hit();
                aHit.setHitLocation(hit.doc);
                aHit.setScore(hit.score);
                aHit.setData(selectedDocument.get("contents"));
                searchHits.getHit().add(aHit);
            }       

            return searchHits;
        }
    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.