private static Optional<Hover> rankFeatureHover(SchemaNode node, EventPositionContext context) {

        // Search for rankNode connection
        Node currentNode = node;
        while (currentNode.getLanguageType() == LanguageType.RANK_EXPRESSION && currentNode.getSchemaNode().getRankNode().isEmpty()) {
            currentNode = currentNode.getParent();
        }

        SchemaNode schemaNode = currentNode.getSchemaNode();

        if (schemaNode.getRankNode().isEmpty()) {
            return Optional.empty();
        }

        RankNode rankNode = schemaNode.getRankNode().get();

        Optional<SpecificFunction> rankNodeSignature = rankNode.getFunctionSignature();

        if (rankNodeSignature.isEmpty()) {
            return Optional.empty();
        }

        SpecificFunction functionSignature = rankNodeSignature.get().clone();

        // Clear property from the signature if the hover was not explicitly on the property node.
        if (node.hasSymbol() && node.getSymbol().getType() != SymbolType.PROPERTY) {
            functionSignature.clearProperty();
        }

        Optional<Hover> result = getRankFeatureHover(functionSignature);
        result.ifPresent(hover -> hover.setRange(node.getRange()));
        return result;
    }
Special handling of field hover to also list which indexing settings are set (index | attribute | summary)
as well as whether the field is inside or outside its document.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/lsp/schema/hover/SchemaHover.java