Package com.tistory.devyongsik.crescent.search.highlight

Examples of com.tistory.devyongsik.crescent.search.highlight.CrescentFastVectorHighlighter


     
      if(totalHitsCount > 0) {
        List<Map<String, String>> resultList = new ArrayList<Map<String, String>>();
        Map<String, Object> result = new HashMap<String, Object>();
       
        CrescentFastVectorHighlighter highlighter = new CrescentFastVectorHighlighter();
       
        CrescentCollectionHandler collectionHandler
        = SpringApplicationContext.getBean("crescentCollectionHandler", CrescentCollectionHandler.class);
        CrescentCollection collection = collectionHandler.getCrescentCollections().getCrescentCollection(csrw.getCollectionName());
       
        //int docnum = 0;
        for(int i = startOffset; i < endOffset; i++) {
         
          Map<String,String> resultMap = new HashMap<String, String>();
         
          for(CrescentCollectionField field : collection.getFields()) {
            String value = null;
               
            if(field.isStore() && !field.isNumeric()) {
             
              //필드별 결과를 가져온다.
              value = highlighter.getBestFragment(indexSearcher.getIndexReader(), hits[i].doc, query, field.getName());
               
            }
           
            if(value == null || value.length() == 0) {
              Document doc = indexSearcher.doc(hits[i].doc);
View Full Code Here

TOP

Related Classes of com.tistory.devyongsik.crescent.search.highlight.CrescentFastVectorHighlighter

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.