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
API here is to be interpreted as an interface contract between the search engine and the rest of the system.
An API must be defined that can be applied to other Components (and other content, such as users who have decided to make their profile information public). The fields that can be indexed in order to perform the search should be indicated. This API will have to take into account whether a Component has been published or not.
Each Searchable will index one row for each Organization's supported locale. When Searchables are not translatable, they will still index its contents for each locale (same content in each locale).
Multi-search: automatic multi model search, but much less powerful. Compacts all search fields from models into one single column. No weights can be applied to columns.
Search scope: powerful search parameters. To be implemented in each AR Model.
Strategies
There are many. Just throwing some ideas here in no particular order:
Go simple. Use multi-search and let Postgres' ranking do the job.
Sql view grouping all models with a union. This sql view will be queried with search scopes.
Use multi-search callbacks for custom indexing, but use search scopes for searching. I.e.:
modify default pg_search_documents table to have 4 content columns
Do not use multi-search for searching. Instead create a SearchDocument model with a search scope.
Build our own multi search table, as multi-search does, and then use a model on this table with a search scope. (this is the same as the sql view strategy)
API here is to be interpreted as an interface contract between the search engine and the rest of the system.
An API must be defined that can be applied to other Components (and other content, such as users who have decided to make their profile information public). The fields that can be indexed in order to perform the search should be indicated. This API will have to take into account whether a Component has been published or not.
Things to be defined:
Components (from #2593) and its weights:
How i18n will be managed?
Each Searchable will index one row for each Organization's supported locale. When Searchables are not translatable, they will still index its contents for each locale (same content in each locale).
pg_search strategy
Pg_search comes with 2 built in search strategies: multi-search vs search scope.
Strategies
There are many. Just throwing some ideas here in no particular order:
pg_search_documentstable to have 4 content columnsMVP
home pageSearchablemodels and its fieldsSearchablemoduleSearchabletoResourceable?.card-result.card-resultSearchablemodels.