docs: private static MtasSpanQuery createQueryFromGroupHit(Set<String> prefixes,
        String field, GroupHit hit) {
      // initial check
      if (prefixes == null || field == null || hit == null) {
        return null;
      } else {
        MtasSpanQuery query = null;
        // check for missing
        if (hit.missingLeft != null && hit.missingLeft.length > 0) {
          for (int i = 0; i < hit.missingLeft.length; i++) {
            if (hit.missingLeft[i].size() != hit.unknownLeft[i].size()) {
              return null;
            }
          }
        }
        if (hit.missingHit != null && hit.missingHit.length > 0) {
          for (int i = 0; i < hit.missingHit.length; i++) {
            if (hit.missingHit[i].size() != hit.unknownHit[i].size()) {
              return null;
            }
          }
        }
        if (hit.missingRight != null && hit.missingRight.length > 0) {
          for (int i = 0; i < hit.missingRight.length; i++) {
            if (hit.missingRight[i].size() != hit.unknownRight[i].size()) {
              return null;
            }
          }
        }
        MtasSpanQuery hitQuery = createSubQueryFromGroupHit(hit.dataHit, false,
            field);
        if (hitQuery != null) {
          query = hitQuery;
          MtasSpanQuery leftHitQuery = createSubQueryFromGroupHit(hit.dataLeft,
              true, field);
          MtasSpanQuery rightHitQuery = createSubQueryFromGroupHit(hit.dataRight,
              false, field);
          if (leftHitQuery != null) {
            query = new MtasSpanPrecededByQuery(query, leftHitQuery);
          }
          if (rightHitQuery != null) {
            query = new MtasSpanFollowedByQuery(query, rightHitQuery);
          }
        }
        return query;
      }
    }