code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
public Builder withRelation(JoinField<String> relation) {
this.relation = relation;
return this;
} | @return a {@link BaseQueryBuilder} that allready has a matchAll query set | withRelation | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchIntegrationTests.java | Apache-2.0 |
public RootEntity build() {
RootEntity root = new RootEntity();
root.setId(id);
root.setParent(parent);
root.setChild(child);
root.setRelation(relation);
return root;
} | @return a {@link BaseQueryBuilder} that allready has a matchAll query set | build | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchIntegrationTests.java | Apache-2.0 |
@BeforeEach
void setUp() {
indexNameProvider.increment();
indexOps = operations.indexOps(City.class);
indexOps.createWithMapping();
Inhabitant john = new Inhabitant("John", "Smith");
Inhabitant carla1 = new Inhabitant("Carla", "Miller");
Inhabitant carla2 = new Inhabitant("Carla", "Nguyen");
House corn... | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | setUp | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@Test
@Order(java.lang.Integer.MAX_VALUE)
void cleanup() {
operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + "*")).delete();
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | cleanup | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@Test // #2521
void shouldReturnInnerHits() {
Query query = buildQueryForInnerHits("inner_hit_name", "hou-ses.in-habi-tants", "hou-ses.in-habi-tants.first-name",
"Carla");
SoftAssertions softly = new SoftAssertions();
SearchHits<City> searchHits = operations.search(query, City.class);
softly.assertThat(... | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | shouldReturnInnerHits | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@Nullable
public String getName() {
return name;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | getName | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
public void setName(@Nullable String name) {
this.name = name;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | setName | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@Nullable
public Collection<House> getHouses() {
return houses;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | getHouses | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
public void setHouses(@Nullable Collection<House> houses) {
this.houses = houses;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | setHouses | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@Nullable
public String getStreet() {
return street;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | getStreet | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
public void setStreet(@Nullable String street) {
this.street = street;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | setStreet | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@Nullable
public String getStreetNumber() {
return streetNumber;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | getStreetNumber | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
public void setStreetNumber(@Nullable String streetNumber) {
this.streetNumber = streetNumber;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | setStreetNumber | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@Nullable
public List<Inhabitant> getInhabitants() {
return inhabitants;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | getInhabitants | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
public void setInhabitants(@Nullable List<Inhabitant> inhabitants) {
this.inhabitants = inhabitants;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | setInhabitants | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@Nullable
public String getFirstName() {
return firstName;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | getFirstName | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
public void setFirstName(@Nullable String firstName) {
this.firstName = firstName;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | setFirstName | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@Nullable
public String getLastName() {
return lastName;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | getLastName | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
public void setLastName(@Nullable String lastName) {
this.lastName = lastName;
} | Testing the querying and parsing of inner_hits.
@author Peter-Josef Meisch
@author Jakob Hoeper | setLastName | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java | Apache-2.0 |
@BeforeEach
public void before() throws ParseException {
indexNameProvider.increment();
operations.indexOps(LogEntity.class).createWithMapping();
SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
IndexQuery indexQuery1 = new LogEntityBuilder("1").action("update").date(dateFormatter.p... | LogEntityIntegrationTests
@author Artur Konczak
@author Mohsin Husen
@author Peter-Josef Meisch | before | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
@Test
@Order(java.lang.Integer.MAX_VALUE)
void cleanup() {
operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + "*")).delete();
} | LogEntityIntegrationTests
@author Artur Konczak
@author Mohsin Husen
@author Peter-Josef Meisch | cleanup | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
@Test // DATAES-66
public void shouldIndexGivenLogEntityWithIPFieldType() {
Query searchQuery = termQueryForIp("10.10.10.1");
SearchHits<LogEntity> entities = operations.search(searchQuery, LogEntity.class);
assertThat(entities).isNotNull().hasSize(1);
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | shouldIndexGivenLogEntityWithIPFieldType | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
@Test // DATAES-66
public void shouldThrowExceptionWhenInvalidIPGivenForSearchQuery() {
Query searchQuery = termQueryForIp("10.10.10");
assertThatThrownBy(() -> {
SearchHits<LogEntity> entities = operations.search(searchQuery, LogEntity.class);
}).isInstanceOf(DataAccessException.class);
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | shouldThrowExceptionWhenInvalidIPGivenForSearchQuery | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
@Test // DATAES-66
public void shouldReturnLogsForGivenIPRanges() {
Query searchQuery = rangeQueryForIp("10.10.10.1", "10.10.10.3");
SearchHits<LogEntity> entities = operations.search(searchQuery, LogEntity.class);
assertThat(entities).isNotNull().hasSize(3);
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | shouldReturnLogsForGivenIPRanges | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public static SimpleDateFormat getFormat() {
return format;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | getFormat | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public String getId() {
return id;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | getId | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public void setId(String id) {
this.id = id;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | setId | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public String getAction() {
return action;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | getAction | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public void setAction(String action) {
this.action = action;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | setAction | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public long getSequenceCode() {
return sequenceCode;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | getSequenceCode | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public void setSequenceCode(long sequenceCode) {
this.sequenceCode = sequenceCode;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | setSequenceCode | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public String getIp() {
return ip;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | getIp | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public void setIp(String ip) {
this.ip = ip;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | setIp | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public java.util.Date getDate() {
return date;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | getDate | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public void setDate(java.util.Date date) {
this.date = date;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | setDate | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public LogEntityBuilder action(String action) {
result.setAction(action);
return this;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | action | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public LogEntityBuilder code(long sequenceCode) {
result.setSequenceCode(sequenceCode);
return this;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | code | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public LogEntityBuilder date(Date date) {
result.setDate(date);
return this;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | date | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public LogEntityBuilder ip(String ip) {
result.setIp(ip);
return this;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | ip | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public LogEntity build() {
return result;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | build | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
public IndexQuery buildIndex() {
IndexQuery indexQuery = new IndexQuery();
indexQuery.setId(result.getId());
indexQuery.setObject(result);
return indexQuery;
} | Creates a Query that will be executed as range query on the "ip" field
@param from the parameter for the query
@param to the parameter for the query
@return Query instance | buildIndex | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java | Apache-2.0 |
@BeforeEach
void setUp() {
indexNameProvider.increment();
indexOperations = operations.indexOps(SampleEntity.class);
indexOperations.createWithMapping();
} | Integration tests for the point in time API.
@author Peter-Josef Meisch | setUp | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.java | Apache-2.0 |
@Test
@Order(Integer.MAX_VALUE)
void cleanup() {
operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + '*')).delete();
} | Integration tests for the point in time API.
@author Peter-Josef Meisch | cleanup | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.java | Apache-2.0 |
@Test // #1684
@DisplayName("should create pit search with it and delete it again")
void shouldCreatePitSearchWithItAndDeleteItAgain() {
// insert 2 records, one smith
operations.save(new SampleEntity("1", "John", "Smith"), new SampleEntity("2", "Mike", "Cutter"));
// seach for smith
var searchQuery = new C... | Integration tests for the point in time API.
@author Peter-Josef Meisch | shouldCreatePitSearchWithItAndDeleteItAgain | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.java | Apache-2.0 |
@BeforeEach
public void beforeEach() {
indexNameProvider.increment();
blocking(operations.indexOps(SampleEntity.class)).createWithMapping();
blocking(operations.indexOps(IndexedIndexNameEntity.class)).createWithMapping();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | beforeEach | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test
@Order(java.lang.Integer.MAX_VALUE)
void cleanup() {
blocking(operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + '*'))).delete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | cleanup | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void insertWithIdShouldWork() {
SampleEntity sampleEntity = randomEntity("foo bar");
operations.save(sampleEntity) //
.block();
operations
.search(new CriteriaQuery(Criteria.where("message").is(sampleEntity.getMessage())), SampleEntity.class,
IndexCoordinates.of(indexN... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | insertWithIdShouldWork | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void insertWithAutogeneratedIdShouldUpdateEntityId() {
SampleEntity sampleEntity = new SampleEntity();
sampleEntity.setMessage("wohoo");
operations.save(sampleEntity) //
.map(SampleEntity::getId) //
.flatMap(id -> documentWithIdExistsInIndex(id, indexNameProvider.indexName())... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | insertWithAutogeneratedIdShouldUpdateEntityId | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // #2112
@DisplayName("should set IndexedIndexName property")
void shouldSetIndexedIndexNameProperty() {
var entity = new IndexedIndexNameEntity();
entity.setId("42");
entity.setSomeText("someText");
var saved = operations.save(entity).block();
assertThat(saved.getIndexedIndexName()).isEqualTo(index... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldSetIndexedIndexNameProperty | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
private Mono<Boolean> documentWithIdExistsInIndex(String id, String index) {
return operations.exists(id, IndexCoordinates.of(index));
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | documentWithIdExistsInIndex | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void insertWithExplicitIndexNameShouldOverwriteMetadata() {
String defaultIndexName = indexNameProvider.indexName();
String alternateIndexName = defaultIndexName + "-alt";
SampleEntity sampleEntity = randomEntity("in another index");
IndexCoordinates alternateIndex = IndexCoordinat... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | insertWithExplicitIndexNameShouldOverwriteMetadata | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void insertShouldAcceptPlainMapStructureAsSource() {
Map<String, Object> map = new LinkedHashMap<>(Collections.singletonMap("foo", "bar"));
operations.save(map, IndexCoordinates.of(indexNameProvider.indexName())) //
.as(StepVerifier::create) //
.consumeNextWith(actual -> assert... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | insertShouldAcceptPlainMapStructureAsSource | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void insertShouldErrorOnNullEntity() {
assertThatThrownBy(() -> operations.save(null)).isInstanceOf(IllegalArgumentException.class);
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | insertShouldErrorOnNullEntity | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-519, DATAES-767, DATAES-822
public void getByIdShouldErrorWhenIndexDoesNotExist() {
operations.get("foo", SampleEntity.class, IndexCoordinates.of("no-such-index")) //
.as(StepVerifier::create) //
.expectError(RestStatusException.class);
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | getByIdShouldErrorWhenIndexDoesNotExist | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void getByIdShouldReturnEntity() {
SampleEntity sampleEntity = randomEntity("some message");
index(sampleEntity);
operations.get(sampleEntity.getId(), SampleEntity.class) //
.as(StepVerifier::create) //
.expectNext(sampleEntity) //
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | getByIdShouldReturnEntity | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void getByIdWhenIdIsAutogeneratedShouldHaveIdSetCorrectly() {
SampleEntity sampleEntity = new SampleEntity();
sampleEntity.setMessage("some message");
index(sampleEntity);
assertThat(sampleEntity.getId()).isNotNull();
operations.get(sampleEntity.getId(), SampleEntity.class) //
... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | getByIdWhenIdIsAutogeneratedShouldHaveIdSetCorrectly | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void getByIdShouldCompleteWhenNotingFound() {
SampleEntity sampleEntity = randomEntity("some message");
index(sampleEntity);
operations.get("foo", SampleEntity.class) //
.as(StepVerifier::create) //
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | getByIdShouldCompleteWhenNotingFound | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void getByIdShouldErrorForNullId() {
assertThatThrownBy(() -> operations.get(null, SampleEntity.class)).isInstanceOf(IllegalArgumentException.class);
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | getByIdShouldErrorForNullId | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void getByIdWithExplicitIndexNameShouldOverwriteMetadata() {
SampleEntity sampleEntity = randomEntity("some message");
IndexCoordinates defaultIndex = IndexCoordinates.of(indexNameProvider.indexName());
IndexCoordinates alternateIndex = IndexCoordinates.of(indexNameProvider.indexName... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | getByIdWithExplicitIndexNameShouldOverwriteMetadata | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-519
public void existsShouldReturnFalseWhenIndexDoesNotExist() {
operations.exists("foo", IndexCoordinates.of("no-such-index")) //
.as(StepVerifier::create) //
.expectNext(false) //
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | existsShouldReturnFalseWhenIndexDoesNotExist | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void existsShouldReturnTrueWhenFound() {
SampleEntity sampleEntity = randomEntity("some message");
index(sampleEntity);
operations.exists(sampleEntity.getId(), SampleEntity.class) //
.as(StepVerifier::create) //
.expectNext(true) //
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | existsShouldReturnTrueWhenFound | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void existsShouldReturnFalseWhenNotFound() {
SampleEntity sampleEntity = randomEntity("some message");
index(sampleEntity);
operations.exists("foo", SampleEntity.class) //
.as(StepVerifier::create) //
.expectNext(false) //
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | existsShouldReturnFalseWhenNotFound | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-519, DATAES-767
public void searchShouldCompleteWhenIndexDoesNotExist() {
operations
.search(new CriteriaQuery(Criteria.where("message").is("some message")), SampleEntity.class,
IndexCoordinates.of("no-such-index")) //
.as(StepVerifier::create) //
.expectError(RestStatusException.c... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | searchShouldCompleteWhenIndexDoesNotExist | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void searchShouldApplyCriteria() {
SampleEntity sampleEntity = randomEntity("some message");
index(sampleEntity);
CriteriaQuery criteriaQuery = new CriteriaQuery(Criteria.where("message").is("some message"));
operations.search(criteriaQuery, SampleEntity.class) //
.map(SearchH... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | searchShouldApplyCriteria | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void searchShouldReturnEmptyFluxIfNothingFound() {
SampleEntity sampleEntity = randomEntity("some message");
index(sampleEntity);
CriteriaQuery criteriaQuery = new CriteriaQuery(Criteria.where("message").is("foo"));
operations.search(criteriaQuery, SampleEntity.class) //
.as(S... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | searchShouldReturnEmptyFluxIfNothingFound | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void shouldAllowStringBasedQuery() {
index(randomEntity("test message"), randomEntity("test test"), randomEntity("some message"));
operations.search(new StringQuery(MATCH_ALL), SampleEntity.class) //
.as(StepVerifier::create) //
.expectNextCount(3) //
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldAllowStringBasedQuery | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void shouldExecuteGivenCriteriaQuery() {
SampleEntity shouldMatch = randomEntity("test message");
SampleEntity shouldNotMatch = randomEntity("the dog ate my homework");
index(shouldMatch, shouldNotMatch);
CriteriaQuery query = new CriteriaQuery(new Criteria("message").contains("tes... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldExecuteGivenCriteriaQuery | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void shouldReturnListForGivenCriteria() {
SampleEntity sampleEntity1 = randomEntity("test message");
SampleEntity sampleEntity2 = randomEntity("test test");
SampleEntity sampleEntity3 = randomEntity("some message");
index(sampleEntity1, sampleEntity2, sampleEntity3);
CriteriaQue... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldReturnListForGivenCriteria | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-595
public void shouldReturnListUsingLocalPreferenceForGivenCriteria() {
SampleEntity sampleEntity1 = randomEntity("test message");
SampleEntity sampleEntity2 = randomEntity("test test");
SampleEntity sampleEntity3 = randomEntity("some message");
index(sampleEntity1, sampleEntity2, sampleEnti... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldReturnListUsingLocalPreferenceForGivenCriteria | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-595, DATAES-767
public void shouldThrowDataAccessExceptionWhenInvalidPreferenceForGivenCriteria() {
SampleEntity sampleEntity1 = randomEntity("test message");
SampleEntity sampleEntity2 = randomEntity("test test");
SampleEntity sampleEntity3 = randomEntity("some message");
index(sampleEntity1... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldThrowDataAccessExceptionWhenInvalidPreferenceForGivenCriteria | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void shouldReturnProjectedTargetEntity() {
SampleEntity sampleEntity1 = randomEntity("test message");
SampleEntity sampleEntity2 = randomEntity("test test");
SampleEntity sampleEntity3 = randomEntity("some message");
index(sampleEntity1, sampleEntity2, sampleEntity3);
CriteriaQu... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldReturnProjectedTargetEntity | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-518
public void searchShouldApplyPagingCorrectly() {
index(IntStream.range(0, 100).mapToObj(it -> randomEntity("entity - " + it)).toArray(SampleEntity[]::new));
CriteriaQuery query = new CriteriaQuery(new Criteria("message").contains("entity")) //
.addSort(Sort.by("message"))//
.setPageab... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | searchShouldApplyPagingCorrectly | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-518
public void findWithoutPagingShouldReadAll() {
index(IntStream.range(0, 100).mapToObj(it -> randomEntity("entity - " + it)).toArray(SampleEntity[]::new));
var query = CriteriaQuery.builder(new Criteria("message").contains("entity")) //
.withSort(Sort.by("message")) //
.withPageable(Pa... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | findWithoutPagingShouldReadAll | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-567
public void aggregateShouldReturnAggregations() {
SampleEntity sampleEntity1 = randomEntity("some message");
SampleEntity sampleEntity2 = randomEntity("some message");
SampleEntity sampleEntity3 = randomEntity("other message");
index(sampleEntity1, sampleEntity2, sampleEntity3);
Query ... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | aggregateShouldReturnAggregations | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-567, DATAES-767
public void aggregateShouldErrorWhenIndexDoesNotExist() {
operations
.aggregate(new CriteriaQuery(Criteria.where("message").is("some message")), SampleEntity.class,
IndexCoordinates.of("no-such-index")) //
.as(StepVerifier::create) //
.expectError(RestStatusException... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | aggregateShouldErrorWhenIndexDoesNotExist | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-519, DATAES-767
public void countShouldReturnZeroWhenIndexDoesNotExist() {
operations.count(SampleEntity.class) //
.as(StepVerifier::create) //
.expectError(RestStatusException.class);
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | countShouldReturnZeroWhenIndexDoesNotExist | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void countShouldReturnCountAllWhenGivenNoQuery() {
index(randomEntity("test message"), randomEntity("test test"), randomEntity("some message"));
operations.count(SampleEntity.class) //
.as(StepVerifier::create) //
.expectNext(3L) //
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | countShouldReturnCountAllWhenGivenNoQuery | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void countShouldReturnCountMatchingDocuments() {
index(randomEntity("test message"), randomEntity("test test"), randomEntity("some message"));
CriteriaQuery query = new CriteriaQuery(new Criteria("message").contains("test"));
operations.count(query, SampleEntity.class) //
.as(St... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | countShouldReturnCountMatchingDocuments | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-519, DATAES-767
public void deleteShouldErrorWhenIndexDoesNotExist() {
operations.delete("does-not-exists", IndexCoordinates.of("no-such-index")) //
.as(StepVerifier::create)//
.expectError(RestStatusException.class);
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | deleteShouldErrorWhenIndexDoesNotExist | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void deleteShouldRemoveExistingDocumentById() {
SampleEntity sampleEntity = randomEntity("test message");
index(sampleEntity);
operations.delete(sampleEntity.getId(), SampleEntity.class) //
.as(StepVerifier::create)//
.expectNext(sampleEntity.getId()) //
.verifyComplete()... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | deleteShouldRemoveExistingDocumentById | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void deleteShouldRemoveExistingDocumentByIdUsingIndexName() {
SampleEntity sampleEntity = randomEntity("test message");
index(sampleEntity);
operations.delete(sampleEntity.getId(), IndexCoordinates.of(indexNameProvider.indexName())) //
.as(StepVerifier::create)//
.expectNext(... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | deleteShouldRemoveExistingDocumentByIdUsingIndexName | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void deleteShouldRemoveExistingDocument() {
SampleEntity sampleEntity = randomEntity("test message");
index(sampleEntity);
operations.delete(sampleEntity) //
.as(StepVerifier::create)//
.expectNext(sampleEntity.getId()) //
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | deleteShouldRemoveExistingDocument | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void deleteShouldCompleteWhenNothingDeleted() {
SampleEntity sampleEntity = randomEntity("test message");
operations.delete(sampleEntity) //
.as(StepVerifier::create)//
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | deleteShouldCompleteWhenNothingDeleted | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-519
public void deleteByQueryShouldReturnZeroWhenIndexDoesNotExist() {
CriteriaQuery query = new CriteriaQuery(new Criteria("message").contains("test"));
operations.delete(DeleteQuery.builder(query).build(), SampleEntity.class) //
.as(StepVerifier::create) //
.consumeNextWith(byQueryRespo... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | deleteByQueryShouldReturnZeroWhenIndexDoesNotExist | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-547
public void shouldDeleteAcrossIndex() {
String indexPrefix = "rx-template-test-index";
IndexCoordinates thisIndex = IndexCoordinates.of(indexPrefix + "-this");
IndexCoordinates thatIndex = IndexCoordinates.of(indexPrefix + "-that");
operations.save(randomEntity("test"), thisIndex) //
... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldDeleteAcrossIndex | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-547
public void shouldDeleteAcrossIndexWhenNoMatchingDataPresent() {
String indexPrefix = "rx-template-test-index";
IndexCoordinates thisIndex = IndexCoordinates.of(indexPrefix + "-this");
IndexCoordinates thatIndex = IndexCoordinates.of(indexPrefix + "-that");
operations.save(randomEntity("p... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldDeleteAcrossIndexWhenNoMatchingDataPresent | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void deleteByQueryShouldReturnNumberOfDeletedDocuments() {
index(randomEntity("test message"), randomEntity("test test"), randomEntity("some message"));
CriteriaQuery query = new CriteriaQuery(new Criteria("message").contains("test"));
operations.delete(DeleteQuery.builder(query).bu... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | deleteByQueryShouldReturnNumberOfDeletedDocuments | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-504
public void deleteByQueryShouldReturnZeroIfNothingDeleted() {
index(randomEntity("test message"));
CriteriaQuery query = new CriteriaQuery(new Criteria("message").contains("luke"));
operations.delete(DeleteQuery.builder(query).build(), SampleEntity.class) //
.map(ByQueryResponse::getDe... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | deleteByQueryShouldReturnZeroIfNothingDeleted | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-593
public void shouldReturnDocumentWithCollapsedField() {
SampleEntity entity1 = randomEntity("test message");
entity1.setRate(1);
SampleEntity entity2 = randomEntity("test another message");
entity2.setRate(2);
SampleEntity entity3 = randomEntity("test message again");
entity3.setRate(1)... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldReturnDocumentWithCollapsedField | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test
void shouldReturnSortFields() {
SampleEntity entity = randomEntity("test message");
entity.rate = 42;
index(entity);
Query query = getBuilderWithMatchAllQuery().withSort(Sort.by(Sort.Direction.DESC, "rate")).build();
operations.search(query, SampleEntity.class) //
.as(StepVerifier::create) //
... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldReturnSortFields | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-623, #1678
public void shouldReturnObjectsForGivenIdsUsingMultiGet() {
SampleEntity entity1 = randomEntity("test message 1");
entity1.rate = 1;
index(entity1);
SampleEntity entity2 = randomEntity("test message 2");
entity2.rate = 2;
index(entity2);
var query = operations.queryBuilderWith... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldReturnObjectsForGivenIdsUsingMultiGet | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-623
public void shouldReturnObjectsForGivenIdsUsingMultiGetWithFields() {
SampleEntity entity1 = randomEntity("test message 1");
entity1.rate = 1;
index(entity1);
SampleEntity entity2 = randomEntity("test message 2");
entity2.rate = 2;
index(entity2);
var query = operations.queryBuilderW... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldReturnObjectsForGivenIdsUsingMultiGetWithFields | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-623. #1678
public void shouldDoBulkUpdate() {
SampleEntity entity1 = randomEntity("test message 1");
entity1.rate = 1;
index(entity1);
SampleEntity entity2 = randomEntity("test message 2");
entity2.rate = 2;
index(entity2);
org.springframework.data.elasticsearch.core.document.Document do... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldDoBulkUpdate | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-623
void shouldSaveAll() {
SampleEntity entity1 = randomEntity("test message 1");
entity1.rate = 1;
SampleEntity entity2 = randomEntity("test message 2");
entity2.rate = 2;
operations.saveAll(Mono.just(Arrays.asList(entity1, entity2)), IndexCoordinates.of(indexNameProvider.indexName())) //
... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldSaveAll | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-753
void shouldReturnEmptyFluxOnSaveAllWithEmptyInput() {
operations.saveAll(Collections.emptyList(), IndexCoordinates.of(indexNameProvider.indexName())) //
.as(StepVerifier::create) //
.verifyComplete();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | shouldReturnEmptyFluxOnSaveAllWithEmptyInput | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-799
void getShouldReturnSeqNoPrimaryTerm() {
OptimisticEntity original = new OptimisticEntity();
original.setMessage("It's fine");
OptimisticEntity saved = operations.save(original).block();
operations.get(saved.getId(), OptimisticEntity.class).as(StepVerifier::create)
.assertNext(this::as... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | getShouldReturnSeqNoPrimaryTerm | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
private void assertThatSeqNoPrimaryTermIsFilled(OptimisticEntity retrieved) {
assertThat(retrieved.seqNoPrimaryTerm).isNotNull();
assertThat(retrieved.seqNoPrimaryTerm.sequenceNumber()).isNotNull();
assertThat(retrieved.seqNoPrimaryTerm.sequenceNumber()).isNotNegative();
assertThat(retrieved.seqNoPrimaryTerm.pr... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | assertThatSeqNoPrimaryTermIsFilled | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-799, #1678
void multiGetShouldReturnSeqNoPrimaryTerm() {
OptimisticEntity original = new OptimisticEntity();
original.setMessage("It's fine");
OptimisticEntity saved = operations.save(original).block();
operations
.multiGet(multiGetQueryForOne(saved.getId()), OptimisticEntity.class,
... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | multiGetShouldReturnSeqNoPrimaryTerm | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
private Query multiGetQueryForOne(String id) {
return operations.queryBuilderWithIds(List.of(id)).build();
} | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | multiGetQueryForOne | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
@Test // DATAES-799
void searchShouldReturnSeqNoPrimaryTerm() {
OptimisticEntity original = new OptimisticEntity();
original.setMessage("It's fine");
OptimisticEntity saved = operations.save(original).block();
blocking(operations.indexOps(OptimisticEntity.class)).refresh();
operations
.search(searchQue... | @author Christoph Strobl
@author Mark Paluch
@author Peter-Josef Meisch
@author Farid Azaza
@author Martin Choraine
@author Aleksei Arsenev
@author Russell Parry
@author Roman Puchkovskiy
@author George Popides
@author Sijia Liu
@author Illia Ulianov | searchShouldReturnSeqNoPrimaryTerm | java | spring-projects/spring-data-elasticsearch | src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.