Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate results if endpoints respond with both the HITS and KWIC DataView #73

Open
Querela opened this issue Jun 2, 2023 · 0 comments
Assignees

Comments

@Querela
Copy link
Contributor

Querela commented Jun 2, 2023

The upgrade of the fcs-sru-cqi-bridge changed the respond Data Views from the legacy KWIC format to the newer HITS format. To remain compatible with possible other SRU/FCS end users, the XMLStreamWriterHelper.writeResourceWithHitsDataViewLegacy method from the eu.clarin.sru.server.fcs package is used that effectively serializes hits in both Data View formats. It is marked as @Deprecated but was used to remain compatible.
Since the FCS-libraries and the Aggregator also want to remain compatible with older legacy endpoints they parses both formats and therefore shows each result twice. The DataViewParserKWIC automatically upgrades the legacy KWIC DataView into a HITS DataView so results can not be distinguished at the end of the process.

  • Solution 1: dopping legacy support, ref
  • Solution 2: changing DataViewParserKWIC (docs) to return the Legacy KWIC DataView.
    • Problem: All clients that rely on KWIC being auto-upgraded to HITS will suddenly miss results.
    • Solution: subclass LegacyDataViewKWIC from DataViewHits to keep the information but handle the change without noticable difference. Clients can optionally filter out legacy Data Views. Another way would be a new property to inform about the original media-type or whether it was upgraded.
      → For the aggregator this would be here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant