Range with Checkboxes Greater Than

  • cbarwin
    Participant
    2 years, 3 months ago #28951

    I’m trying to include a range with checkboxes facet that represents everything greater than 0. If I have a facet with the following data, it’s creating a 403 error due to the * in the URL.

    {“id”:”chicago_inventory_str”,”type”:”facet_type_range”,”level”:0,”item_value”:”1-*”,”range_start”:”1″,”range_end”:”*”}

    Please advise.

    wpsolr
    Keymaster
    2 years, 3 months ago #28952

    Replace ‘*’ with a very large number like 9999999999999 ?

    cbarwin
    Participant
    2 years, 3 months ago #28953

    It works if I manually change the URL. But if I change the range start to 1 and the range end and range gap to a really large number, it just doesn’t show the filter option. It only shows *-1

    wpsolr
    Keymaster
    2 years, 3 months ago #28954

    Yes, the range is a “regular” range: it accepts one gap interval only.
    What you would need is an “irregular” gap, where you define different gaps. But the plugin does not provide one.

    cbarwin
    Participant
    2 years, 3 months ago #28955

    Why is it displaying the starting and ending ranges if they don’t work? Even if I specify a gap of 10, it’s not working on either end.

    wpsolr
    Keymaster
    2 years, 3 months ago #28956

    Sorry, I did no understand your last question.

    wpsolr
    Keymaster
    2 years, 3 months ago #28958

    If you’re working with an Algolia index, be aware that the regular range facet will not work.
    To my knowledge, there is no Algolia equivalent to multiple Elasticsearch range aggregation like https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-range-aggregation.html

    The slider range is working though (one range only).

    cbarwin
    Participant
    2 years, 3 months ago #28962

    I’m working with Elasticsearch. I was able to implement your suggestion to add a really large number for the range end value. The range with the * is still showing up as an option, and is still not working. I can hide it with CSS. Not a great fix; but it works.

    One last question — is it possible to assign “OR” logic across different facets?

    wpsolr
    Keymaster
    2 years, 3 months ago #28963

    One last question — is it possible to assign “OR” logic across different facets?

    It is not possible.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.