You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search Plugin documentation needs additional examples & additional information on priority and how to manage it. Missing documentation of how the plugin is integrated with collections.
Additional Details
There is currently no documentation on how this plugin interacts with a frontend or how to write queries for the search endpoint.
There is also no documentation on priority – only a brief mention of defaultPriorities. The documentation states This plugin automatically adds a priority field to the search collection that can be used as the ?sort= parameter in your queries. however there's no explanation of how this parameter should be defined or what value the priority field should have. Does it prfioritize a whole collection or certain fields? More information needed.
Example repo link would be especially beneficial.
The text was updated successfully, but these errors were encountered:
In terms of example usage have a look at how the website template uses the search plugin. I've linked you to the directory where the actual pages perform the query via the local api to get relevant results. All plugin-search does is add a collection, along with some helpful hooks, to your existing config. By default it has a slug of 'search' but this can be changed. You can interact with this collection using existing API's like you would with your own collections.
As for priorities, I agree that it could be better explained. Hopefully I can clear up any confusion for you here. The plugin automatically adds a field named priority of type number. This field can be used to sort your documents by specifying a value to priority and then sorting against it as you could with any other field. What the defaultPriorities property does is simply give you an option to specify how it should prioritize documents at the collection or document-level. What priorities they should get is completely up to you, and as I mentioned above, can be sorted to get more relevant data for your use-case.
The defaultPriorities property accepts a number to be used as a collection-level static priority, or can accept a callback function which passes the relevant doc to you so that you can better decide how to assign a priority. Say, for example, if your docs had a Checkbox field that could represent a document with high priority over ordinary documents from the same collection, etc.
Documentation Issue
Search Plugin documentation needs additional examples & additional information on
priority
and how to manage it. Missing documentation of how the plugin is integrated with collections.Additional Details
There is currently no documentation on how this plugin interacts with a frontend or how to write queries for the search endpoint.
There is also no documentation on
priority
– only a brief mention ofdefaultPriorities
. The documentation statesThis plugin automatically adds a priority field to the search collection that can be used as the ?sort= parameter in your queries.
however there's no explanation of how this parameter should be defined or what value thepriority
field should have. Does it prfioritize a whole collection or certain fields? More information needed.Example repo link would be especially beneficial.
The text was updated successfully, but these errors were encountered: