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
@Nullable public Integer getScriptedValue2() { return scriptedValue2; }
build a {@link RuntimeField} to return the product of the document's value property and the given factor
getScriptedValue2
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsIntegrationTests.java
Apache-2.0
public void setScriptedValue2(@Nullable Integer scriptedValue2) { this.scriptedValue2 = scriptedValue2; }
build a {@link RuntimeField} to return the product of the document's value property and the given factor
setScriptedValue2
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsIntegrationTests.java
Apache-2.0
@BeforeEach void setUp() { indexNameProvider.increment(); indexOperations = operations.indexOps(Director.class); indexOperations.createWithMapping(); operations.save(francisFordCoppola, stanleyKubrik); }
Integration tests for nested sorts. @author Peter-Josef Meisch
setUp
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
Apache-2.0
@Test @Order(Integer.MAX_VALUE) void cleanup() { operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + '*')).delete(); }
Integration tests for nested sorts. @author Peter-Josef Meisch
cleanup
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
Apache-2.0
@Test // #1784 @DisplayName("should sort directors by year of birth of actor in their movies ascending") void shouldSortDirectorsByYearOfBirthOfActorInTheirMoviesAscending() { var order = new org.springframework.data.elasticsearch.core.query.Order(Sort.Direction.ASC, "movies.actors.yearOfBirth") // .withNe...
Integration tests for nested sorts. @author Peter-Josef Meisch
shouldSortDirectorsByYearOfBirthOfActorInTheirMoviesAscending
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
Apache-2.0
@Test // #1784 @DisplayName("should sort directors by year of birth of actor in their movies descending") void shouldSortDirectorsByYearOfBirthOfActorInTheirMoviesDescending() { var order = new org.springframework.data.elasticsearch.core.query.Order(Sort.Direction.DESC, "movies.actors.yearOfBirth") // .wit...
Integration tests for nested sorts. @author Peter-Josef Meisch
shouldSortDirectorsByYearOfBirthOfActorInTheirMoviesDescending
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
Apache-2.0
@Test // #1784 @DisplayName("should sort directors by year of birth of male actor in their movies descending") void shouldSortDirectorsByYearOfBirthOfMaleActorInTheirMoviesDescending() { var filter = StringQuery.builder(""" { "term": {"movies.actors.sex": "m"} } """).build(); var order = new org.springfr...
Integration tests for nested sorts. @author Peter-Josef Meisch
shouldSortDirectorsByYearOfBirthOfMaleActorInTheirMoviesDescending
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java
Apache-2.0
@BeforeAll static void beforeAll() { // check that the used id values go to different shards of the index which is configured to have 7 shards. // Elasticsearch uses the following function: Function<String, Integer> calcShard = routing -> Math.floorMod(Murmur3HashFunction.hash(routing), 7); Integer shard0 = c...
@author Peter-Josef Meisch @author Anton Naydenov
beforeAll
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@BeforeEach void setUp() { indexNameProvider.increment(); operations.indexOps(RoutingEntity.class).createWithMapping(); }
@author Peter-Josef Meisch @author Anton Naydenov
setUp
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Test @Order(java.lang.Integer.MAX_VALUE) void cleanup() { operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + "*")).delete(); }
@author Peter-Josef Meisch @author Anton Naydenov
cleanup
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Test // #1218 @DisplayName("should store data with different routing and be able to get it") void shouldStoreDataWithDifferentRoutingAndBeAbleToGetIt() { RoutingEntity entity = new RoutingEntity(ID_1, ID_2); operations.save(entity); RoutingEntity savedEntity = operations.withRouting(RoutingResolver.just(ID_2...
@author Peter-Josef Meisch @author Anton Naydenov
shouldStoreDataWithDifferentRoutingAndBeAbleToGetIt
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Test // #1218 @DisplayName("should store data with different routing and be able to delete it") void shouldStoreDataWithDifferentRoutingAndBeAbleToDeleteIt() { RoutingEntity entity = new RoutingEntity(ID_1, ID_2); operations.save(entity); String deletedId = operations.withRouting(RoutingResolver.just(ID_2))....
@author Peter-Josef Meisch @author Anton Naydenov
shouldStoreDataWithDifferentRoutingAndBeAbleToDeleteIt
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Test // #1218 @DisplayName("should store data with different routing and get the routing in the search result") void shouldStoreDataWithDifferentRoutingAndGetTheRoutingInTheSearchResult() { RoutingEntity entity = new RoutingEntity(ID_1, ID_2); operations.save(entity); SearchHits<RoutingEntity> searchHits = ...
@author Peter-Josef Meisch @author Anton Naydenov
shouldStoreDataWithDifferentRoutingAndGetTheRoutingInTheSearchResult
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Test // #1954 @DisplayName("should use routing values in multiget") void shouldUseRoutingValuesInMultiget() { Consumer<String> save = (String id) -> operations.save(new RoutingEntity(id, id)); save.accept(ID_1); save.accept(ID_2); save.accept(ID_3); Query query = Query.multiGetQueryWithRouting( // Ar...
@author Peter-Josef Meisch @author Anton Naydenov
shouldUseRoutingValuesInMultiget
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Test void shouldCreateACopyOfTheClientWithRefreshPolicy() { // given AbstractElasticsearchTemplate sourceTemplate = (AbstractElasticsearchTemplate) operations; SimpleElasticsearchMappingContext mappingContext = new SimpleElasticsearchMappingContext(); DefaultRoutingResolver defaultRoutingResolver = new Defaul...
@author Peter-Josef Meisch @author Anton Naydenov
shouldCreateACopyOfTheClientWithRefreshPolicy
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Nullable public String getId() { return id; }
@author Peter-Josef Meisch @author Anton Naydenov
getId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
public void setId(@Nullable String id) { this.id = id; }
@author Peter-Josef Meisch @author Anton Naydenov
setId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Nullable public String getRouting() { return routing; }
@author Peter-Josef Meisch @author Anton Naydenov
getRouting
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
public void setRouting(@Nullable String routing) { this.routing = routing; }
@author Peter-Josef Meisch @author Anton Naydenov
setRouting
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof RoutingEntity that)) return false; if (!Objects.equals(id, that.id)) return false; return Objects.equals(routing, that.routing); }
@author Peter-Josef Meisch @author Anton Naydenov
equals
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (routing != null ? routing.hashCode() : 0); return result; }
@author Peter-Josef Meisch @author Anton Naydenov
hashCode
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
public static int hash(String routing) { final byte[] bytesToHash = new byte[routing.length() * 2]; for (int i = 0; i < routing.length(); ++i) { final char c = routing.charAt(i); final byte b1 = (byte) c, b2 = (byte) (c >>> 8); assert ((b1 & 0xFF) | ((b2 & 0xFF) << 8)) == c; // no information loss ...
Copied from org.elasticsearch.cluster.routing.Murmur3HashFunction from Elasticsearch 7.9.3
hash
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
public static int hash(byte[] bytes, int offset, int length) { return MurmurHash3.hash32x86(bytes, offset, length, 0); }
Copied from org.elasticsearch.cluster.routing.Murmur3HashFunction from Elasticsearch 7.9.3
hash
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/routing/RoutingIntegrationTests.java
Apache-2.0
@BeforeEach void setUp() { // create index blocking(operations.indexOps(EntityForSQL.class)).createWithMapping(); // add data operations .saveAll(List.of(EntityForSQL.builder().withViews(3).build(), EntityForSQL.builder().withViews(0).build()), EntityForSQL.class) .blockLast(); }
Testing the reactive querying using SQL syntax. @author Youssef Aouichaoui
setUp
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
Apache-2.0
@AfterEach void tearDown() { // delete index blocking(operations.indexOps(EntityForSQL.class)).delete(); }
Testing the reactive querying using SQL syntax. @author Youssef Aouichaoui
tearDown
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
Apache-2.0
@Test // #2683 void when_search_with_an_sql_query() { // Given SqlQuery query = SqlQuery.builder("SELECT * FROM entity_for_sql WHERE views = 0").build(); // When // Then operations.search(query).as(StepVerifier::create).expectNextCount(1).verifyComplete(); }
Testing the reactive querying using SQL syntax. @author Youssef Aouichaoui
when_search_with_an_sql_query
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
Apache-2.0
@Nullable public String getId() { return id; }
Testing the reactive querying using SQL syntax. @author Youssef Aouichaoui
getId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
Apache-2.0
public Integer getViews() { return views; }
Testing the reactive querying using SQL syntax. @author Youssef Aouichaoui
getViews
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
Apache-2.0
public static EntityForSQL.Builder builder() { return new EntityForSQL.Builder(); }
Testing the reactive querying using SQL syntax. @author Youssef Aouichaoui
builder
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
Apache-2.0
public EntityForSQL.Builder withViews(Integer views) { this.views = views; return this; }
Testing the reactive querying using SQL syntax. @author Youssef Aouichaoui
withViews
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
Apache-2.0
public EntityForSQL build() { return new EntityForSQL(this); }
Testing the reactive querying using SQL syntax. @author Youssef Aouichaoui
build
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/ReactiveSqlOperationsIntegrationTests.java
Apache-2.0
@BeforeEach void setUp() { // create index indexOps = operations.indexOps(EntityForSQL.class); indexOps.createWithMapping(); // add data operations.save(EntityForSQL.builder().withViews(3).build(), EntityForSQL.builder().withViews(0).build()); }
Testing the querying using SQL syntax. @author Youssef Aouichaoui
setUp
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
Apache-2.0
@AfterEach void tearDown() { // delete index if (indexOps != null) { indexOps.delete(); } }
Testing the querying using SQL syntax. @author Youssef Aouichaoui
tearDown
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
Apache-2.0
@Test // #2683 void when_search_with_an_sql_query() { // Given SqlQuery query = SqlQuery.builder("SELECT * FROM entity_for_sql WHERE views = 0").build(); // When // Then SqlResponse response = operations.search(query); assertNotNull(response); assertFalse(response.getRows().isEmpty()); assertEquals(1...
Testing the querying using SQL syntax. @author Youssef Aouichaoui
when_search_with_an_sql_query
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
Apache-2.0
@Test // #2683 void when_search_with_an_sql_query_that_has_aggregated_column() { // Given SqlQuery query = SqlQuery.builder("SELECT SUM(views) AS TOTAL FROM entity_for_sql").build(); // When // Then SqlResponse response = operations.search(query); assertThat(response.getColumns()).first().extracting(SqlR...
Testing the querying using SQL syntax. @author Youssef Aouichaoui
when_search_with_an_sql_query_that_has_aggregated_column
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
Apache-2.0
@Nullable public String getId() { return id; }
Testing the querying using SQL syntax. @author Youssef Aouichaoui
getId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
Apache-2.0
public Integer getViews() { return views; }
Testing the querying using SQL syntax. @author Youssef Aouichaoui
getViews
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
Apache-2.0
public static Builder builder() { return new Builder(); }
Testing the querying using SQL syntax. @author Youssef Aouichaoui
builder
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
Apache-2.0
public Builder withViews(Integer views) { this.views = views; return this; }
Testing the querying using SQL syntax. @author Youssef Aouichaoui
withViews
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
Apache-2.0
public EntityForSQL build() { return new EntityForSQL(this); }
Testing the querying using SQL syntax. @author Youssef Aouichaoui
build
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/sql/SqlOperationsIntegrationTests.java
Apache-2.0
@BeforeEach void setup() { indexNameProvider.increment(); operations.indexOps(CompletionEntity.class).createWithMapping(); operations.indexOps(AnnotatedCompletionEntity.class).createWithMapping(); }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
setup
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Test @Order(java.lang.Integer.MAX_VALUE) void cleanup() { operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + "*")).delete(); }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
cleanup
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
private void loadCompletionObjectEntities() { List<IndexQuery> indexQueries = new ArrayList<>(); indexQueries.add(new CompletionEntityBuilder("1").name("Rizwan Idrees").suggest("Rizwan Idrees").buildIndex()); indexQueries .add(new CompletionEntityBuilder("2").name("Franck Marchand").suggest("Franck", "Marcha...
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
loadCompletionObjectEntities
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
private void loadAnnotatedCompletionObjectEntities() { NonDocumentEntity nonDocumentEntity = new NonDocumentEntity(); nonDocumentEntity.setSomeField1("foo"); nonDocumentEntity.setSomeField2("bar"); List<IndexQuery> indexQueries = new ArrayList<>(); indexQueries.add( new AnnotatedCompletionEntityBuilder(...
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
loadAnnotatedCompletionObjectEntities
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
private void loadAnnotatedCompletionObjectEntitiesWithWeights() { List<IndexQuery> indexQueries = new ArrayList<>(); indexQueries.add(new AnnotatedCompletionEntityBuilder("1").name("Mewes Kochheim1") .suggest(new String[] { "Mewes Kochheim1" }, 4).buildIndex()); indexQueries.add(new AnnotatedCompletionEntity...
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
loadAnnotatedCompletionObjectEntitiesWithWeights
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Test public void shouldFindSuggestionsForGivenCriteriaQueryUsingCompletionEntity() { loadCompletionObjectEntities(); Query query = getSuggestQuery("test-suggest", "suggest", "m"); SearchHits<CompletionEntity> searchHits = operations.search(query, CompletionEntity.class); assertThat(searchHits.hasSuggest())...
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
shouldFindSuggestionsForGivenCriteriaQueryUsingCompletionEntity
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Test // DATAES-754 void shouldRetrieveEntityWithCompletion() { loadCompletionObjectEntities(); operations.get("1", CompletionEntity.class); }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
shouldRetrieveEntityWithCompletion
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Test public void shouldFindSuggestionsForGivenCriteriaQueryUsingAnnotatedCompletionEntity() { loadAnnotatedCompletionObjectEntities(); Query query = getSuggestQuery("test-suggest", "suggest", "m"); SearchHits<AnnotatedCompletionEntity> searchHits = operations.search(query, AnnotatedCompletionEntity.class); ...
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
shouldFindSuggestionsForGivenCriteriaQueryUsingAnnotatedCompletionEntity
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Test public void shouldFindSuggestionsWithWeightsForGivenCriteriaQueryUsingAnnotatedCompletionEntity() { loadAnnotatedCompletionObjectEntitiesWithWeights(); Query query = getSuggestQuery("test-suggest", "suggest", "m"); SearchHits<AnnotatedCompletionEntity> searchHits = operations.search(query, AnnotatedCompl...
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
shouldFindSuggestionsWithWeightsForGivenCriteriaQueryUsingAnnotatedCompletionEntity
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Nullable public String getSomeField1() { return someField1; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
getSomeField1
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public void setSomeField1(String someField1) { this.someField1 = someField1; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
setSomeField1
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Nullable public String getSomeField2() { return someField2; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
getSomeField2
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public void setSomeField2(String someField2) { this.someField2 = someField2; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
setSomeField2
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Nullable public String getId() { return id; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
getId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public void setId(String id) { this.id = id; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
setId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Nullable public String getName() { return name; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
getName
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public void setName(String name) { this.name = name; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
setName
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Nullable public Completion getSuggest() { return suggest; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
getSuggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public void setSuggest(Completion suggest) { this.suggest = suggest; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
setSuggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public CompletionEntityBuilder name(String name) { result.setName(name); return this; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
name
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public CompletionEntityBuilder suggest(String... input) { return suggest(input, null); }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
suggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public CompletionEntityBuilder suggest(String[] input, Integer weight) { Completion suggest = new Completion(input); suggest.setWeight(weight); result.setSuggest(suggest); return this; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
suggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public CompletionEntity build() { return result; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
build
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public IndexQuery buildIndex() { IndexQuery indexQuery = new IndexQuery(); indexQuery.setId(result.getId()); indexQuery.setObject(result); return indexQuery; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
buildIndex
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Nullable public String getId() { return id; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
getId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public void setId(String id) { this.id = id; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
setId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Nullable public String getName() { return name; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
getName
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public void setName(String name) { this.name = name; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
setName
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@Nullable public Completion getSuggest() { return suggest; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
getSuggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public void setSuggest(Completion suggest) { this.suggest = suggest; }
@author Rizwan Idrees @author Mohsin Husen @author Franck Marchand @author Artur Konczak @author Mewes Kochheim @author Peter-Josef Meisch
setSuggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public AnnotatedCompletionEntityBuilder name(String name) { result.setName(name); return this; }
@author Franck Marchand @author Mohsin Husen @author Mewes Kochheim
name
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public AnnotatedCompletionEntityBuilder suggest(String... input) { return suggest(input, null); }
@author Franck Marchand @author Mohsin Husen @author Mewes Kochheim
suggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public AnnotatedCompletionEntityBuilder suggest(String[] input, Integer weight) { Completion suggest = new Completion(input); suggest.setWeight(weight); result.setSuggest(suggest); return this; }
@author Franck Marchand @author Mohsin Husen @author Mewes Kochheim
suggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public AnnotatedCompletionEntity build() { return result; }
@author Franck Marchand @author Mohsin Husen @author Mewes Kochheim
build
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
public IndexQuery buildIndex() { IndexQuery indexQuery = new IndexQuery(); indexQuery.setId(result.getId()); indexQuery.setObject(result); return indexQuery; }
@author Franck Marchand @author Mohsin Husen @author Mewes Kochheim
buildIndex
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java
Apache-2.0
@BeforeEach void setup() { indexNameProvider.increment(); operations.indexOps(ContextCompletionEntity.class).createWithMapping(); }
@author Robert Gruendler @author Peter-Josef Meisch
setup
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@Test @Order(java.lang.Integer.MAX_VALUE) void cleanup() { operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + "*")).delete(); }
@author Robert Gruendler @author Peter-Josef Meisch
cleanup
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
private void loadContextCompletionObjectEntities() { NonDocumentEntity nonDocumentEntity = new NonDocumentEntity(); nonDocumentEntity.setSomeField1("foo"); nonDocumentEntity.setSomeField2("bar"); List<IndexQuery> indexQueries = new ArrayList<>(); Map<String, List<String>> context1 = new HashMap<>(); cont...
@author Robert Gruendler @author Peter-Josef Meisch
loadContextCompletionObjectEntities
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@Test // DATAES-536 public void shouldFindSuggestionsForGivenCriteriaQueryUsingContextCompletionEntityOfMongo() { loadContextCompletionObjectEntities(); Query query = getSearchQuery(SUGGESTION_NAME, "mongo"); var searchHits = operations.search(query, ContextCompletionEntity.class); assertThat(searchHits.has...
@author Robert Gruendler @author Peter-Josef Meisch
shouldFindSuggestionsForGivenCriteriaQueryUsingContextCompletionEntityOfMongo
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@Test // DATAES-536 public void shouldFindSuggestionsForGivenCriteriaQueryUsingContextCompletionEntityOfElastic() { loadContextCompletionObjectEntities(); Query query = getSearchQuery(SUGGESTION_NAME, "elastic"); var searchHits = operations.search(query, ContextCompletionEntity.class); assertThat(searchHits...
@author Robert Gruendler @author Peter-Josef Meisch
shouldFindSuggestionsForGivenCriteriaQueryUsingContextCompletionEntityOfElastic
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@Test // DATAES-536 public void shouldFindSuggestionsForGivenCriteriaQueryUsingContextCompletionEntityOfKotlin() { loadContextCompletionObjectEntities(); Query query = getSearchQuery(SUGGESTION_NAME, "kotlin"); var searchHits = operations.search(query, ContextCompletionEntity.class); assertThat(searchHits.h...
@author Robert Gruendler @author Peter-Josef Meisch
shouldFindSuggestionsForGivenCriteriaQueryUsingContextCompletionEntityOfKotlin
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@Nullable public String getSomeField1() { return someField1; }
@author Rizwan Idrees @author Mohsin Husen
getSomeField1
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
public void setSomeField1(String someField1) { this.someField1 = someField1; }
@author Rizwan Idrees @author Mohsin Husen
setSomeField1
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@Nullable public String getSomeField2() { return someField2; }
@author Rizwan Idrees @author Mohsin Husen
getSomeField2
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
public void setSomeField2(String someField2) { this.someField2 = someField2; }
@author Rizwan Idrees @author Mohsin Husen
setSomeField2
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@Nullable public String getId() { return id; }
@author Mewes Kochheim @author Robert Gruendler
getId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
public void setId(String id) { this.id = id; }
@author Mewes Kochheim @author Robert Gruendler
setId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@Nullable public String getName() { return name; }
@author Mewes Kochheim @author Robert Gruendler
getName
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
public void setName(String name) { this.name = name; }
@author Mewes Kochheim @author Robert Gruendler
setName
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@Nullable public Completion getSuggest() { return suggest; }
@author Mewes Kochheim @author Robert Gruendler
getSuggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
public void setSuggest(Completion suggest) { this.suggest = suggest; }
@author Mewes Kochheim @author Robert Gruendler
setSuggest
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java
Apache-2.0
@BeforeEach public void before() { indexNameProvider.increment(); operations.indexOps(ImmutableEntity.class).createWithMapping(); }
@author Young Gu @author Oliver Gierke @author Mark Paluch @author Christoph Strobl @author Peter-Josef Meisch
before
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
Apache-2.0
@Test @Order(java.lang.Integer.MAX_VALUE) void cleanup() { operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + "*")).delete(); }
@author Young Gu @author Oliver Gierke @author Mark Paluch @author Christoph Strobl @author Peter-Josef Meisch
cleanup
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
Apache-2.0
@Test // DATAES-281 public void shouldSaveAndFindImmutableDocument() { // when ImmutableEntity entity = repository.save(new ImmutableEntity("test name")); assertThat(entity.getId()).isNotNull(); // then Optional<ImmutableEntity> entityFromElasticSearch = repository.findById(entity.getId()); assertThat(e...
@author Young Gu @author Oliver Gierke @author Mark Paluch @author Christoph Strobl @author Peter-Josef Meisch
shouldSaveAndFindImmutableDocument
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
Apache-2.0
public ImmutableEntity withId(@Nullable String id) { return new ImmutableEntity(id, this.name); }
@author Young Gu @author Oliver Gierke @author Mark Paluch @author Christoph Strobl @author Peter-Josef Meisch
withId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
Apache-2.0
public String getId() { return id; }
@author Young Gu @author Oliver Gierke @author Mark Paluch @author Christoph Strobl @author Peter-Josef Meisch
getId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
Apache-2.0
public String getName() { return name; }
@author Young Gu @author Oliver Gierke @author Mark Paluch @author Christoph Strobl @author Peter-Josef Meisch
getName
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java
Apache-2.0
@Nullable public static ClusterConnectionInfo clusterConnectionInfo() { return clusterConnectionInfoThreadLocal.get(); }
@return the {@link ClusterConnectionInfo} from the ThreadLocal storage.
clusterConnectionInfo
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.java
Apache-2.0
@Nullable public ClusterConnectionInfo getClusterConnectionInfo() { return clusterConnectionInfo; }
@return the {@link ClusterConnectionInfo} from the ThreadLocal storage.
getClusterConnectionInfo
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.java
Apache-2.0
@Nullable private ClusterConnectionInfo createClusterConnectionInfo() { String host = System.getenv(ENV_ELASTICSEARCH_HOST); if (hasText(host)) { String envPort = System.getenv(ENV_ELASTICSEARCH_PORT); int port = 9200; try { if (hasText(envPort)) { port = Integer.parseInt(envPort); } ...
@return the {@link ClusterConnectionInfo} from the ThreadLocal storage.
createClusterConnectionInfo
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.java
Apache-2.0