@ Then ( "^The Elasticsearch index named '(.+?)' and mapping '(.+?)' contains a column named '(.+?)' with the value '(.+?)'$" ) public void elasticSearchIndexContainsDocument ( String indexName , String mappingName , String columnName , String columnValue ) throws Exception { Assertions . assertThat ( ( commonspec . getElasticSearchClient ( ) . searchSimpleFilterElasticsearchQuery ( indexName , mappingName , columnName , columnValue , "equals" ) . size ( ) ) > 0 ) . isTrue ( ) . withFailMessage ( "The index does not contain that document" ) ; }
Check that an elasticsearch index contains a specific document