static boolean hasEncodableProperties(Query query) {
        if ( ! query.getRanking().getProperties().isEmpty()) return true;
        if ( ! query.getRanking().getFeatures().isEmpty()) return true;
        if ( query.getRanking().getFreshness() != null) return true;
        if ( query.getModel().getSearchPath() != null) return true;
        if ( query.getModel().getDocumentDb() != null) return true;
        if ( query.getPresentation().getHighlight() != null &&
             ! query.getPresentation().getHighlight().getHighlightItems().isEmpty()) return true;
        return false;
    }
Encodes properties of this query.

@param buffer the buffer to encode to
@return the encoded length
container-search/src/main/java/com/yahoo/vespa/streamingvisitors/QueryEncoder.java