Package com.gentics.cr.monitoring

Examples of com.gentics.cr.monitoring.UseCase.stop()


        metaBean = new CRMetaResolvableBean(searchResult, request, start, count);
      }
      result.add(metaBean);
    }

    ucProcessSearchMeta.stop();
    return result;
  }

  /**
   * do the actual search, parse the highlight query and process all documents.
View Full Code Here


      LOGGER.error("Cannot get Index reader for highlighting", e);
    } finally {
      indexAccessor.release(reader, false);
    }

    ucProcessSearchResolvables.stop();
    return result;
  }

  /**
   * Parse the highlight query with the analyzer/parser provided by the config.
View Full Code Here

            crBean.set(att, ret);
          }
        }
      }
      LOGGER.debug("Highlighters took " + (System.currentTimeMillis() - s2) + "ms");
      ucProcessSearchHighlight.stop();
    }
  }

  private void processDocuments(final LinkedHashMap<Document, Float> docs, final ArrayList<CRResolvableBean> result,
      final IndexReader reader, final Query parsedQuery) {
View Full Code Here

   * @return highlightedterm
   */
  public final String highlightTerm(final String originalTermText, final TokenGroup tokenGroup) {
    UseCase uc = MonitorFactory.startUseCase("Highlight.PhraseBolder.highlightTerm()");
    if (tokenGroup.getTotalScore() <= 0) {
      uc.stop();
      return originalTermText;
    }
    uc.stop();
    return getHighlightPrefix() + originalTermText + getHighlightPostfix();

View Full Code Here

    UseCase uc = MonitorFactory.startUseCase("Highlight.PhraseBolder.highlightTerm()");
    if (tokenGroup.getTotalScore() <= 0) {
      uc.stop();
      return originalTermText;
    }
    uc.stop();
    return getHighlightPrefix() + originalTermText + getHighlightPostfix();

  }

  /**
 
View Full Code Here

      TokenStream tokenStream = analyzer.tokenStream(this.getHighlightAttribute(), new StringReader(attribute));
      try {
        UseCase ucFragments = MonitorFactory.startUseCase("Highlight.PhraseBolder.highlight()#getFragments");
        TextFragment[] frags = highlighter
            .getBestTextFragments(tokenStream, attribute, true, getMaxFragments());
        ucFragments.stop();
        boolean first = true;
        int startPosition = -1;
        int endPosition = -1;
        for (TextFragment frag : frags) {
          String fragment = frag.toString();
View Full Code Here

          reader,
          docId,
          fieldName,
          getFragmentSize(),
          getMaxFragments());
        ucFragments.stop();
        boolean first = true;
        if (frags != null) {
          for (String frag : frags) {
            frag = frag.replaceAll(REMOVE_TEXT_FROM_FRAGMENT_REGEX, "");
            if (!first) {
View Full Code Here

          reader,
          docId,
          fieldName,
          fragmentSize,
          numMaxFragments);
        ucFragments.stop();
        boolean first = true;
        if (frags != null) {
          for (String frag : frags) {
            frag = frag.replaceAll(REMOVE_TEXT_FROM_FRAGMENT_REGEX, "");
            if (!first) {
View Full Code Here

        log.debug("Number of indexed Synonyms finished: " + synonymWriter.numDocs());
        synonymAccessor.release(synonymWriter);
      }
 
      log.debug("Finished reindexing synonym index.");
      ucReIndex.stop();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

      //fixing possible npe
      if (indexUpdateChecker != null) {
        indexUpdateChecker.deleteStaleObjects();
      }
    } finally {
      objectsToUpdateCase.stop();
    }
    return updateObjects;
  }

  private void defaultizeRequest(CRRequest request) {
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.