Skip to content

Commit 9105620

Browse files
committed
detect language not required when explicitly sending language
1 parent e5d137e commit 9105620

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/Nest/Mapping/Types/Specialized/Attachment/Attachment.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ public class Attachment
4444
public string Keywords { get; set; }
4545

4646
/// <summary>
47-
/// The language of the attachment. Can be explicitly set. This requires
48-
/// <see cref="DetectLanguage"/> to be set to <c>true</c>
47+
/// The language of the attachment. Can be explicitly set.
4948
/// </summary>
5049
[JsonProperty("language")]
5150
public string Language { get; set; }

src/Tests/Document/Single/Attachment/AttachmentApiTests.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,7 @@ public class AttachmentExplicitWithMetadataApiTests : AttachmentApiTestsBase
201201
ContentType = "application/pdf",
202202
Content = Content,
203203
Name = "content name",
204-
// in order to explicitly send language metadata,
205-
// detect_language also needs to be set to true
206-
Language = "en",
207-
DetectLanguage = true
204+
Language = "en"
208205
}
209206
};
210207

@@ -220,8 +217,7 @@ public AttachmentExplicitWithMetadataApiTests(IndexingCluster cluster, EndpointU
220217
_content = Content,
221218
_content_type = "application/pdf",
222219
_name = "content name",
223-
_language = "en",
224-
_detect_language = true
220+
_language = "en"
225221
}
226222
};
227223

0 commit comments

Comments
 (0)