• Resolved tgaff2x

    (@tgaff2x)


    Currently, the total/count for the top level hierarchy item is being calculated in classes/ui/WPSOLR_Data_facets.php as a sum of the count of sub-items.

    Example data set would be a single document that was a member of

    Top-Item A [true]
    Sub-Item 1 [true]
    Sub-Item 2 [true]
    Sub-Item 3 [false]

    The total for Top-Item A should be 1, and currently shows as 2.

    Often, a given document/item may be in multiple sub-items below a single top level item (sub-item categories are not mutually exclusive within the top level item). As such, when this is sum’d a given document/item can be counted multiple times giving an erroneous total.

    There seem to be 2 possible solutions:
    1. Somehow when calculating the count, de-duplicate any items before calculating the count for the top level item. This is probably too much processing, as it doesn’t look like the document ids are readily available per facet.

    2. Alternatively, if the user entering the documents chooses the top level hierarchy item and multiple sub-items, then solr will calculate the count for the top level item and we should be able to use that. Perhaps if there is a count for the top level item, just use it rather than calculate the sum.

    Thanks!

    https://www.ads-software.com/plugins/wpsolr-search-engine/

  • The topic ‘Top Level Hierarchy Totals’ is closed to new replies.