Skip to content

Commit

Permalink
fix(data): remove faq-convention-collective from index (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelB authored Dec 17, 2018
1 parent bb2c7e6 commit bc1d6d8
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions packages/code-du-travail-data/search/indexing/cdtn_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,25 +166,6 @@ def populate_cdtn_documents():
'all_text': f"{val['question']} {faq_text} {theme} {branche}",
})

with open(os.path.join(settings.BASE_DIR, 'dataset/faq-conventions-collectives.json')) as json_data:
data = json.load(json_data)
logger.info("Load %s documents from faq-conventions-collectives.json", len(data))
for val in data:
faq_text = strip_html(val['reponse'])
tags = parse_hash_tags(val.get("tags"))
theme = val.get('tags', {}).get('theme', '')
branche = val.get('tags', {}).get('branche', '')
CDTN_DOCUMENTS.append({
'source': 'faq',
'slug': slugify(val['question'], to_lower=True),
'text': faq_text,
'html': val["reponse"],
'title': val['question'],
'tags': tags,
'date': val['date_redaction'],
'all_text': f"{val['question']} {faq_text} {theme} {branche}",
})

with open(os.path.join(settings.BASE_DIR, 'dataset/export-courriers.json')) as json_data:
data = json.load(json_data)
logger.info("Load %s documents from export-courriers.json", len(data))
Expand Down

0 comments on commit bc1d6d8

Please sign in to comment.