Ejemplo n.º 1
0
  @Override
  public void init(IControllerContext context) {
    super.init(context);

    if (dontHighlightPattern != null) {
      dontHighlightPatternCompiled = Pattern.compile(dontHighlightPattern);
    }

    if (querySanitizePattern != null) {
      querySanitizePatternCompiled = Pattern.compile(querySanitizePattern);
    }
  }
Ejemplo n.º 2
0
  @SuppressWarnings("unchecked")
  @Override
  public void init(IControllerContext context) {
    super.init(context);
    this.context = context;

    synchronized (context) {
      final String key = AttributeUtils.getKey(getClass(), "openIndexes");
      if (context.getAttribute(key) == null) {
        context.setAttribute(key, Maps.newIdentityHashMap());
        context.addListener(
            new IControllerContextListener() {
              public void beforeDisposal(IControllerContext context) {
                closeAllIndexes();
              }
            });
      }

      this.openIndexes = (IdentityHashMap<Directory, IndexSearcher>) context.getAttribute(key);
    }
  }
Ejemplo n.º 3
0
 /** Memory cleanups. */
 @Override
 public void afterProcessing() {
   super.afterProcessing();
   this.context = null;
   this.sb = null;
 }