@@ -17,15 +17,11 @@ namespace Nest
17
17
[ JsonConverter ( typeof ( ProcessorJsonConverter < AttachmentProcessor > ) ) ]
18
18
public interface IAttachmentProcessor : IProcessor
19
19
{
20
- /// <summary>
21
- /// The field to get the base64 encoded field from
22
- /// </summary>
20
+ /// <summary> The field to get the base64 encoded field from </summary>
23
21
[ JsonProperty ( "field" ) ]
24
22
Field Field { get ; set ; }
25
23
26
- /// <summary>
27
- /// The field that will hold the attachment information
28
- /// </summary>
24
+ /// <summary> The field that will hold the attachment information </summary>
29
25
[ JsonProperty ( "target_field" ) ]
30
26
Field TargetField { get ; set ; }
31
27
@@ -43,59 +39,42 @@ public interface IAttachmentProcessor : IProcessor
43
39
[ JsonProperty ( "indexed_chars" ) ]
44
40
long ? IndexedCharacters { get ; set ; }
45
41
46
- /// <summary>
47
- /// If `true` and `field` does not exist, the processor quietly exits without modifying the document
48
- /// </summary>
42
+ /// <summary> Field name from which you can overwrite the number of chars being used for extraction. </summary>
43
+ [ JsonProperty ( "indexed_chars_field" ) ]
44
+ Field IndexedCharactersField { get ; set ; }
45
+
46
+
47
+ /// <summary> If `true` and `field` does not exist, the processor quietly exits without modifying the document </summary>
49
48
[ JsonProperty ( "ignore_missing" ) ]
50
49
bool ? IgnoreMissing { get ; set ; }
51
50
}
52
51
53
- /// <summary>
54
- /// The ingest attachment plugin lets Elasticsearch extract file attachments in common formats
55
- /// (such as PPT, XLS, and PDF) by using the Apache text extraction library Tika.
56
- /// You can use the ingest attachment plugin as a replacement for the mapper attachment plugin.
57
- /// </summary>
58
- /// <remarks>
59
- /// Requires the Ingest Attachment Processor Plugin to be installed on the cluster.
60
- /// </remarks>
52
+ /// <inheritdoc cref="IAttachmentProcessor"/>
61
53
public class AttachmentProcessor : ProcessorBase , IAttachmentProcessor
62
54
{
63
55
protected override string Name => "attachment" ;
64
56
65
- /// <summary>
66
- /// The field to get the base64 encoded field from
67
- /// </summary>
57
+ /// <inheritdoc cref="IAttachmentProcessor.Field"/>
68
58
public Field Field { get ; set ; }
69
59
70
- /// <summary>
71
- /// The field that will hold the attachment information
72
- /// </summary>
60
+ /// <inheritdoc cref="IAttachmentProcessor.TargetField"/>
73
61
public Field TargetField { get ; set ; }
74
62
75
- /// <summary>
76
- /// Properties to select to be stored. Can be content, title, name, author,
77
- /// keywords, date, content_type, content_length, language. Defaults to all
78
- /// </summary>
63
+ /// <inheritdoc cref="IAttachmentProcessor.Properties"/>
79
64
public IEnumerable < string > Properties { get ; set ; }
80
65
81
- /// <summary>
82
- /// The number of chars being used for extraction to prevent huge fields. Use -1 for no limit.
83
- /// Defaults to 100000.
84
- /// </summary>
66
+ /// <inheritdoc cref="IAttachmentProcessor.IndexedCharacters"/>
85
67
public long ? IndexedCharacters { get ; set ; }
86
68
69
+ /// <inheritdoc cref="IAttachmentProcessor.IndexedCharactersField"/>
70
+ public Field IndexedCharactersField { get ; set ; }
71
+
87
72
/// <inheritdoc/>
73
+ /// <inheritdoc cref="IAttachmentProcessor.IgnoreMissing"/>
88
74
public bool ? IgnoreMissing { get ; set ; }
89
75
}
90
76
91
- /// <summary>
92
- /// The ingest attachment plugin lets Elasticsearch extract file attachments in common formats
93
- /// (such as PPT, XLS, and PDF) by using the Apache text extraction library Tika.
94
- /// You can use the ingest attachment plugin as a replacement for the mapper attachment plugin.
95
- /// </summary>
96
- /// <remarks>
97
- /// Requires the Ingest Attachment Processor Plugin to be installed on the cluster.
98
- /// </remarks>
77
+ /// <inheritdoc cref="IAttachmentProcessor"/>
99
78
public class AttachmentProcessorDescriptor < T >
100
79
: ProcessorDescriptorBase < AttachmentProcessorDescriptor < T > , IAttachmentProcessor > , IAttachmentProcessor
101
80
where T : class
@@ -107,48 +86,36 @@ public class AttachmentProcessorDescriptor<T>
107
86
IEnumerable < string > IAttachmentProcessor . Properties { get ; set ; }
108
87
long ? IAttachmentProcessor . IndexedCharacters { get ; set ; }
109
88
bool ? IAttachmentProcessor . IgnoreMissing { get ; set ; }
89
+ Field IAttachmentProcessor . IndexedCharactersField { get ; set ; }
110
90
111
- /// <summary>
112
- /// The field to get the base64 encoded field from
113
- /// </summary>
91
+ /// <inheritdoc cref="IAttachmentProcessor.Field"/>
114
92
public AttachmentProcessorDescriptor < T > Field ( Field field ) => Assign ( a => a . Field = field ) ;
115
93
116
- /// <summary>
117
- /// The field to get the base64 encoded field from
118
- /// </summary>
119
- public AttachmentProcessorDescriptor < T > Field ( Expression < Func < T , object > > objectPath ) =>
120
- Assign ( a => a . Field = objectPath ) ;
94
+ /// <inheritdoc cref="IAttachmentProcessor.Field"/>
95
+ public AttachmentProcessorDescriptor < T > Field ( Expression < Func < T , object > > objectPath ) => Assign ( a => a . Field = objectPath ) ;
121
96
122
- /// <summary>
123
- /// The field that will hold the attachment information
124
- /// </summary>
97
+ /// <inheritdoc cref="IAttachmentProcessor.TargetField"/>
125
98
public AttachmentProcessorDescriptor < T > TargetField ( Field field ) => Assign ( a => a . TargetField = field ) ;
126
99
127
- /// <summary>
128
- /// The field that will hold the attachment information
129
- /// </summary>
130
- public AttachmentProcessorDescriptor < T > TargetField ( Expression < Func < T , object > > objectPath ) =>
131
- Assign ( a => a . TargetField = objectPath ) ;
100
+ /// <inheritdoc cref="IAttachmentProcessor.TargetField"/>
101
+ public AttachmentProcessorDescriptor < T > TargetField ( Expression < Func < T , object > > objectPath ) => Assign ( a => a . TargetField = objectPath ) ;
132
102
133
- /// <summary>
134
- /// The number of chars being used for extraction to prevent huge fields. Use -1 for no limit.
135
- /// Defaults to 100000.
136
- /// </summary>
103
+ /// <inheritdoc cref="IAttachmentProcessor.IndexedCharacters"/>
137
104
public AttachmentProcessorDescriptor < T > IndexedCharacters ( long ? indexedCharacters ) => Assign ( a => a . IndexedCharacters = indexedCharacters ) ;
138
105
139
- /// <inheritdoc/>
106
+ /// <inheritdoc cref="IAttachmentProcessor.IndexedCharactersField"/>
107
+ public AttachmentProcessorDescriptor < T > IndexedCharactersField ( Field field ) => Assign ( a => a . IndexedCharactersField = field ) ;
108
+
109
+ /// <inheritdoc cref="IAttachmentProcessor.IndexedCharactersField"/>
110
+ public AttachmentProcessorDescriptor < T > IndexedCharactersField ( Expression < Func < T , object > > objectPath ) => Assign ( a => a . IndexedCharactersField = objectPath ) ;
111
+
112
+ /// <inheritdoc cref="IAttachmentProcessor.IgnoreMissing"/>
140
113
public AttachmentProcessorDescriptor < T > IgnoreMissing ( bool ? ignoreMissing = true ) => Assign ( a => a . IgnoreMissing = ignoreMissing ) ;
141
114
142
- /// <summary>
143
- /// Properties to select to be stored. Can be content, title, name, author,
144
- /// keywords, date, content_type, content_length, language. Defaults to all
145
- /// </summary>
115
+ /// <inheritdoc cref="IAttachmentProcessor.Properties"/>
146
116
public AttachmentProcessorDescriptor < T > Properties ( IEnumerable < string > properties ) => Assign ( a => a . Properties = properties ) ;
147
117
148
- /// <summary>
149
- /// Properties to select to be stored. Can be content, title, name, author,
150
- /// keywords, date, content_type, content_length, language. Defaults to all
151
- /// </summary>
118
+ /// <inheritdoc cref="IAttachmentProcessor.Properties"/>
152
119
public AttachmentProcessorDescriptor < T > Properties ( params string [ ] properties ) => Assign ( a => a . Properties = properties ) ;
153
120
}
154
121
}
0 commit comments