public static void setRewriteMeta(Query query, HashMap<String, Object> metadata) {
        log(utilsLogger, query, "Passing metadata to the next rewriter");

        query.properties().set(RewriterConstants.REWRITE_META, metadata);
        log(utilsLogger, query, "Successfully passed metadata to the next rewriter");
    }
Pass metadata to the next rewriter through query properties

@param query Query object from the searcher
@param metadata HashMap containing the metadata
container-search/src/main/java/com/yahoo/search/query/rewrite/RewriterUtils.java