Elasticsearch documents
I'm having a hard time trying to fit hierachical documents into elasticsearch. Normally, one would denormalize this and have a flat structure, but that doesn't work.
The hierarchy:
dossiers -> contains 1 or more documents -> contains one or more pages.
I think this could be resolved with nested documents, and at first glance this seems to be the case (although it becomes a bit more difficult to update documents and pages, and aggregations as they all need to have nested paths and such)
Second, I still need to check if actual searching works correctly. I can search in dossier fields (title, summary), on document context (content of the complete document), and on page level (content of a single page).
The idea is to get a google-esque result page where matches are returned, in either the dossier, document, or on a specific page.
To make things a bit more difficult: documents CAN exists in multiple dossiers. I'm currently solving this by storing the same document multiple times, but I think i will run into issues as soon as I want to edit things.
About jaytaph
Codemuser extraordinaire
Joined: | March 24, 2023 |
Following: | 2 |
Followers: | 2 |
Posts: | 50 |
Comments: | 3 |
Upvotes: | 4 |
Previous musings
- (1) November 2024
- (1) October 2024
- (1) September 2024
- (1) July 2024
- (2) February 2024
- (3) January 2024
- (3) December 2023
- (4) November 2023
- (5) October 2023
- (10) September 2023
- (8) August 2023
- (1) June 2023
- (1) May 2023
- (4) April 2023
- (5) March 2023