Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sites option is ignored #28

Closed
byron-roots opened this issue Nov 20, 2023 · 3 comments · Fixed by #29
Closed

Sites option is ignored #28

byron-roots opened this issue Nov 20, 2023 · 3 comments · Fixed by #29
Labels
bug Something isn't working

Comments

@byron-roots
Copy link

Description

On a multi site when setting the sites config option it still indexes all entries from all sites not those specified

'products' => [
            'driver'       => 'meilisearch',
            'searchables'  => 'collection:products',
            'locale'        => ['default'],
            'settings' => [
                'filterableAttributes' => ['
                    //...
                ],
                'sortableAttributes' => [
                    //...
                ],
            ],
            'fields'       => [
                //...
            ],
        ],

Steps to reproduce

  1. Create a multi site install
  2. Create a collection with multiple sites
  3. Index collection

Environment

Statamic
Addons: 15
Antlers: runtime
Stache Watcher: Disabled
Static Caching: Disabled
Version: 4.30.0 PRO

Statamic Addons
appswithlove/statamic-one-click-content-translation: 4.18.2
aryehraber/statamic-logbook: 3.1.0
doublethreedigital/runway: 5.4.0
doublethreedigital/simple-commerce: 5.6.0
jacksleight/statamic-bard-texstyle: 3.1.3
jonassiewertsen/statamic-livewire: 2.12.0
nineteensquared/instagram: 1.2.0
rootstudio/cache-primer: 0.9
rootstudio/monitor: 0.2
rootstudio/mux-video: 0.5
rootstudio/turnstile: 0.2
statamic-rad-pack/meilisearch: 3.0.3
statamic/collaboration: 0.7.3
statamic/eloquent-driver: 2.8.0
stillat/relationships: 2.1.1

Statamic Eloquent Driver
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: file
Collections: file
Entries: eloquent
Forms: eloquent
Global Sets: eloquent
Global Variables: file
Navigation Trees: file
Navigations: eloquent
Revisions: eloquent
Taxonomies: file
Terms: eloquent

meilisearch Version

3.0.3

@byron-roots byron-roots added the bug Something isn't working label Nov 20, 2023
@ryanmitchell
Copy link
Contributor

I'm not aware of any documentation that says adding locale filters the search index so at the moment I would say this is expected behaviour. Can you provide a link to the page that made you think this was possible?

I would have though you needed to filter the results: https://statamic.dev/search#filtering-searchables

@byron-roots
Copy link
Author

Apologies the config should have 'sites' not 'locale' as per the docs here https://statamic.dev/search#localization

@ryanmitchell
Copy link
Contributor

Thanks for clarifying. It looks like that was added since this add-on was initially created, so I've gone ahead and added support here: #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants