Hi - I’ve gone through the initial Algolia documentation, specific to the Wordpress integration. It gets me 80% of the way, but not sure if it’s the best solution.
Here’s what I’m trying to do:
- I have a few hundred records, that are comprised of 3 distinct post types (location, provider, service).
- In my my workflowi need 3 distinct search instances (or pages), each searching a specific content type.
- For example one page would have the search be for locations, and use geo data etc, whereas the other two search instances would be just keyword matching
Here’s what I noticed so far - tell me if I’m wrong.
- Algolia indexes everything that’s pushed up from the WP DB, into an index called “searchable_posts”.
- At runtime, instantsearch.js returns results based on whatever logic is in place.
- Is it possible to modify instantsearch.js, per instance so it only returns data sets of a certain key. In my Algolia index there’s a key called “post_type_label” with values “location”, “provider” etc…
- If no, is there a recommended solution or resources or library (PHP), to a) push up data to the Algolia index b) Use instantsearch.js with wordpress type data schemas
Ideally would like to use the Algolia wordpress plugin because it handles all the indexing already, but open to the best solution.
Thanks for any advice for a new-comer.