@Override
  public void compile(String pattern) {
    this.pattern = pattern;
    // break it down into index/type
    String[] split = pattern.split("/");
    Assert.isTrue(!ObjectUtils.isEmpty(split), "invalid pattern given " + pattern);
    Assert.isTrue(split.length == 2, "invalid pattern given " + pattern);

    // check pattern
    hasPattern = pattern.contains("{") && pattern.contains("}");
    index = parse(split[0].trim());
    type = parse(split[1].trim());
  }
  public void process(BytesArray storage) {
    // no extractors, no lookups
    if (ObjectUtils.isEmpty(paths)) {
      return;
    }

    results.clear();

    if (log.isTraceEnabled()) {
      log.trace(
          String.format(
              "About to look for paths [%s] in doc [%s]", Arrays.toString(paths), storage));
    }
    results.addAll(
        ParsingUtils.values(new JacksonJsonParser(storage.bytes(), 0, storage.length()), paths));
  }