Fix No file size for pdf using web connector
@@ -206,6 +206,15 @@ public class DatafariUpdateProcessor extends UpdateRequestProcessor {
}
}
+ final SolrInputField streamSizeField = doc.get("ignored_stream_size");
+ long streamSize = Long.parseLong((String) streamSizeField.getValue());
+
+ if (doc.getFieldValue("original_file_size") == null) {
+ if (streamSizeField != null) {
+ doc.addField("original_file_size",streamSize);
+ }
+ }
+
if (url.startsWith("http")) {
if (doc.get("title") == null) {
if (doc.get("jsoup_title") != null) {
