]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Default PAPERLESS_NUMBER_OF_SUGGESTED_DATES to 3 1367/head
authorMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Thu, 25 Aug 2022 15:03:38 +0000 (08:03 -0700)
committerMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Thu, 25 Aug 2022 15:03:38 +0000 (08:03 -0700)
docs/configuration.rst
src/paperless/settings.py

index f9714379cf7e480ce70b84b9fa439509f1ae969d..1c1c54806036785a48f863d4e1202282737712bb 100644 (file)
@@ -742,18 +742,17 @@ PAPERLESS_FILENAME_DATE_ORDER=<format>
     Defaults to none, which disables this feature.
 
 PAPERLESS_NUMBER_OF_SUGGESTED_DATES=<num>
-    Paperless will search the entire document for any date. The first date found will
-    be used as a default value for the created date. With this setting in place,
-    paperless will suggestion other dates found in the document.
+    Paperless searches an entire document for dates. The first date found will
+    be used as the initial value for the created date. When this variable is
+    greater than 0 (or left to it's default value), paperless will also suggest
+    other dates found in the document, up to a maximum of this setting. Note that
+    duplicates will be removed, which can result in fewer dates displayed in the
+    frontend than this setting value.
 
-    Regarding the size of the document, the task to find all dates can consuming much time.
-    Therefore the number of found dates can be limited with this setting.
+    The task to find all dates can be time-consuming and increases with a higher
+    (maximum) number of suggested dates and slower hardware.
 
-    If 10 dates should be suggested, paperless will grab every date from the top of the
-    document to the bottom until it has reached 10 dates. After this, duplicates will
-    be removed, which can lead to less than 10 dates displayed in the frontend.
-
-    Set the number to 0 to disable this feature (default)
+    Defaults to 3. Set to 0 to disable this feature.
 
 PAPERLESS_THUMBNAIL_FONT_NAME=<filename>
     Paperless creates thumbnails for plain text files by rendering the content
index f0c24feea3884ed6e88ecf298917c2d540ba97ec..7ec260b1a9335d6f07107e8ea7b67a88cd3a7638 100644 (file)
@@ -588,10 +588,9 @@ POST_CONSUME_SCRIPT = os.getenv("PAPERLESS_POST_CONSUME_SCRIPT")
 DATE_ORDER = os.getenv("PAPERLESS_DATE_ORDER", "DMY")
 FILENAME_DATE_ORDER = os.getenv("PAPERLESS_FILENAME_DATE_ORDER")
 
-# Number of dates used as suggestions in the frontend
-# The number counter from top to bottom.
-# Duplicates will be removed, which will result in less shown suggestion dates.
-NUMBER_OF_SUGGESTED_DATES = __get_int("PAPERLESS_NUMBER_OF_SUGGESTED_DATES", 0)
+# Maximum number of dates taken from document start to end to show as suggestions for
+# `created` date in the frontend. Duplicates are removed, which can result in fewer dates shown.
+NUMBER_OF_SUGGESTED_DATES = __get_int("PAPERLESS_NUMBER_OF_SUGGESTED_DATES", 3)
 
 # Transformations applied before filename parsing
 FILENAME_PARSE_TRANSFORMS = []