public final void setQuery(Query query) {
        if (this.query == null || this instanceof HitGroup) {
            this.query = query;
        }
    }
Sets the query which produced this. This is ignored (except if this is a HitGroup) if a query is already set
container-search/src/main/java/com/yahoo/search/result/Hit.java