summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-03-15 10:27:18 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-03-15 10:27:18 (GMT)
commitff1f7b519c430ffa8e5f6a2f1aa96512e866e901 (patch)
treee4f298d4faf4748d019e99eafb68127a85940dfa
parent4943ff94f777fa073592f9b8a894af3698a0816c (diff)
downloadpublik-client-scripts-ff1f7b519c430ffa8e5f6a2f1aa96512e866e901.zip
publik-client-scripts-ff1f7b519c430ffa8e5f6a2f1aa96512e866e901.tar.gz
publik-client-scripts-ff1f7b519c430ffa8e5f6a2f1aa96512e866e901.tar.bz2
strasbourg: don't push forms with noindex keyword to elasticsearch (#31446)
-rw-r--r--clients/strasbourg/index-formdefs-in-elasticsearch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/clients/strasbourg/index-formdefs-in-elasticsearch.py b/clients/strasbourg/index-formdefs-in-elasticsearch.py
index 59cc6d5..4d98112 100644
--- a/clients/strasbourg/index-formdefs-in-elasticsearch.py
+++ b/clients/strasbourg/index-formdefs-in-elasticsearch.py
@@ -26,6 +26,8 @@ indexed_form_ids = [x['_id'] for x in indexed_forms['hits']['hits']]
for formdef in FormDef.select():
if formdef.disabled and not formdef.disabled_redirection:
continue
+ if formdef.keywords and 'noindex' in formdef.keywords:
+ continue
url = formdef.get_url() if not formdef.disabled else formdef.disabled_redirection
index_id = 'wcs:formdef:%s' % formdef.id
es.index(index='liferay-20116',