rer.solrpush 1.3.7__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/CHANGES.rst +2 -22
  2. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/MANIFEST.in +1 -0
  3. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/PKG-INFO +8 -25
  4. rer.solrpush-1.4.0/constraints_plone60.txt +1 -0
  5. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/docker-compose.yml +2 -2
  6. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/setup.cfg +11 -1
  7. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/setup.py +7 -3
  8. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/adapters/configure.zcml +7 -5
  9. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/adapters/file.py +3 -8
  10. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/adapters/rss_feed.py +0 -1
  11. rer.solrpush-1.4.0/src/rer/solrpush/behaviors/configure.zcml +20 -0
  12. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/behaviors/solr_fields.py +5 -5
  13. rer.solrpush-1.4.0/src/rer/solrpush/browser/configure.zcml +122 -0
  14. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/controlpanel.py +9 -8
  15. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/elevate_settings.py +2 -4
  16. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/maintenance.py +14 -10
  17. rer.solrpush-1.4.0/src/rer/solrpush/browser/overrides/plone.app.contenttypes.browser.templates.listing.pt +192 -0
  18. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/querybuilder.py +14 -7
  19. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/scales.py +3 -3
  20. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/configure.zcml +36 -29
  21. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/indexer.py +3 -3
  22. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/interfaces/__init__.py +4 -1
  23. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/interfaces/adapter.py +2 -1
  24. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/interfaces/elevate.py +8 -8
  25. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/interfaces/layer.py +7 -0
  26. rer.solrpush-1.4.0/src/rer/solrpush/interfaces/settings.py +194 -0
  27. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/parser.py +35 -1
  28. rer.solrpush-1.4.0/src/rer/solrpush/permissions.zcml +19 -0
  29. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/controlpanel.xml +4 -4
  30. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/metadata.xml +1 -1
  31. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/rolemap.xml +4 -0
  32. rer.solrpush-1.4.0/src/rer/solrpush/restapi/configure.zcml +25 -0
  33. rer.solrpush-1.4.0/src/rer/solrpush/restapi/controlpanel.py +26 -0
  34. rer.solrpush-1.4.0/src/rer/solrpush/restapi/deserializer/configure.zcml +7 -0
  35. rer.solrpush-1.4.0/src/rer/solrpush/restapi/deserializer/controlpanel.py +18 -0
  36. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/restapi/services/configure.zcml +2 -1
  37. rer.solrpush-1.4.0/src/rer/solrpush/restapi/services/elevate_schema/configure.zcml +15 -0
  38. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/restapi/services/solr_search/batch.py +2 -4
  39. rer.solrpush-1.4.0/src/rer/solrpush/restapi/services/solr_search/configure.zcml +15 -0
  40. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/restapi/services/solr_search/solr_search_handler.py +4 -3
  41. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/testing.py +4 -3
  42. rer.solrpush-1.4.0/src/rer/solrpush/tests/__init__.py +0 -0
  43. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_behaviors.py +4 -4
  44. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_elevate.py +10 -10
  45. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_events.py +5 -4
  46. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_image_tags.py +7 -7
  47. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_maintenance.py +9 -8
  48. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_querybuilder.py +12 -12
  49. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_restapi_search.py +22 -11
  50. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_search.py +10 -10
  51. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_solr_interface.py +6 -6
  52. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_tika.py +7 -7
  53. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/upgrades.py +1 -5
  54. rer.solrpush-1.4.0/src/rer/solrpush/upgrades.zcml +87 -0
  55. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/utils/solr_common.py +1 -1
  56. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/utils/solr_indexer.py +31 -32
  57. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/utils/solr_search.py +18 -14
  58. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/vocabularies.py +2 -1
  59. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer.solrpush.egg-info/PKG-INFO +8 -25
  60. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer.solrpush.egg-info/SOURCES.txt +6 -2
  61. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer.solrpush.egg-info/requires.txt +1 -0
  62. rer.solrpush-1.3.7/docs/conf.py +0 -239
  63. rer.solrpush-1.3.7/src/rer/solrpush/behaviors/configure.zcml +0 -16
  64. rer.solrpush-1.3.7/src/rer/solrpush/browser/configure.zcml +0 -111
  65. rer.solrpush-1.3.7/src/rer/solrpush/interfaces/settings.py +0 -194
  66. rer.solrpush-1.3.7/src/rer/solrpush/permissions.zcml +0 -18
  67. rer.solrpush-1.3.7/src/rer/solrpush/restapi/configure.zcml +0 -8
  68. rer.solrpush-1.3.7/src/rer/solrpush/restapi/services/elevate_schema/configure.zcml +0 -14
  69. rer.solrpush-1.3.7/src/rer/solrpush/restapi/services/solr_search/configure.zcml +0 -14
  70. rer.solrpush-1.3.7/src/rer/solrpush/tests/test_setup.py +0 -67
  71. rer.solrpush-1.3.7/src/rer/solrpush/upgrades.zcml +0 -94
  72. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/CONTRIBUTORS.rst +0 -0
  73. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/DEVELOP.rst +0 -0
  74. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/LICENSE.GPL +0 -0
  75. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/LICENSE.rst +0 -0
  76. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/README.rst +0 -0
  77. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/docs/Solr-Push_Configurazione.jpg +0 -0
  78. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/docs/index.rst +0 -0
  79. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/docs/rer-logo.png +0 -0
  80. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/publiccode.yml +0 -0
  81. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/__init__.py +0 -0
  82. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/__init__.py +0 -0
  83. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/adapters/__init__.py +0 -0
  84. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/behaviors/__init__.py +0 -0
  85. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/__init__.py +0 -0
  86. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/query_debug.py +0 -0
  87. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/.gitkeep +0 -0
  88. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/dist/dev/main.js +0 -0
  89. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/dist/dev/main.js.map +0 -0
  90. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/dist/prod/main.js +0 -0
  91. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/dist/prod/main.js.map +0 -0
  92. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/javascripts/FacetsContainer/index.js +0 -0
  93. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/javascripts/ProgressBar/index.js +0 -0
  94. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/javascripts/ProgressBarContainer/index.js +0 -0
  95. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/javascripts/index.js +0 -0
  96. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/package.json +0 -0
  97. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/styles.css +0 -0
  98. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/styles.css.map +0 -0
  99. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/styles.scss +0 -0
  100. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/static/yarn.lock +0 -0
  101. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/templates/controlpanel_layout.pt +0 -0
  102. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/templates/query_debug.pt +0 -0
  103. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/browser/templates/reindex_solr.pt +0 -0
  104. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/interfaces/queueprocessor.py +0 -0
  105. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/locales/README.rst +0 -0
  106. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/locales/__init__.py +0 -0
  107. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/locales/en/LC_MESSAGES/rer.solrpush.mo +0 -0
  108. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/locales/en/LC_MESSAGES/rer.solrpush.po +0 -0
  109. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/locales/it/LC_MESSAGES/rer.solrpush.mo +0 -0
  110. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/locales/it/LC_MESSAGES/rer.solrpush.po +0 -0
  111. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/locales/rer.solrpush.pot +0 -0
  112. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/locales/update.py +0 -0
  113. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/locales/update.sh +0 -0
  114. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/actions.xml +0 -0
  115. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/browserlayer.xml +0 -0
  116. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/catalog.xml +0 -0
  117. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/registry/bundle.xml +0 -0
  118. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/registry/criteria.xml +0 -0
  119. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/registry/settings.xml +0 -0
  120. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/default/types/Document.xml +0 -0
  121. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/to_1100/componentregistry.xml +0 -0
  122. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/to_1100/metadata.xml +0 -0
  123. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/to_1300/controlpanel.xml +0 -0
  124. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/to_1300/registry.xml +0 -0
  125. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/uninstall/browserlayer.xml +0 -0
  126. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/uninstall/controlpanel.xml +0 -0
  127. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/profiles/uninstall/registry.xml +0 -0
  128. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/restapi/__init__.py +0 -0
  129. {rer.solrpush-1.3.7/src/rer/solrpush/restapi/services → rer.solrpush-1.4.0/src/rer/solrpush/restapi/deserializer}/__init__.py +0 -0
  130. {rer.solrpush-1.3.7/src/rer/solrpush/restapi/services/elevate_schema → rer.solrpush-1.4.0/src/rer/solrpush/restapi/services}/__init__.py +0 -0
  131. {rer.solrpush-1.3.7/src/rer/solrpush/restapi/services/solr_search → rer.solrpush-1.4.0/src/rer/solrpush/restapi/services/elevate_schema}/__init__.py +0 -0
  132. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/restapi/services/elevate_schema/get.py +1 -1
  133. {rer.solrpush-1.3.7/src/rer/solrpush/tests → rer.solrpush-1.4.0/src/rer/solrpush/restapi/services/solr_search}/__init__.py +0 -0
  134. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/restapi/services/solr_search/get.py +3 -3
  135. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/setuphandlers.py +0 -0
  136. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/docs/example.docx +0 -0
  137. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/docs/example.ods +0 -0
  138. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/docs/example.pdf +0 -0
  139. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/docs/plone_logo.png +0 -0
  140. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/tests/test_vocabularies.py +3 -3
  141. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer/solrpush/utils/__init__.py +0 -0
  142. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer.solrpush.egg-info/dependency_links.txt +0 -0
  143. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer.solrpush.egg-info/entry_points.txt +0 -0
  144. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer.solrpush.egg-info/namespace_packages.txt +0 -0
  145. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer.solrpush.egg-info/not-zip-safe +0 -0
  146. {rer.solrpush-1.3.7 → rer.solrpush-1.4.0}/src/rer.solrpush.egg-info/top_level.txt +0 -0
@@ -2,33 +2,13 @@ Changelog
2
2
  =========
3
3
 
4
4
 
5
- 1.3.7 (2024-12-09)
5
+ 1.4.0 (2024-05-05)
6
6
  ------------------
7
7
 
8
- - Fix handle attachements when indexing a new content.
8
+ - Plone6 compatibility.
9
9
  [cekk]
10
10
 
11
11
 
12
- 1.3.6 (2024-12-06)
13
- ------------------
14
-
15
- - Fix handle attachements when indexing a new content.
16
- [cekk]
17
-
18
-
19
- 1.3.5 (2024-12-05)
20
- ------------------
21
-
22
- - Reload schema from solr with upgrade-step.
23
- [cekk]
24
-
25
-
26
- 1.3.4 (2024-12-05)
27
- ------------------
28
-
29
- - Handle also boolean indexes.
30
- [cekk]
31
-
32
12
  1.3.3 (2023-11-08)
33
13
  ------------------
34
14
 
@@ -1,6 +1,7 @@
1
1
  graft src/rer
2
2
  graft docs
3
3
  include *.rst
4
+ include *.txt
4
5
  include LICENSE.GPL
5
6
  include *.yml
6
7
  global-exclude *.pyc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rer.solrpush
3
- Version: 1.3.7
3
+ Version: 1.4.0
4
4
  Summary: Prodotto per Regione Emilia-Romagna relativo all'indicizzazione dei contenuti con solr
5
5
  Home-page: https://github.com/collective/rer.solrpush
6
6
  Author: RedTurtle
@@ -11,17 +11,20 @@ Project-URL: Source, https://github.com/collective/rer.solrpush
11
11
  Project-URL: Tracker, https://github.com/collective/rer.solrpush/issues
12
12
  Keywords: Python Plone
13
13
  Classifier: Environment :: Web Environment
14
+ Classifier: Development Status :: 5 - Production/Stable
14
15
  Classifier: Framework :: Plone
15
16
  Classifier: Framework :: Plone :: Addon
16
17
  Classifier: Framework :: Plone :: 5.1
17
18
  Classifier: Framework :: Plone :: 5.2
19
+ Classifier: Framework :: Plone :: 6.0
18
20
  Classifier: Programming Language :: Python
19
- Classifier: Programming Language :: Python :: 2.7
20
21
  Classifier: Programming Language :: Python :: 3.6
21
22
  Classifier: Programming Language :: Python :: 3.7
23
+ Classifier: Programming Language :: Python :: 3.8
24
+ Classifier: Programming Language :: Python :: 3.9
22
25
  Classifier: Operating System :: OS Independent
23
26
  Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
24
- Requires-Python: ==2.7
27
+ Requires-Python: >=3.7
25
28
  Provides-Extra: test
26
29
  License-File: LICENSE.GPL
27
30
  License-File: LICENSE.rst
@@ -241,33 +244,13 @@ Changelog
241
244
  =========
242
245
 
243
246
 
244
- 1.3.7 (2024-12-09)
247
+ 1.4.0 (2024-05-05)
245
248
  ------------------
246
249
 
247
- - Fix handle attachements when indexing a new content.
250
+ - Plone6 compatibility.
248
251
  [cekk]
249
252
 
250
253
 
251
- 1.3.6 (2024-12-06)
252
- ------------------
253
-
254
- - Fix handle attachements when indexing a new content.
255
- [cekk]
256
-
257
-
258
- 1.3.5 (2024-12-05)
259
- ------------------
260
-
261
- - Reload schema from solr with upgrade-step.
262
- [cekk]
263
-
264
-
265
- 1.3.4 (2024-12-05)
266
- ------------------
267
-
268
- - Handle also boolean indexes.
269
- [cekk]
270
-
271
254
  1.3.3 (2023-11-08)
272
255
  ------------------
273
256
 
@@ -0,0 +1 @@
1
+ -c https://dist.plone.org/release/6.0-latest/requirements.txt
@@ -2,8 +2,8 @@ version: '3'
2
2
  services:
3
3
  solr:
4
4
  container_name: solrpush
5
- image: solr:7.7.3
5
+ image: solr:8.11
6
6
  ports:
7
7
  - '8983:8983'
8
8
  volumes:
9
- - ./config:/opt/solr/server/solr/plone
9
+ - ./config:/var/solr/data
@@ -13,8 +13,18 @@ line_length = 200
13
13
  not_skip = __init__.py
14
14
 
15
15
  [flake8]
16
+ ignore =
17
+ W503,
18
+ C812,
19
+ E501
20
+ T001
21
+ C813
22
+ C901
16
23
  exclude = bootstrap.py,docs,*.egg.,omelette
17
- max-complexity = 15
24
+ max-line-length = 88
25
+ max-complexity = 18
26
+ select = B,C,E,F,W,T4,B9
27
+ builtins = unicode,basestring
18
28
 
19
29
  [egg_info]
20
30
  tag_build =
@@ -16,20 +16,23 @@ long_description = "\n\n".join(
16
16
 
17
17
  setup(
18
18
  name="rer.solrpush",
19
- version="1.3.7",
19
+ version="1.4.0",
20
20
  description="Prodotto per Regione Emilia-Romagna relativo all'indicizzazione dei contenuti con solr",
21
21
  long_description=long_description,
22
22
  # Get more from https://pypi.python.org/pypi?%3Aaction=list_classifiers
23
23
  classifiers=[
24
24
  "Environment :: Web Environment",
25
+ "Development Status :: 5 - Production/Stable",
25
26
  "Framework :: Plone",
26
27
  "Framework :: Plone :: Addon",
27
28
  "Framework :: Plone :: 5.1",
28
29
  "Framework :: Plone :: 5.2",
30
+ "Framework :: Plone :: 6.0",
29
31
  "Programming Language :: Python",
30
- "Programming Language :: Python :: 2.7",
31
32
  "Programming Language :: Python :: 3.6",
32
33
  "Programming Language :: Python :: 3.7",
34
+ "Programming Language :: Python :: 3.8",
35
+ "Programming Language :: Python :: 3.9",
33
36
  "Operating System :: OS Independent",
34
37
  "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
35
38
  ],
@@ -49,7 +52,7 @@ setup(
49
52
  package_dir={"": "src"},
50
53
  include_package_data=True,
51
54
  zip_safe=False,
52
- python_requires="==2.7",
55
+ python_requires=">=3.7",
53
56
  install_requires=[
54
57
  "setuptools",
55
58
  "collective.z3cform.jsonwidget",
@@ -57,6 +60,7 @@ setup(
57
60
  "pysolr",
58
61
  'ftfy==4.4.3;python_version<="2.7"',
59
62
  "plone.restapi",
63
+ "z3c.jbot",
60
64
  ],
61
65
  extras_require={
62
66
  "test": [
@@ -1,13 +1,15 @@
1
1
  <configure
2
2
  xmlns="http://namespaces.zope.org/zope"
3
- i18n_domain="rer.solrpush">
3
+ i18n_domain="rer.solrpush"
4
+ >
4
5
 
5
- <adapter
6
- for="plone.app.contenttypes.interfaces.IFile"
7
- provides="rer.solrpush.interfaces.adapter.IExtractFileFromTika"
6
+ <adapter
8
7
  factory=".file.FileExtractor"
8
+ provides="rer.solrpush.interfaces.adapter.IExtractFileFromTika"
9
+ for="plone.app.contenttypes.interfaces.IFile"
9
10
  />
10
11
 
11
12
  <!-- RSS feed -->
12
- <adapter factory=".rss_feed.SOLRFeedItem"/>
13
+ <adapter factory=".rss_feed.SOLRFeedItem" />
14
+
13
15
  </configure>
@@ -2,8 +2,7 @@
2
2
  from plone import api
3
3
  from rer.solrpush.interfaces.adapter import IExtractFileFromTika
4
4
  from zope.interface import implementer
5
- from ZODB.POSException import POSKeyError
6
- from ZODB.POSException import ReadConflictError
5
+
7
6
 
8
7
  try:
9
8
  from collective.limitfilesizepanel.interfaces import ILimitFileSizePanel
@@ -14,6 +13,7 @@ except ImportError:
14
13
 
15
14
  import logging
16
15
 
16
+
17
17
  logger = logging.getLogger(__name__)
18
18
 
19
19
 
@@ -50,9 +50,4 @@ class FileExtractor(object):
50
50
  file_obj.filename,
51
51
  )
52
52
  return None
53
- try:
54
- return file_obj.data
55
- except (POSKeyError, ReadConflictError):
56
- # this is raised if we are creating a new object, because there isn't the blob yet.
57
- # this is not a problem, because the file is in dictionary
58
- return None
53
+ return file_obj.data
@@ -10,7 +10,6 @@ from zope.interface import implementer
10
10
  @implementer(IFeedItem)
11
11
  @adapter(ISolrBrain, IFeed)
12
12
  class SOLRFeedItem(BaseItem):
13
-
14
13
  @property
15
14
  def link(self):
16
15
  return self.context.getURL()
@@ -0,0 +1,20 @@
1
+ <configure
2
+ xmlns="http://namespaces.zope.org/zope"
3
+ xmlns:plone="http://namespaces.plone.org/plone"
4
+ xmlns:zcml="http://namespaces.zope.org/zcml"
5
+ i18n_domain="rer.solrpush"
6
+ >
7
+
8
+ <include
9
+ package="plone.behavior"
10
+ file="meta.zcml"
11
+ />
12
+
13
+ <plone:behavior
14
+ title="Solr additional fields"
15
+ description="Extra fields for Solr indexing"
16
+ provides=".solr_fields.ISolrFields"
17
+ for="plone.dexterity.interfaces.IDexterityContent"
18
+ />
19
+
20
+ </configure>
@@ -19,7 +19,7 @@ class ISolrFields(model.Schema):
19
19
  required=False,
20
20
  default=True,
21
21
  missing_value=True,
22
- title=_("label_showinsearch", default=u"Show in search"),
22
+ title=_("label_showinsearch", default="Show in search"),
23
23
  description=_("help_showinsearch", default=""),
24
24
  )
25
25
 
@@ -27,13 +27,13 @@ class ISolrFields(model.Schema):
27
27
  required=False,
28
28
  default=[],
29
29
  missing_value=[],
30
- title=_("label_searchwords", default=u"Search words"),
30
+ title=_("label_searchwords", default="Search words"),
31
31
  value_type=schema.TextLine(),
32
32
  description=_(
33
33
  "help_searchwords",
34
- u"Specify words for which this item will show up "
35
- u"as the first search result. Multiple words can be "
36
- u"specified on new lines.",
34
+ "Specify words for which this item will show up "
35
+ "as the first search result. Multiple words can be "
36
+ "specified on new lines.",
37
37
  ),
38
38
  )
39
39
 
@@ -0,0 +1,122 @@
1
+ <configure
2
+ xmlns="http://namespaces.zope.org/zope"
3
+ xmlns:browser="http://namespaces.zope.org/browser"
4
+ xmlns:plone="http://namespaces.plone.org/plone"
5
+ i18n_domain="rer.solrpush"
6
+ >
7
+
8
+ <!-- Set overrides folder for Just-a-Bunch-Of-Templates product -->
9
+ <include
10
+ package="z3c.jbot"
11
+ file="meta.zcml"
12
+ />
13
+ <browser:jbot
14
+ directory="overrides"
15
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
16
+ />
17
+
18
+ <plone:static
19
+ directory="static"
20
+ name="rer.solrpush"
21
+ type="plone"
22
+ />
23
+
24
+ <!-- controlpanel -->
25
+ <browser:page
26
+ name="solrpush-settings"
27
+ for="Products.CMFPlone.interfaces.IPloneSiteRoot"
28
+ class=".controlpanel.RerSolrpushSettingsView"
29
+ permission="rer.solrpush.editSettings"
30
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
31
+ />
32
+ <browser:page
33
+ name="elevate-settings"
34
+ for="Products.CMFPlone.interfaces.IPloneSiteRoot"
35
+ class=".elevate_settings.ElevateSettingsView"
36
+ permission="rer.solrpush.editElevate"
37
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
38
+ />
39
+
40
+ <browser:page
41
+ name="reindex-solr"
42
+ for="Products.CMFCore.interfaces.ISiteRoot"
43
+ class=".maintenance.ReindexSolrView"
44
+ template="templates/reindex_solr.pt"
45
+ permission="cmf.ManagePortal"
46
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
47
+ />
48
+ <browser:page
49
+ name="sync-solr"
50
+ for="Products.CMFCore.interfaces.ISiteRoot"
51
+ class=".maintenance.SyncSolrView"
52
+ template="templates/reindex_solr.pt"
53
+ permission="cmf.ManagePortal"
54
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
55
+ />
56
+
57
+ <browser:page
58
+ name="reindex-progress"
59
+ for="Products.CMFCore.interfaces.ISiteRoot"
60
+ class=".maintenance.ReindexProgressView"
61
+ permission="cmf.ManagePortal"
62
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
63
+ />
64
+ <browser:page
65
+ name="do-reindex"
66
+ for="Products.CMFCore.interfaces.ISiteRoot"
67
+ class=".maintenance.DoReindexView"
68
+ permission="cmf.ManagePortal"
69
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
70
+ />
71
+ <browser:page
72
+ name="do-sync"
73
+ for="Products.CMFCore.interfaces.ISiteRoot"
74
+ class=".maintenance.DoSyncView"
75
+ permission="cmf.ManagePortal"
76
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
77
+ />
78
+
79
+ <browser:page
80
+ name="reset-solr"
81
+ for="Products.CMFCore.interfaces.ISiteRoot"
82
+ class=".maintenance.ResetSolr"
83
+ permission="cmf.ManagePortal"
84
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
85
+ />
86
+
87
+ <!-- return scaled image -->
88
+ <!-- <browser:page
89
+ name="solr-images"
90
+ class=".scales.SolrImages"
91
+ permission="zope2.View"
92
+ for="*"
93
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
94
+ /> -->
95
+
96
+ <!-- CUSTOM COLLECTIONS -->
97
+ <browser:page
98
+ name="querybuilderresults"
99
+ for="*"
100
+ class=".querybuilder.QueryBuilder"
101
+ permission="zope2.View"
102
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
103
+ />
104
+ <browser:page
105
+ name="querybuilder_html_results"
106
+ for="*"
107
+ class=".querybuilder.QueryBuilder"
108
+ attribute="html_results"
109
+ permission="zope2.View"
110
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
111
+ />
112
+
113
+ <browser:viewlet
114
+ name="solrpush.querydebug"
115
+ manager="plone.app.layout.viewlets.interfaces.IBelowContent"
116
+ class=".query_debug.QueryDebug"
117
+ template="templates/query_debug.pt"
118
+ permission="cmf.ManagePortal"
119
+ layer="rer.solrpush.interfaces.IRerSolrpushLayer"
120
+ />
121
+
122
+ </configure>
@@ -15,19 +15,20 @@ from z3c.form.interfaces import HIDDEN_MODE
15
15
 
16
16
  import logging
17
17
 
18
+
18
19
  logger = logging.getLogger(__name__)
19
20
 
20
21
 
21
22
  class FormDefault(group.Group):
22
- label = _("settings_default_label", default=u"Settings")
23
+ label = _("settings_default_label", default="Settings")
23
24
  fields = field.Fields(IRerSolrpushConf)
24
25
 
25
26
 
26
27
  class FormSearch(group.Group):
27
- label = _("settings_search_label", default=u"Search")
28
+ label = _("settings_search_label", default="Search")
28
29
  description = _(
29
30
  "settings_search_help",
30
- default=u"Use these settings to tweak search results.",
31
+ default="Use these settings to tweak search results.",
31
32
  )
32
33
  fields = field.Fields(IRerSolrpushSearchConf)
33
34
 
@@ -39,11 +40,11 @@ class RerSolrpushEditForm(RegistryEditForm):
39
40
 
40
41
  schema = IRerSolrpushSettings
41
42
  groups = (FormDefault, FormSearch)
42
- label = _(u"Solr Push Configuration")
43
+ label = _("Solr Push Configuration")
43
44
 
44
45
  formErrorsMessage = _(
45
46
  "settings_form_error",
46
- default=u"Sono presenti degli errori, si prega di ricontrollare i dati inseriti",
47
+ default="Sono presenti degli errori, si prega di ricontrollare i dati inseriti",
47
48
  )
48
49
 
49
50
  def updateFields(self):
@@ -59,7 +60,7 @@ class RerSolrpushEditForm(RegistryEditForm):
59
60
  self.status = self.formErrorsMessage
60
61
  return
61
62
  self.applyChanges(data)
62
- api.portal.show_message(_(u"Changes saved."), request=self.request)
63
+ api.portal.show_message(_("Changes saved."), request=self.request)
63
64
  init_error = init_solr_push()
64
65
  if init_error:
65
66
  api.portal.show_message(
@@ -67,7 +68,7 @@ class RerSolrpushEditForm(RegistryEditForm):
67
68
  )
68
69
  else:
69
70
  api.portal.show_message(
70
- _(u"Loaded schema.xml from SOLR"), request=self.request
71
+ _("Loaded schema.xml from SOLR"), request=self.request
71
72
  )
72
73
  self.request.response.redirect(self.request.getURL())
73
74
 
@@ -86,7 +87,7 @@ class RerSolrpushEditForm(RegistryEditForm):
86
87
  )
87
88
  else:
88
89
  api.portal.show_message(
89
- _(u"Reloaded schema.xml from SOLR"), request=self.request
90
+ _("Reloaded schema.xml from SOLR"), request=self.request
90
91
  )
91
92
  self.request.response.redirect(self.request.getURL())
92
93
 
@@ -10,19 +10,17 @@ from z3c.form import field
10
10
 
11
11
 
12
12
  class ElevateSettingsEditForm(RegistryEditForm):
13
-
14
13
  schema = IElevateSettings
15
14
  label = _(
16
15
  "solr_elevate_configuration_label",
17
- default=u"Solr Push Elevate Configuration",
16
+ default="Solr Push Elevate Configuration",
18
17
  )
19
18
 
20
19
  fields = field.Fields(IElevateSettings)
21
20
  fields["elevate_schema"].widgetFactory = JSONFieldWidget
22
21
 
23
22
  def updateWidgets(self):
24
- """
25
- """
23
+ """ """
26
24
  super(ElevateSettingsEditForm, self).updateWidgets()
27
25
  self.widgets["elevate_schema"].schema = IElevateRowSchema
28
26
 
@@ -45,7 +45,7 @@ logger = logging.getLogger(__name__)
45
45
 
46
46
 
47
47
  def timer(func=time):
48
- """ set up a generator returning the elapsed time since the last call """
48
+ """set up a generator returning the elapsed time since the last call"""
49
49
 
50
50
  def gen(last=func()):
51
51
  while True:
@@ -57,12 +57,11 @@ def timer(func=time):
57
57
 
58
58
 
59
59
  class SolrMaintenanceBaseForm(form.Form):
60
-
61
60
  # template = ViewPageTemplateFile('templates/reindex_solr.pt')
62
61
 
63
62
  ignoreContext = True
64
63
 
65
- @button.buttonAndHandler(_("start_label", default=u"Start"))
64
+ @button.buttonAndHandler(_("start_label", default="Start"))
66
65
  def handleApply(self, action):
67
66
  data, errors = self.extractData()
68
67
  if errors:
@@ -70,7 +69,7 @@ class SolrMaintenanceBaseForm(form.Form):
70
69
  return
71
70
  self.do_action()
72
71
 
73
- @button.buttonAndHandler(_("cancel_label", default=u"Cancel"))
72
+ @button.buttonAndHandler(_("cancel_label", default="Cancel"))
74
73
  def handleCancel(self, action):
75
74
  msg_label = _("maintenance_cancel_action", default="Action cancelled")
76
75
  api.portal.show_message(message=msg_label, request=self.request)
@@ -108,8 +107,8 @@ class ReindexBaseView(BrowserView):
108
107
  return translate(
109
108
  _(
110
109
  "solr_error_connection",
111
- default=u"There have been problems connecting to SOLR. "
112
- u"Contact site administrator.",
110
+ default="There have been problems connecting to SOLR. "
111
+ "Contact site administrator.",
113
112
  ),
114
113
  context=self.request,
115
114
  )
@@ -315,7 +314,12 @@ class ReindexBaseView(BrowserView):
315
314
  status = self.setupAnnotations(
316
315
  items_len=len(brains_to_sync), message="Sync contents to SOLR"
317
316
  )
317
+ i = 0
318
+ tot = len(brains_to_sync)
318
319
  for brain in brains_to_sync:
320
+ i += 1
321
+ if i % 10 == 0:
322
+ logger.info(f"Progress: {i}/{tot}")
319
323
  if not disable_progress:
320
324
  status["counter"] = status["counter"] + 1
321
325
  commit()
@@ -323,7 +327,9 @@ class ReindexBaseView(BrowserView):
323
327
  if brain.UID not in solr_items:
324
328
  # missing from solr: try to index it
325
329
  try:
330
+ logger.info("send to solr")
326
331
  res = push_to_solr(item)
332
+ logger.info("received response from solr")
327
333
  if res:
328
334
  indexed.append(brain.getPath())
329
335
  except SolrError as e:
@@ -365,7 +371,7 @@ class ReindexBaseView(BrowserView):
365
371
  class DoReindexView(ReindexBaseView):
366
372
  def __call__(self):
367
373
  authenticator = getMultiAdapter(
368
- (self.context, self.request), name=u"authenticator"
374
+ (self.context, self.request), name="authenticator"
369
375
  )
370
376
  if not authenticator.verify():
371
377
  raise Unauthorized
@@ -387,7 +393,7 @@ class DoSyncView(ReindexBaseView):
387
393
  def __call__(self, cron_view=False):
388
394
  if not cron_view:
389
395
  authenticator = getMultiAdapter(
390
- (self.context, self.request), name=u"authenticator"
396
+ (self.context, self.request), name="authenticator"
391
397
  )
392
398
  if not authenticator.verify():
393
399
  raise Unauthorized
@@ -457,7 +463,6 @@ class ReactView(BrowserView):
457
463
 
458
464
 
459
465
  class ReindexSolrView(ReactView):
460
-
461
466
  label = _("maintenance_reindex_label", default="Reindex SOLR")
462
467
  description = _(
463
468
  "maintenance_reindex_help",
@@ -467,7 +472,6 @@ class ReindexSolrView(ReactView):
467
472
 
468
473
 
469
474
  class SyncSolrView(ReactView):
470
-
471
475
  label = _("maintenance_sync_label", default="Sync SOLR")
472
476
  description = _(
473
477
  "maintenance_sync_help",