private void replaceOrItems(Query query) {
        Item root = query.getModel().getQueryTree().getRoot();
        int hits = query.getHits();
        Integer wandHits = query.properties().getInteger(WAND_HITS);
        if (wandHits != null) hits = wandHits;
        query.getModel().getQueryTree().setRoot(replaceOrItems(root, hits));
        if (root != query.getModel().getQueryTree().getRoot())
            query.trace("Replaced OR by WeakAnd", true, 2);
    }
Extracts the queryTree root and the wand.hits property to send to the recursive replacement function
@param query the search query
container-search/src/main/java/com/yahoo/search/querytransform/WeakAndReplacementSearcher.java