[Test] Use now full qualified names for fields
We were asking for short name fields but elasticsearch does not allow anymore using short names but full qualified names. ```java SearchResponse response = client().prepareSearch("test") .addField("content_type") .addField("name") .execute().get(); ``` We need to use now: ```java SearchResponse response = client().prepareSearch("test") .addField("file.content_type") .addField("file.name") .execute().get(); ``` Closes #102.
This commit is contained in:
parent
400910e53e
commit
ec0de9c57d
|
@ -299,12 +299,12 @@ GET /test/person/_search
|
|||
"fields": [],
|
||||
"query": {
|
||||
"match": {
|
||||
"file": "king queen"
|
||||
"file.file": "king queen"
|
||||
}
|
||||
},
|
||||
"highlight": {
|
||||
"fields": {
|
||||
"file": {
|
||||
"file.file": {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ It gives back:
|
|||
"_id": "1",
|
||||
"_score": 0.13561106,
|
||||
"highlight": {
|
||||
"file": [
|
||||
"file.file": [
|
||||
"\"God Save the <em>Queen</em>\" (alternatively \"God Save the <em>King</em>\"\n"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -141,8 +141,8 @@ public class SimpleAttachmentIntegrationTests extends ElasticsearchIntegrationTe
|
|||
refresh();
|
||||
|
||||
SearchResponse response = client().prepareSearch("test")
|
||||
.addField("content_type")
|
||||
.addField("name")
|
||||
.addField("file.content_type")
|
||||
.addField("file.name")
|
||||
.execute().get();
|
||||
String contentType = response.getHits().getAt(0).getFields().get("file.content_type").getValue();
|
||||
String name = response.getHits().getAt(0).getFields().get("file.name").getValue();
|
||||
|
|
Loading…
Reference in New Issue