Index ACF Fields as Filter

  • 8 months, 3 weeks ago #35288

    Is it possible to index acf fields as filters along with taxonomy filters , currently taxonomies have the filters.. Can it be configure with acf field values also.. either single acf value or comma seperated ?

    wpsolr
    Keymaster
    8 months, 3 weeks ago #35291

    Yes, all types of ACF fields can be used as facets, including select and repeaters.

    ACF Documentation.

    8 months, 2 weeks ago #35383

    Created the repeater field like this :
    Image image.png of

    Getting Frontend like this :
    Image image.png of

    Names arent showing up as category 1 and category 2

    Backend settings: ACF Field and Repeated Field. Got only these 2 fields with the name I created for this filter
    https://i.ibb.co/9WL5VcN/image.png

    wpsolr
    Keymaster
    8 months, 2 weeks ago #35384
    8 months, 2 weeks ago #35386

    I followed the steps to activate acf addon, and created repeater field with checkboxes, and using the filter type also as checkboxes.

    When I am sending to Index. I am getting the value as 1, instead of actual label name
    Image tagging.png of
    Added screenshot of database too
    Image image.png of

    Can you help me figure out this issue?

    8 months, 2 weeks ago #35387

    ACF Repeater
    Image image.png of

    8 months, 2 weeks ago #35388

    I havent installed acf addon, seems it was causing the issue, also I re created new acf fields, now the data is sending to elastic fine. Now, its sending the label name instead of number 1.

    8 months, 2 weeks ago #35389

    I would need one add_filter, as I would be using text field for ACF with comma separated values, and send them to index as multiple fields same as acf does with repeaters.
    It should create show as the same way if we are using a repeater.
    Image image.png of

    Can we explode using comma and make it same was as a repeater field, any filter would be helpful. we have some limitation of using repeater as it creates multiple rows in db table.

    wpsolr
    Keymaster
    8 months, 2 weeks ago #35390

    Thanks for the details.
    I could replicate the same issue on my local environment. Investigating…

    8 months, 2 weeks ago #35391

    Issue is resolved where I was getting number 1, but I would need a way without using the repeater field, but achieving the same output with acf text field with comma separated values.

    This is how I wanted to send when using comma seperated text fields in acf without repeater, and these should be shown as individual filters as it works with repeater.
    Image image.png of

    wpsolr
    Keymaster
    8 months, 2 weeks ago #35392

    Can we explode using comma and make it same was as a repeater field

    Why not using a checkbox then?

    8 months, 2 weeks ago #35393

    Instead of repeater ? or checkbox field within repeater as sub field ?

    8 months, 2 weeks ago #35394

    Sometimes, I would need around 500-1000 values also, so checkbox would create a long list inside the edit post page…

    wpsolr
    Keymaster
    8 months, 2 weeks ago #35395

    It is something we do not provide. You could use tags instead, or ACF repeaters, or ACF checkboxes.

    8 months, 2 weeks ago #35396

    Okay, I am using the repeater field, but having issues with the filter display, its not getting filtered based on the search results, the filter checkboxes remains same even if the returned search doesn’t have the data.

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.