diff --git a/README.md b/README.md
index 6fcd9c63b89..2d2a80f9de0 100644
--- a/README.md
+++ b/README.md
@@ -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 Queen\" (alternatively \"God Save the King\"\n"
]
}
diff --git a/src/test/java/org/elasticsearch/plugin/mapper/attachments/test/SimpleAttachmentIntegrationTests.java b/src/test/java/org/elasticsearch/plugin/mapper/attachments/test/SimpleAttachmentIntegrationTests.java
index 702742982e3..017598ec0f1 100644
--- a/src/test/java/org/elasticsearch/plugin/mapper/attachments/test/SimpleAttachmentIntegrationTests.java
+++ b/src/test/java/org/elasticsearch/plugin/mapper/attachments/test/SimpleAttachmentIntegrationTests.java
@@ -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();