Skip to content

[Search] FacedFilters documentation #69

@Guikingone

Description

@Guikingone

Hi everyone 👋

While working on a separate Symfony bundle that wrap this SDK, I'm facing a strange behaviour/situation, I'm trying to build a Search class which allows to build complex queries and ease the search process.

The issue is when I'm trying to build facetFilters, I've looked at the internals of search and it seems that the request wait for a specific array:

// Index::parseOptions()

    private function parseOptions(array $options)
    {
        foreach ($options as $key => $value) {
            if ('facetsDistribution' === $key || 'facetFilters' === $key) {
                $options[$key] = json_encode($value);
            } elseif (is_array($value)) {
                $options[$key] = implode(',', $value);
            }
        }

        return $options;
    }

The issue here is that the documentation of this SDK does not explain this type of search and/or the type of body required to be encoded, is there any internal documentation about it? 🤔

Thanks for the feedback and have a great day 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions