rer.solrpush 1.4.3__tar.gz → 1.5.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.
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/CHANGES.rst +13 -1
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/MANIFEST.in +6 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/PKG-INFO +14 -2
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/setup.cfg +2 -6
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/setup.py +2 -2
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/adapters/configure.zcml +6 -0
- rer.solrpush-1.5.0/src/rer/solrpush/adapters/summary.py +11 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/behaviors/solr_fields.py +1 -3
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/controlpanel.py +2 -6
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/elevate_settings.py +0 -13
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/maintenance.py +20 -34
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/querybuilder.py +8 -11
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/scales.py +1 -1
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/interfaces/elevate.py +8 -37
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/interfaces/settings.py +3 -31
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/parser.py +1 -1
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/metadata.xml +1 -1
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/configure.zcml +1 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/deserializer/controlpanel.py +2 -6
- rer.solrpush-1.5.0/src/rer/solrpush/restapi/serializer/catalog.py +14 -0
- rer.solrpush-1.5.0/src/rer/solrpush/restapi/serializer/configure.zcml +8 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/services/solr_search/batch.py +4 -6
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/services/solr_search/solr_search_handler.py +12 -28
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/testing.py +28 -27
- rer.solrpush-1.5.0/src/rer/solrpush/tests/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_behaviors.py +5 -4
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_elevate.py +12 -5
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_events.py +9 -11
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_image_tags.py +5 -7
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_maintenance.py +5 -7
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_querybuilder.py +5 -6
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_restapi_search.py +3 -1
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_search.py +11 -25
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_solr_interface.py +11 -17
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_tika.py +5 -7
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/test_vocabularies.py +8 -15
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/upgrades.py +6 -3
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/upgrades.zcml +8 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/utils/solr_common.py +3 -9
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/utils/solr_indexer.py +77 -84
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/utils/solr_search.py +15 -35
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/vocabularies.py +0 -1
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer.solrpush.egg-info/PKG-INFO +14 -2
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer.solrpush.egg-info/SOURCES.txt +4 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer.solrpush.egg-info/requires.txt +1 -1
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/CONTRIBUTORS.rst +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/DEVELOP.rst +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/LICENSE.GPL +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/LICENSE.rst +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/README.rst +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/constraints_plone60.txt +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/docker-compose.yml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/docs/Solr-Push_Configurazione.jpg +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/docs/index.rst +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/docs/rer-logo.png +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/publiccode.yml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/adapters/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/adapters/file.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/adapters/rss_feed.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/behaviors/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/behaviors/configure.zcml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/configure.zcml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/overrides/plone.app.contenttypes.browser.templates.listing.pt +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/query_debug.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/.gitkeep +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/dist/dev/main.js +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/dist/dev/main.js.map +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/dist/prod/main.js +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/dist/prod/main.js.map +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/javascripts/FacetsContainer/index.js +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/javascripts/ProgressBar/index.js +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/javascripts/ProgressBarContainer/index.js +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/javascripts/index.js +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/package.json +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/styles.css +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/styles.css.map +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/styles.scss +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/static/yarn.lock +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/templates/controlpanel_layout.pt +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/templates/query_debug.pt +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/browser/templates/reindex_solr.pt +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/configure.zcml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/indexer.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/interfaces/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/interfaces/adapter.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/interfaces/layer.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/interfaces/queueprocessor.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/locales/README.rst +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/locales/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/locales/en/LC_MESSAGES/rer.solrpush.mo +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/locales/en/LC_MESSAGES/rer.solrpush.po +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/locales/it/LC_MESSAGES/rer.solrpush.mo +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/locales/it/LC_MESSAGES/rer.solrpush.po +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/locales/rer.solrpush.pot +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/locales/update.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/locales/update.sh +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/permissions.zcml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/actions.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/browserlayer.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/catalog.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/controlpanel.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/registry/bundle.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/registry/criteria.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/registry/settings.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/rolemap.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/default/types/Document.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/to_1100/componentregistry.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/to_1100/metadata.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/to_1300/controlpanel.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/to_1300/registry.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/uninstall/browserlayer.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/uninstall/controlpanel.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/profiles/uninstall/registry.xml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/controlpanel.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/deserializer/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/deserializer/configure.zcml +0 -0
- {rer.solrpush-1.4.3/src/rer/solrpush/restapi/services → rer.solrpush-1.5.0/src/rer/solrpush/restapi/serializer}/__init__.py +0 -0
- {rer.solrpush-1.4.3/src/rer/solrpush/restapi/services/elevate_schema → rer.solrpush-1.5.0/src/rer/solrpush/restapi/services}/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/services/configure.zcml +0 -0
- {rer.solrpush-1.4.3/src/rer/solrpush/restapi/services/solr_search → rer.solrpush-1.5.0/src/rer/solrpush/restapi/services/elevate_schema}/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/services/elevate_schema/configure.zcml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/services/elevate_schema/get.py +0 -0
- {rer.solrpush-1.4.3/src/rer/solrpush/tests → rer.solrpush-1.5.0/src/rer/solrpush/restapi/services/solr_search}/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/services/solr_search/configure.zcml +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/services/solr_search/get.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/setuphandlers.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/docs/example.docx +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/docs/example.ods +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/docs/example.pdf +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/tests/docs/plone_logo.png +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/utils/__init__.py +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer.solrpush.egg-info/dependency_links.txt +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer.solrpush.egg-info/entry_points.txt +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer.solrpush.egg-info/namespace_packages.txt +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer.solrpush.egg-info/not-zip-safe +0 -0
- {rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer.solrpush.egg-info/top_level.txt +0 -0
|
@@ -2,13 +2,25 @@ Changelog
|
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
1.5.0 (2024-12-05)
|
|
6
|
+
------------------
|
|
7
|
+
|
|
8
|
+
- Remove new line characters in get_site_title method.
|
|
9
|
+
[cekk]
|
|
10
|
+
- Change elevate schema to be editable with Volto.
|
|
11
|
+
[cekk]
|
|
12
|
+
- Partly remove Python2 compatibility.
|
|
13
|
+
[cekk]
|
|
14
|
+
- Fix pagination in querybuilder for solr.
|
|
15
|
+
[cekk]
|
|
16
|
+
|
|
17
|
+
|
|
5
18
|
1.4.3 (2024-10-11)
|
|
6
19
|
------------------
|
|
7
20
|
|
|
8
21
|
- Fix SolrIndexProcessor logic: avoid not needed reindexes when we are reindexing objects with indexes not in SOLR.
|
|
9
22
|
[cekk]
|
|
10
23
|
|
|
11
|
-
|
|
12
24
|
1.4.2 (2024-08-08)
|
|
13
25
|
------------------
|
|
14
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rer.solrpush
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.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
|
|
@@ -244,13 +244,25 @@ Changelog
|
|
|
244
244
|
=========
|
|
245
245
|
|
|
246
246
|
|
|
247
|
+
1.5.0 (2024-12-05)
|
|
248
|
+
------------------
|
|
249
|
+
|
|
250
|
+
- Remove new line characters in get_site_title method.
|
|
251
|
+
[cekk]
|
|
252
|
+
- Change elevate schema to be editable with Volto.
|
|
253
|
+
[cekk]
|
|
254
|
+
- Partly remove Python2 compatibility.
|
|
255
|
+
[cekk]
|
|
256
|
+
- Fix pagination in querybuilder for solr.
|
|
257
|
+
[cekk]
|
|
258
|
+
|
|
259
|
+
|
|
247
260
|
1.4.3 (2024-10-11)
|
|
248
261
|
------------------
|
|
249
262
|
|
|
250
263
|
- Fix SolrIndexProcessor logic: avoid not needed reindexes when we are reindexing objects with indexes not in SOLR.
|
|
251
264
|
[cekk]
|
|
252
265
|
|
|
253
|
-
|
|
254
266
|
1.4.2 (2024-08-08)
|
|
255
267
|
------------------
|
|
256
268
|
|
|
@@ -6,11 +6,7 @@ ignore =
|
|
|
6
6
|
.gitattributes
|
|
7
7
|
|
|
8
8
|
[isort]
|
|
9
|
-
|
|
10
|
-
force_single_line = True
|
|
11
|
-
lines_after_imports = 2
|
|
12
|
-
line_length = 200
|
|
13
|
-
not_skip = __init__.py
|
|
9
|
+
profile = plone
|
|
14
10
|
|
|
15
11
|
[flake8]
|
|
16
12
|
ignore =
|
|
@@ -19,7 +15,7 @@ ignore =
|
|
|
19
15
|
E501
|
|
20
16
|
T001
|
|
21
17
|
C813
|
|
22
|
-
|
|
18
|
+
C101
|
|
23
19
|
exclude = bootstrap.py,docs,*.egg.,omelette
|
|
24
20
|
max-line-length = 88
|
|
25
21
|
max-complexity = 18
|
|
@@ -16,7 +16,7 @@ long_description = "\n\n".join(
|
|
|
16
16
|
|
|
17
17
|
setup(
|
|
18
18
|
name="rer.solrpush",
|
|
19
|
-
version="1.
|
|
19
|
+
version="1.5.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
|
|
@@ -59,7 +59,7 @@ setup(
|
|
|
59
59
|
"plone.api>=1.8.4",
|
|
60
60
|
"pysolr",
|
|
61
61
|
'ftfy==4.4.3;python_version<="2.7"',
|
|
62
|
-
"plone.restapi",
|
|
62
|
+
"plone.restapi>=8.13.0",
|
|
63
63
|
"z3c.jbot",
|
|
64
64
|
],
|
|
65
65
|
extras_require={
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from plone.restapi.interfaces import IJSONSummarySerializerMetadata
|
|
2
|
+
from zope.interface import implementer
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@implementer(IJSONSummarySerializerMetadata)
|
|
6
|
+
class JSONSummarySerializerMetadata:
|
|
7
|
+
def default_metadata_fields(self):
|
|
8
|
+
"""
|
|
9
|
+
Force always return some metadata
|
|
10
|
+
"""
|
|
11
|
+
return {"[elevated]", "Date"}
|
|
@@ -11,9 +11,7 @@ from zope.interface import provider
|
|
|
11
11
|
class ISolrFields(model.Schema):
|
|
12
12
|
"""Additional fields to control Solr integration"""
|
|
13
13
|
|
|
14
|
-
directives.fieldset(
|
|
15
|
-
"categorization", fields=["showinsearch", "searchwords"]
|
|
16
|
-
)
|
|
14
|
+
directives.fieldset("categorization", fields=["showinsearch", "searchwords"])
|
|
17
15
|
|
|
18
16
|
showinsearch = schema.Bool(
|
|
19
17
|
required=False,
|
|
@@ -63,9 +63,7 @@ class RerSolrpushEditForm(RegistryEditForm):
|
|
|
63
63
|
api.portal.show_message(_("Changes saved."), request=self.request)
|
|
64
64
|
init_error = init_solr_push()
|
|
65
65
|
if init_error:
|
|
66
|
-
api.portal.show_message(
|
|
67
|
-
init_error, type="error", request=self.request
|
|
68
|
-
)
|
|
66
|
+
api.portal.show_message(init_error, type="error", request=self.request)
|
|
69
67
|
else:
|
|
70
68
|
api.portal.show_message(
|
|
71
69
|
_("Loaded schema.xml from SOLR"), request=self.request
|
|
@@ -82,9 +80,7 @@ class RerSolrpushEditForm(RegistryEditForm):
|
|
|
82
80
|
|
|
83
81
|
init_error = init_solr_push()
|
|
84
82
|
if init_error:
|
|
85
|
-
api.portal.show_message(
|
|
86
|
-
init_error, type="error", request=self.request
|
|
87
|
-
)
|
|
83
|
+
api.portal.show_message(init_error, type="error", request=self.request)
|
|
88
84
|
else:
|
|
89
85
|
api.portal.show_message(
|
|
90
86
|
_("Reloaded schema.xml from SOLR"), request=self.request
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
from collective.z3cform.jsonwidget.browser.widget import JSONFieldWidget
|
|
3
2
|
from plone.app.registry.browser.controlpanel import ControlPanelFormWrapper
|
|
4
3
|
from plone.app.registry.browser.controlpanel import RegistryEditForm
|
|
5
|
-
from Products.CMFPlone.resources import add_bundle_on_request
|
|
6
4
|
from rer.solrpush import _
|
|
7
5
|
from rer.solrpush.interfaces import IElevateSettings
|
|
8
|
-
from rer.solrpush.interfaces.elevate import IElevateRowSchema
|
|
9
6
|
from z3c.form import field
|
|
10
7
|
|
|
11
8
|
|
|
@@ -17,17 +14,7 @@ class ElevateSettingsEditForm(RegistryEditForm):
|
|
|
17
14
|
)
|
|
18
15
|
|
|
19
16
|
fields = field.Fields(IElevateSettings)
|
|
20
|
-
fields["elevate_schema"].widgetFactory = JSONFieldWidget
|
|
21
|
-
|
|
22
|
-
def updateWidgets(self):
|
|
23
|
-
""" """
|
|
24
|
-
super(ElevateSettingsEditForm, self).updateWidgets()
|
|
25
|
-
self.widgets["elevate_schema"].schema = IElevateRowSchema
|
|
26
17
|
|
|
27
18
|
|
|
28
19
|
class ElevateSettingsView(ControlPanelFormWrapper):
|
|
29
20
|
form = ElevateSettingsEditForm
|
|
30
|
-
|
|
31
|
-
def __call__(self):
|
|
32
|
-
add_bundle_on_request(self.request, "z3cform-jsonwidget-bundle")
|
|
33
|
-
return super(ElevateSettingsView, self).__call__()
|
|
@@ -14,8 +14,8 @@ from rer.solrpush.utils import remove_from_solr
|
|
|
14
14
|
from rer.solrpush.utils import reset_solr
|
|
15
15
|
from rer.solrpush.utils import search
|
|
16
16
|
from rer.solrpush.utils.solr_common import is_solr_active
|
|
17
|
+
from rer.solrpush.utils.solr_indexer import all_site_titles
|
|
17
18
|
from rer.solrpush.utils.solr_indexer import can_index
|
|
18
|
-
from rer.solrpush.utils.solr_indexer import get_site_title
|
|
19
19
|
from rer.solrpush.utils.solr_indexer import parse_date_as_datetime
|
|
20
20
|
from time import strftime
|
|
21
21
|
from time import time
|
|
@@ -33,9 +33,7 @@ import os
|
|
|
33
33
|
import pkg_resources
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
JS_TEMPLATE =
|
|
37
|
-
"{portal_url}/++plone++rer.solrpush/dist/{env_mode}/{name}.js?v={version}"
|
|
38
|
-
)
|
|
36
|
+
JS_TEMPLATE = "{portal_url}/++plone++rer.solrpush/dist/{env_mode}/{name}.js?v={version}"
|
|
39
37
|
CSS_TEMPLATE = (
|
|
40
38
|
"{portal_url}/++plone++rer.solrpush/dist/{env_mode}/{name}.css?v={version}"
|
|
41
39
|
)
|
|
@@ -90,10 +88,9 @@ class ResetSolr(SolrMaintenanceBaseForm):
|
|
|
90
88
|
)
|
|
91
89
|
|
|
92
90
|
def do_action(self):
|
|
91
|
+
self.request._rest_cors_preflight = True
|
|
93
92
|
reset_solr()
|
|
94
|
-
msg_label = _(
|
|
95
|
-
"maintenance_reset_success", default="SOLR index dropped"
|
|
96
|
-
)
|
|
93
|
+
msg_label = _("maintenance_reset_success", default="SOLR index dropped")
|
|
97
94
|
logger.info("##### SOLR Index dropped #####")
|
|
98
95
|
api.portal.show_message(message=msg_label, request=self.request)
|
|
99
96
|
return self.request.response.redirect(
|
|
@@ -137,9 +134,7 @@ class ReindexBaseView(BrowserView):
|
|
|
137
134
|
if not self.solr_utility:
|
|
138
135
|
return
|
|
139
136
|
if not is_solr_active():
|
|
140
|
-
logger.warning(
|
|
141
|
-
"Trying to reindexing but solr is not set as active"
|
|
142
|
-
)
|
|
137
|
+
logger.warning("Trying to reindexing but solr is not set as active")
|
|
143
138
|
return
|
|
144
139
|
elapsed = timer()
|
|
145
140
|
if self.solr_utility.enabled_types:
|
|
@@ -155,9 +150,7 @@ class ReindexBaseView(BrowserView):
|
|
|
155
150
|
)
|
|
156
151
|
logger.info("##### SOLR REINDEX START #####")
|
|
157
152
|
logger.info(
|
|
158
|
-
"Reindexing {} items.".format(
|
|
159
|
-
brains_to_reindex.actual_result_count
|
|
160
|
-
)
|
|
153
|
+
"Reindexing {} items.".format(brains_to_reindex.actual_result_count)
|
|
161
154
|
)
|
|
162
155
|
skipped = 0
|
|
163
156
|
indexed = 0
|
|
@@ -218,7 +211,10 @@ class ReindexBaseView(BrowserView):
|
|
|
218
211
|
brains_to_sync = pc()
|
|
219
212
|
good_uids = [x.UID for x in brains_to_sync]
|
|
220
213
|
solr_results = search(
|
|
221
|
-
query={
|
|
214
|
+
query={
|
|
215
|
+
"site_name": all_site_titles(),
|
|
216
|
+
"b_size": 100000000,
|
|
217
|
+
},
|
|
222
218
|
fl="UID",
|
|
223
219
|
)
|
|
224
220
|
uids_to_remove = [
|
|
@@ -256,7 +252,10 @@ class ReindexBaseView(BrowserView):
|
|
|
256
252
|
logger.info("##### SYNC CONTENTS TO SOLR #####")
|
|
257
253
|
pc = api.portal.get_tool(name="portal_catalog")
|
|
258
254
|
solr_docs = search(
|
|
259
|
-
query={
|
|
255
|
+
query={
|
|
256
|
+
"site_name": all_site_titles(),
|
|
257
|
+
"b_size": 100000000,
|
|
258
|
+
},
|
|
260
259
|
fl="UID modified",
|
|
261
260
|
).docs
|
|
262
261
|
solr_items = {item["UID"]: item["modified"] for item in solr_docs}
|
|
@@ -276,25 +275,19 @@ class ReindexBaseView(BrowserView):
|
|
|
276
275
|
logger.info("Completed in {}.".format(elapsed_time))
|
|
277
276
|
if len(results["indexed"]):
|
|
278
277
|
logger.info(
|
|
279
|
-
"Indexed {} items (new or modified):".format(
|
|
280
|
-
len(results["indexed"])
|
|
281
|
-
)
|
|
278
|
+
"Indexed {} items (new or modified):".format(len(results["indexed"]))
|
|
282
279
|
)
|
|
283
280
|
for path in results["indexed"]:
|
|
284
281
|
logger.info("- {}".format(path))
|
|
285
282
|
if len(results["removed"]):
|
|
286
283
|
logger.info(
|
|
287
|
-
"Removed {} items (no more indexeable):".format(
|
|
288
|
-
len(results["removed"])
|
|
289
|
-
)
|
|
284
|
+
"Removed {} items (no more indexeable):".format(len(results["removed"]))
|
|
290
285
|
)
|
|
291
286
|
for path in results["removed"]:
|
|
292
287
|
logger.info("- {}".format(path))
|
|
293
288
|
if len(results["not_indexed"]):
|
|
294
289
|
logger.info(
|
|
295
|
-
"NOT indexed {} items (errors):".format(
|
|
296
|
-
len(results["not_indexed"])
|
|
297
|
-
)
|
|
290
|
+
"NOT indexed {} items (errors):".format(len(results["not_indexed"]))
|
|
298
291
|
)
|
|
299
292
|
for error in results["not_indexed"]:
|
|
300
293
|
logger.info(
|
|
@@ -304,9 +297,7 @@ class ReindexBaseView(BrowserView):
|
|
|
304
297
|
)
|
|
305
298
|
)
|
|
306
299
|
|
|
307
|
-
def sync_contents(
|
|
308
|
-
self, brains_to_sync, solr_items, disable_progress=False
|
|
309
|
-
):
|
|
300
|
+
def sync_contents(self, brains_to_sync, solr_items, disable_progress=False):
|
|
310
301
|
indexed = []
|
|
311
302
|
not_indexed = []
|
|
312
303
|
removed = []
|
|
@@ -335,11 +326,8 @@ class ReindexBaseView(BrowserView):
|
|
|
335
326
|
{"path": brain.getPath(), "message": e.__str__()}
|
|
336
327
|
)
|
|
337
328
|
except Exception as e:
|
|
338
|
-
not_indexed.append(
|
|
339
|
-
{"path": brain.getPath(), "message": str(e)}
|
|
340
|
-
)
|
|
329
|
+
not_indexed.append({"path": brain.getPath(), "message": str(e)})
|
|
341
330
|
else:
|
|
342
|
-
item = brain.getObject()
|
|
343
331
|
if not can_index(item):
|
|
344
332
|
remove_from_solr(brain.UID)
|
|
345
333
|
removed.append(brain.getPath())
|
|
@@ -354,9 +342,7 @@ class ReindexBaseView(BrowserView):
|
|
|
354
342
|
if res:
|
|
355
343
|
indexed.append(brain.getPath())
|
|
356
344
|
except Exception as e:
|
|
357
|
-
not_indexed.append(
|
|
358
|
-
{"path": brain.getPath(), "message": str(e)}
|
|
359
|
-
)
|
|
345
|
+
not_indexed.append({"path": brain.getPath(), "message": str(e)})
|
|
360
346
|
if not disable_progress:
|
|
361
347
|
status["in_progress"] = False
|
|
362
348
|
return {
|
|
@@ -22,7 +22,8 @@ logger = logging.getLogger(__name__)
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
class QueryBuilder(BaseView):
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
def _makequery( # noqa: C901
|
|
26
27
|
self,
|
|
27
28
|
query=None,
|
|
28
29
|
batch=False,
|
|
@@ -33,7 +34,7 @@ class QueryBuilder(BaseView):
|
|
|
33
34
|
limit=0,
|
|
34
35
|
brains=False,
|
|
35
36
|
custom_query=None,
|
|
36
|
-
):
|
|
37
|
+
): # noqa: C901
|
|
37
38
|
"""Parse the (form)query and return using multi-adapter"""
|
|
38
39
|
query_modifiers = getUtilitiesFor(IQueryModifier)
|
|
39
40
|
for name, modifier in sorted(query_modifiers, key=itemgetter(0)):
|
|
@@ -56,16 +57,12 @@ class QueryBuilder(BaseView):
|
|
|
56
57
|
|
|
57
58
|
# Check for valid indexes
|
|
58
59
|
catalog = getToolByName(self.context, "portal_catalog")
|
|
59
|
-
valid_indexes = [
|
|
60
|
-
index for index in parsedquery if index in catalog.indexes()
|
|
61
|
-
]
|
|
60
|
+
valid_indexes = [index for index in parsedquery if index in catalog.indexes()]
|
|
62
61
|
|
|
63
62
|
# We'll ignore any invalid index, but will return an empty set if none
|
|
64
63
|
# of the indexes are valid.
|
|
65
64
|
if not valid_indexes:
|
|
66
|
-
logger.warning(
|
|
67
|
-
"Using empty query because there are no valid indexes used."
|
|
68
|
-
)
|
|
65
|
+
logger.warning("Using empty query because there are no valid indexes used.")
|
|
69
66
|
parsedquery = {}
|
|
70
67
|
|
|
71
68
|
empty_query = not parsedquery # store emptiness
|
|
@@ -105,6 +102,8 @@ class QueryBuilder(BaseView):
|
|
|
105
102
|
|
|
106
103
|
if not empty_query:
|
|
107
104
|
if search_with_solr:
|
|
105
|
+
parsedquery["b_start"] = b_start
|
|
106
|
+
parsedquery["b_size"] = b_size
|
|
108
107
|
if "SearchableText" in parsedquery:
|
|
109
108
|
if isinstance(parsedquery["SearchableText"], dict):
|
|
110
109
|
parsedquery["SearchableText"]["query"] = parsedquery[
|
|
@@ -115,9 +114,7 @@ class QueryBuilder(BaseView):
|
|
|
115
114
|
"SearchableText"
|
|
116
115
|
].rstrip("*")
|
|
117
116
|
results = SolrResponse(
|
|
118
|
-
data=solr_search(
|
|
119
|
-
**self.clean_query_for_solr(query=parsedquery)
|
|
120
|
-
)
|
|
117
|
+
data=solr_search(**self.clean_query_for_solr(query=parsedquery))
|
|
121
118
|
)
|
|
122
119
|
else:
|
|
123
120
|
results = catalog(**parsedquery)
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
from plone.app.vocabularies.catalog import CatalogSource as CatalogSourceBase
|
|
3
|
-
from plone.app.z3cform.widget import RelatedItemsFieldWidget
|
|
4
|
-
from plone.autoform import directives as form
|
|
5
3
|
from plone.supermodel import model
|
|
6
4
|
from rer.solrpush import _
|
|
7
|
-
from
|
|
8
|
-
from z3c.relationfield.schema import RelationList
|
|
5
|
+
from zExceptions import BadRequest
|
|
9
6
|
from zope import schema
|
|
10
7
|
from zope.globalrequest import getRequest
|
|
11
8
|
from zope.i18n import translate
|
|
@@ -24,32 +21,6 @@ class CatalogSource(CatalogSourceBase):
|
|
|
24
21
|
return True # Always contains to allow lazy handling of removed objs
|
|
25
22
|
|
|
26
23
|
|
|
27
|
-
class IElevateRowSchema(model.Schema):
|
|
28
|
-
text = schema.List(
|
|
29
|
-
title=_("elevate_row_schema_text_label", default="Text"),
|
|
30
|
-
description=_(
|
|
31
|
-
"elevate_row_schema_text_help",
|
|
32
|
-
default="The word that should match in the search.",
|
|
33
|
-
),
|
|
34
|
-
required=True,
|
|
35
|
-
value_type=schema.TextLine(),
|
|
36
|
-
)
|
|
37
|
-
uid = RelationList(
|
|
38
|
-
title=_("elevate_row_schema_uid_label", "Elements"),
|
|
39
|
-
description=_(
|
|
40
|
-
"elevate_row_schema_uid_help",
|
|
41
|
-
"Select a list of elements to elevate for that search word.",
|
|
42
|
-
),
|
|
43
|
-
value_type=RelationChoice(vocabulary="plone.app.vocabularies.Catalog"),
|
|
44
|
-
required=True,
|
|
45
|
-
)
|
|
46
|
-
form.widget(
|
|
47
|
-
"uid",
|
|
48
|
-
RelatedItemsFieldWidget,
|
|
49
|
-
vocabulary="plone.app.vocabularies.Catalog",
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
|
|
53
24
|
class IElevateSettings(model.Schema):
|
|
54
25
|
""" """
|
|
55
26
|
|
|
@@ -64,12 +35,12 @@ class IElevateSettings(model.Schema):
|
|
|
64
35
|
|
|
65
36
|
@invariant
|
|
66
37
|
def elevate_invariant(data):
|
|
67
|
-
|
|
38
|
+
elevate_schema = json.loads(data.elevate_schema)
|
|
68
39
|
request = getRequest()
|
|
69
|
-
words_mapping = [x["
|
|
70
|
-
for i, schema_item in enumerate(
|
|
71
|
-
|
|
72
|
-
if not
|
|
40
|
+
words_mapping = [x["keywords"] for x in elevate_schema]
|
|
41
|
+
for i, schema_item in enumerate(elevate_schema):
|
|
42
|
+
keywords = schema_item.get("keywords", [])
|
|
43
|
+
if not keywords:
|
|
73
44
|
raise Invalid(
|
|
74
45
|
translate(
|
|
75
46
|
_(
|
|
@@ -80,13 +51,13 @@ class IElevateSettings(model.Schema):
|
|
|
80
51
|
context=request,
|
|
81
52
|
)
|
|
82
53
|
)
|
|
83
|
-
for text in
|
|
54
|
+
for text in keywords:
|
|
84
55
|
for words_i, words in enumerate(words_mapping):
|
|
85
56
|
if i == words_i:
|
|
86
57
|
# it's the current config
|
|
87
58
|
continue
|
|
88
59
|
if text in words:
|
|
89
|
-
raise
|
|
60
|
+
raise BadRequest(
|
|
90
61
|
translate(
|
|
91
62
|
_(
|
|
92
63
|
"text_duplicated_label",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
from plone.app.vocabularies.catalog import CatalogSource as CatalogSourceBase
|
|
3
|
-
from plone.app.z3cform.widget import RelatedItemsFieldWidget
|
|
4
|
-
from plone.autoform import directives as form
|
|
5
3
|
from plone.supermodel import model
|
|
6
4
|
from rer.solrpush import _
|
|
7
5
|
from zope import schema
|
|
@@ -17,27 +15,6 @@ class CatalogSource(CatalogSourceBase):
|
|
|
17
15
|
return True # Always contains to allow lazy handling of removed objs
|
|
18
16
|
|
|
19
17
|
|
|
20
|
-
class IElevateRowSchema(model.Schema):
|
|
21
|
-
text = schema.TextLine(
|
|
22
|
-
title=_("elevate_row_schema_text_label", default="Text"),
|
|
23
|
-
description=_(
|
|
24
|
-
"elevate_row_schema_text_help",
|
|
25
|
-
default="The word that should match in the search.",
|
|
26
|
-
),
|
|
27
|
-
required=True,
|
|
28
|
-
)
|
|
29
|
-
uid = schema.List(
|
|
30
|
-
title=_("elevate_row_schema_uid_label", "Elements"),
|
|
31
|
-
description=_(
|
|
32
|
-
"elevate_row_schema_uid_help",
|
|
33
|
-
"Select a list of elements to elevate for that search word.",
|
|
34
|
-
),
|
|
35
|
-
value_type=schema.Choice(source=CatalogSource()),
|
|
36
|
-
required=True,
|
|
37
|
-
)
|
|
38
|
-
form.widget("uid", RelatedItemsFieldWidget)
|
|
39
|
-
|
|
40
|
-
|
|
41
18
|
class IRerSolrpushConf(model.Schema):
|
|
42
19
|
""""""
|
|
43
20
|
|
|
@@ -49,9 +26,7 @@ class IRerSolrpushConf(model.Schema):
|
|
|
49
26
|
)
|
|
50
27
|
search_enabled = schema.Bool(
|
|
51
28
|
title=_("Search enabled"),
|
|
52
|
-
description=_(
|
|
53
|
-
"Site search will use SOLR as engine instead portal_catalog."
|
|
54
|
-
),
|
|
29
|
+
description=_("Site search will use SOLR as engine instead portal_catalog."),
|
|
55
30
|
required=False,
|
|
56
31
|
default=True,
|
|
57
32
|
)
|
|
@@ -92,16 +67,13 @@ class IRerSolrpushConf(model.Schema):
|
|
|
92
67
|
required=False,
|
|
93
68
|
default=[],
|
|
94
69
|
missing_value=[],
|
|
95
|
-
value_type=schema.Choice(
|
|
96
|
-
vocabulary="plone.app.vocabularies.PortalTypes"
|
|
97
|
-
),
|
|
70
|
+
value_type=schema.Choice(vocabulary="plone.app.vocabularies.PortalTypes"),
|
|
98
71
|
)
|
|
99
72
|
|
|
100
73
|
index_fields = schema.SourceText(
|
|
101
74
|
title=_(
|
|
102
75
|
"index_fields_label",
|
|
103
|
-
default="List of fields loaded from SOLR that we use for "
|
|
104
|
-
"indexing.",
|
|
76
|
+
default="List of fields loaded from SOLR that we use for " "indexing.",
|
|
105
77
|
),
|
|
106
78
|
description=_(
|
|
107
79
|
"index_fields_help",
|
|
@@ -108,7 +108,7 @@ class Brain(dict):
|
|
|
108
108
|
If site_name is the current site, convert the physical path into a url, if it was stored.
|
|
109
109
|
Else return url attribute stored in SOLR
|
|
110
110
|
"""
|
|
111
|
-
url = self.get("url", "")
|
|
111
|
+
url = self.get("url", "") or self.get("@id", "")
|
|
112
112
|
if self.is_current_site:
|
|
113
113
|
frontend_url = api.portal.get_registry_record(
|
|
114
114
|
"frontend_url", interface=IRerSolrpushSettings, default=""
|
{rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/deserializer/controlpanel.py
RENAMED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
from plone.restapi.deserializer.controlpanels import
|
|
2
|
-
ControlpanelDeserializeFromJson,
|
|
3
|
-
)
|
|
1
|
+
from plone.restapi.deserializer.controlpanels import ControlpanelDeserializeFromJson
|
|
4
2
|
from plone.restapi.interfaces import IDeserializeFromJson
|
|
5
3
|
from rer.solrpush.interfaces import IRERSolrpushRestapiControlpanel
|
|
6
4
|
from rer.solrpush.utils import init_solr_push
|
|
@@ -10,9 +8,7 @@ from zope.interface import implementer
|
|
|
10
8
|
|
|
11
9
|
@implementer(IDeserializeFromJson)
|
|
12
10
|
@adapter(IRERSolrpushRestapiControlpanel)
|
|
13
|
-
class RERSolrpushControlpanelDeserializeFromJson(
|
|
14
|
-
ControlpanelDeserializeFromJson
|
|
15
|
-
):
|
|
11
|
+
class RERSolrpushControlpanelDeserializeFromJson(ControlpanelDeserializeFromJson):
|
|
16
12
|
def __call__(self):
|
|
17
13
|
super().__call__()
|
|
18
14
|
init_solr_push()
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from plone.restapi.interfaces import ISerializeToJson
|
|
2
|
+
from plone.restapi.serializer.catalog import (
|
|
3
|
+
LazyCatalogResultSerializer as BaseSerializer,
|
|
4
|
+
)
|
|
5
|
+
from rer.solrpush.parser import SolrResponse
|
|
6
|
+
from zope.component import adapter
|
|
7
|
+
from zope.interface import implementer
|
|
8
|
+
from zope.interface import Interface
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@implementer(ISerializeToJson)
|
|
12
|
+
@adapter(SolrResponse, Interface)
|
|
13
|
+
class LazyCatalogResultSerializerSOLR(BaseSerializer):
|
|
14
|
+
""""""
|
{rer.solrpush-1.4.3 → rer.solrpush-1.5.0}/src/rer/solrpush/restapi/services/solr_search/batch.py
RENAMED
|
@@ -11,9 +11,9 @@ class SolrHypermediaBatch(object):
|
|
|
11
11
|
def __init__(self, request, results):
|
|
12
12
|
self.request = request
|
|
13
13
|
|
|
14
|
-
self.b_start = int(
|
|
15
|
-
|
|
16
|
-
)
|
|
14
|
+
self.b_start = int(json_body(self.request).get("b_start", False)) or int(
|
|
15
|
+
self.request.form.get("b_start", 0)
|
|
16
|
+
)
|
|
17
17
|
self.b_size = int(json_body(self.request).get("b_size", False)) or int(
|
|
18
18
|
self.request.form.get("b_size", DEFAULT_BATCH_SIZE)
|
|
19
19
|
)
|
|
@@ -108,9 +108,7 @@ class SolrHypermediaBatch(object):
|
|
|
108
108
|
and add or update some query string parameters in it.
|
|
109
109
|
"""
|
|
110
110
|
url = self.request["ACTUAL_URL"]
|
|
111
|
-
qs_params = parse_qsl(
|
|
112
|
-
self.request["QUERY_STRING"], keep_blank_values=1
|
|
113
|
-
)
|
|
111
|
+
qs_params = parse_qsl(self.request["QUERY_STRING"], keep_blank_values=1)
|
|
114
112
|
|
|
115
113
|
# Take care to preserve list-like query string arguments (same QS
|
|
116
114
|
# param repeated multiple times). In other words, don't turn the
|