BAEL-53 - minor formatting changes
This commit is contained in:
parent
5f159cab6c
commit
7a0deaceb4
@ -26,7 +26,6 @@ import com.alibaba.fastjson.JSON;
|
||||
public class ElasticSearchUnitTests {
|
||||
private List<Person> listOfPersons = new ArrayList<Person>();
|
||||
String jsonString = null;
|
||||
|
||||
Client client = null;
|
||||
|
||||
@Before
|
||||
@ -45,7 +44,6 @@ public class ElasticSearchUnitTests {
|
||||
String jsonObject = "{\"age\":20,\"dateOfBirth\":1471466076564,\"fullName\":\"John Doe\"}";
|
||||
IndexResponse response = client.prepareIndex("people", "Doe")
|
||||
.setSource(jsonObject).get();
|
||||
String id = response.getId();
|
||||
String index = response.getIndex();
|
||||
String type = response.getType();
|
||||
assertTrue(response.isCreated());
|
||||
@ -89,8 +87,7 @@ public class ElasticSearchUnitTests {
|
||||
SearchResponse response2 = client.prepareSearch()
|
||||
.setTypes()
|
||||
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
|
||||
.setPostFilter(QueryBuilders
|
||||
.simpleQueryStringQuery("+John -Doe OR Janette"))
|
||||
.setPostFilter(QueryBuilders.simpleQueryStringQuery("+John -Doe OR Janette"))
|
||||
.setFrom(0).setSize(60).setExplain(true)
|
||||
.execute()
|
||||
.actionGet();
|
||||
@ -98,8 +95,7 @@ public class ElasticSearchUnitTests {
|
||||
SearchResponse response3 = client.prepareSearch()
|
||||
.setTypes()
|
||||
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
|
||||
.setPostFilter(QueryBuilders.matchQuery(
|
||||
"John", "Name*"))
|
||||
.setPostFilter(QueryBuilders.matchQuery("John", "Name*"))
|
||||
.setFrom(0).setSize(60).setExplain(true)
|
||||
.execute()
|
||||
.actionGet();
|
||||
|
Loading…
x
Reference in New Issue
Block a user