public OperationParameters addCreateIfApplicable(String operation, String docId) {
        OperationParameters operationParameters = OperationParameters.empty()
                .timeout(Duration.ofSeconds(feedConfig.getOperationTimeout()));

        if (feedConfig.isCreate()) {
            if (operation.equals("put") || operation.equals("update")) {
                return operationParameters.createIfNonExistent(true);
            } else {
                logger.warn("Operation remove cannot have create=true." +
                        " Ignoring create=true for docID: {}", docId);
            }
        }
        return operationParameters;
    }
Add create=true to the operation parameters if the operation is put or update
@param operation
@param docId
@return The operation parameters with create=true if applicable
integration/logstash-plugins/logstash-output-vespa/src/main/java/org/logstashplugins/VespaFeed.java