开发者 | |
---|---|
更新时间 | 2020年11月17日 11:30 |
捐献地址: | 去捐款 |
PHP版本: | 7.2 及以上 |
WordPress版本: | 5.5.3 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
locale
attribute into the Index created by WP Search wit Algolia depends on the Bogo settings.
Probably you have been created the indices before activate the plugin. You need to delete the indices and re-index it. Or, you can manually add the facet in the Algolia dashboard. https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/
You can search by the following query.
index.search("", { "getRankingInfo": true, "analytics": false, "enableABTest": false, "hitsPerPage": 10, "attributesToRetrieve": "*", "attributesToSnippet": "*:20", "snippetEllipsisText": "…", "responseFields": "*", "maxValuesPerFacet": 100, "page": 0, "facets": [ "*", "locale", ], "facetFilters": [ [ "locale:en_US" ] ] });
Bogo will put the _locale
attributes into the post_meta, and the plugin uses it.
So the plugin still put the locale attributes if exists.
But, if the post has no _locale
post_meta attribute, the plugin does not put the locale attributes.