private void extendQuery(
            @NotNull SearchQuery searchQuery,
            @NotNull Operator operator,
            @NotNull Term operand) {
        switch (operator.getType()) {
            case AND:
                searchQuery.and(operand);
                break;
            case OR:
                searchQuery.or(operand);
                break;
            case DIST:
                searchQuery.dist(operand, operator);
                break;
        }
    }