Simon-Dirks / view-a-LOD

A flexible and configurable LOD viewer using SPARQL and Elastic endpoints.
GNU General Public License v3.0
0 stars 2 forks source link

Fix filter count not matching search count #135

Closed Simon-Dirks closed 2 months ago

Simon-Dirks commented 2 months ago

Issue seems to be because of nodes having multiple types. In the example below, "Gemeente Heuvelrug" counts for two in the aggregation, but is a single hit in the search.

Image

Image

Simon-Dirks commented 2 months ago

Fix: Retrieve top 100 hit IDs that match the filter, and base the (clustered) filter option count on the total number of UNIQUE node IDs. Note that elastic top_hits aggregation has a limit of 100 by default, if we want to show higher max counts for the filters, we need to update [index.max_inner_result_window] on elastic to 10.000, and set the Config.ts elasticTopHitsMax variable accordingly.

Unsure if we are allowed to edit this elastic index variable through Triply, think we need to do a PUT request for this.