aleph: BUG: Languages and countries filter not showing results
Describe the bug When searching an investigation I see that some files have an associated Country and Language, nevertheless when I click on the Language or Country filters in the left bar it doesn’t show any results.
To Reproduce Steps to reproduce the behavior:
- Go to an investigation with documents that have a detected language and country
- Click on
Countries
in the left side - No Countries are shown
Expected behavior The detected languages should be listed in order to filter out documents.
Additional context I’m running 3.12.6 and I was not able to reproduce the error in OCCRP aleph’s open instance
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 29 (15 by maintainers)
Awesome, thanks for that @tillprochaska
@lyz-code just FYI I’m going to have a look at this right after we release the current pending version of
ingest-file
, there’s one more bug I need to look at.Hi @stchris, I have been able to reproduce the issue with a plaintext version of the 1st Book of the King James Bible (available here from Project Gutenberg). Maybe the test documents we tried before weren’t long enough for language detection to work.
Steps to reproduce:
Note: Contrary to what I said earlier, the inverted type groups added to the serialized entity data by
to_full_dict
aren’t relevant when we display search results in the UI. We generate the type groups on the fly in the UI based on the raw properties (relevant source code). That’s why languages and countries are displayed perfectly fine in search results, even though the filter options aren’t populated correctly.I’ve copied the attribute
language
andcountry
on the files with the next script and the UI caught bothlanguages
and thecountries
facets: