Toolset Implementation Question
- sean-tintworldParticipant4 years, 1 month ago #21491
I am currently in the process of completing various enhancements to a Sage 9 / WordPress-WooCommerce / Toolset website. I use Toolset to manage a custom post type which has many-to-many relationships between products and the custom post type. We will have various filters/facets for different types of archive pages: product category, the custom post type/relationship, global prod attributes (as archives,) etc.
Toolset’s conditionals are a bit odd in their “custom search builder” so I have started looking at building custom code to switch the WP_Query based on whether there is a relationship match. if(relationship_found w/ product cat found): show query with relationship/archive condition else: show archive condition with a specific meta comboination.
My question is whether WP_Solr uses it’s own API/Syntax for building it’s filters or it works almost like a drop-in with Toolset’s system already. If both options are available, that’s fine but maybe you could suggest which option is best for ease of use on the dev side. Want to avoid writing a bunch of work arounds. If you have to write the calls using Solr’s functions/filters, that’s fine I think I would likely look to demo the software sooner and write the rest of my logic via WP Solr vs. waiting to “drop in” Solr later.
Thanks!
sean-tintworldParticipant4 years, 1 month ago #21493@keymaster – really? Is there any workaround to supporting post type relationships? I want to utilize WP Solr for a simple rollout of a Solr/ElasticSearch index to help speed up processing (we have a lot of WooCommerce attributes.) Our catalog is primarily automotive, so I leveraged the post relationships to essentially map a many >=< many relationship of products to year,make,model fitment.
My current implementation is hooking into the pre_get_posts filter to modify the initial WP Query before it gets to Toolset’s “query.” So prior to loading a product category or other taxonomy archive, if the user is looking for products for a specific vehicle – it returns a subset of the “raw” query (relationship matches inside the selected archive) before it loads/pulls the facets/filters.
Would there be anyway to create Solr indexes using your system to help with a similar logic flow? Or are you suggesting I would need a custom solution? Is there any modifications or extensions to your software that would help me achieve the goal?
As a note, not opposed to alternative suggestions if you have a different approach. This just seemed like the most seamless and also allow us to create vehicle pages where users can sort through all products for their specific vehicle.
Thanks.
You must be logged in to reply to this topic.