Filtering the number of boundary points

Given the following scenario:

<field name="product_id" type="text" indexed="true" stored="true" multivalued="true"/>
<field name="product_type" type="text" indexed="true" stored="true" multivalued="true"/>

I want to get the number of facets for the facet field product_id, filtered by a specific product_type, based on the result set (to get this, I use a filter request, etc.)

Note that I want to filter the graphs like this:

  • A Facet query does not help because it presents a list with the results of specific facet queries. (or filter request)

    2921

  • Facet.prefix makes the kind of filter I want, but I don’t know how to use it in this scenario.

Note that I want to filter out a productID counter that matches a specific category

<lst name="facet_fields">
    <lst name="productID">
        <int name="xHidyhuVZIUVVMfUJM8zd6">209</int>
        <int name="34YFQf0F9kqP29SQgrmqI1">206</int>
        <int name="m3wp9GS9Iweai0ftKLSlG">195</int>
        <int name="aAwN5QFjQLxcrDWFiirjY2">169</int>
        <int name="k405yG1RwRndI5T19dMO8">169</int>
    </lst>
</lst>
+3
source share
1 answer

, , . facet.prefix , .

, , , : select?q=product_type:somecategory&rows=0&facet=true&facet.field=product_id

+5

Source: https://habr.com/ru/post/1708065/


All Articles