Selecting Multiple Facets Issue with cross-domain
- duckParticipant2 years, 6 months ago #29580
That would have been great info to have when I explained I was using categories in my second post on this thread! https://www.wpsolr.com/forums/topic/selecting-multiple-facets-issue/#post-29521
You mentioned using a custom taxonomy for displaying subsites as facets. Will I be able to select multiple facets from a custom taxonomy using OR to combine facet selections or do I need to use tags in order to select multiple facets from different subsites? Just trying to sort out the next steps I need to take before I end up down another dead end road.
duckParticipant2 years, 5 months ago #29635I now have a custom taxonomy setup on the root site and 1 subsite and have the custom taxonomy showing on the facets, however, I am still running into a similar issue. I have 3 different taxonomy terms on the root site and 1 taxonomy term on the subsite. When selecting any of the 3 facets on the root site the OR works as expected and the facets stay visible for multiple selections, however, on the subsite facet it disappears when I select any of the other 3 or vice versa. When I select the single facet from the subsite the other facets disappear or if I select one of the 3 from the root site the subsite facet taxonomy term disappears. Is there a setting I am missing on the root or subsite in order to make the OR function across subsites?
duckParticipant2 years, 5 months ago #29641It is a taxonomy created through CPT UI attached to all posts & pages, these are the settings:
name: search_property
label: Search Properties
singular_label: Search Property
description: “”
public: true
publicly_queryable: true
hierarchical: true
show_ui: true
show_in_menu: true
show_in_nav_menus: true
query_var: true
query_var_slug: “”
rewrite: true
rewrite_slug: “”
rewrite_withfront: true
rewrite_hierarchical: true
show_admin_column: true
show_in_rest: true
show_tagcloud: false
sort: false
show_in_quick_edit: true
rest_base: “”
rest_controller_class: “”
meta_box_cb: “”
default_term: “”I have the same taxonomy setup on the root & 2 subsites and the taxonomy shows up for each in the facets. The root site has 3 terms, each subsite 1 single term, labeled as the subsite.
duckParticipant2 years, 5 months ago #29643Sorry, forgot to mention I tried to use hierarchy because it had the same behavior with or without. Here are the new settings that are set on each taxonomy in both subsites and the root site taxonomy, saved, re-indexed, still the same behavior:
name: search_property
label: Search Properties
singular_label: Search Property
description: “”
public: true
publicly_queryable: true
hierarchical: false
show_ui: true
show_in_menu: true
show_in_nav_menus: true
query_var: true
query_var_slug: “”
rewrite: true
rewrite_slug: “”
rewrite_withfront: true
rewrite_hierarchical: false
show_admin_column: false
show_in_rest: true
show_tagcloud: false
sort: false
show_in_quick_edit: true
rest_base: “”
rest_controller_class: “”
meta_box_cb: “”
default_term: “”duckParticipant2 years, 5 months ago #29644Subsite: Financial Aid (45)
Root site: General Information (3)
Root site: Resources (2)
Subsite: Ross IT (123)
Root site: Tools (1)Any time I select one of the flat level root site taxonomy terms, those 3 stay intact with OR and the Subsite facets disappear. Any time I select one of the subsite facets, all others disappear.
wpsolrKeymaster2 years, 5 months ago #29648– Let’s call your 5 tag terms: R1, R2, R3, S1, S2 (“R” for root, “S” for subsite)
– On site “R”: you are testing the search configured as a network search: it queries all post types of “R” and “S” from the shared index.
– On site “R”: the facet tag is configured with a ‘OR’
– On site “R”: the search displays all 5 facets, which is fine.
– On site “R”: the ‘OR’ option works for terms R1, R2, R3
– On site “R”: the ‘OR’ option does not work for terms S1, S2My questions:
– On site “R”: did you activate the “Do not use other items selections to calculate the items count” option on the facet tag? (If not, please try it)
– On site “S”: does the ‘OR’ option work for terms S1, S2 ?duckParticipant2 years, 5 months ago #29649The “Do not use other items selections to calculate the items count” option on the facet tag is what worked. I set that on all 3 subsites and now the OR functions as expected across the cross-domain search. I did not test your second question since the first question seems to have solved the issue.
Moving forward, in order for cross domain search facets to function properly:
– No Hierarchy taxonomy is allowed
– Select Do not use other items selections to calculate the items countThis can be marked solved! Thank you for helping me work through the setup. Some additional notes/documentation would be helpful for others that are attempting to setup multiple subsite facets.
wpsolrKeymaster2 years, 5 months ago #29653Indeed. In fact your 2 steps solution is not specific to multi-sites.
For single sites and multi-sites:
– ‘OR’ does not work on hierarchical taxonomies (categories)
– The exclusion option (“Do not use other items selections to calculate the items count”) enables to see other facet values when a facet value is selected
You must be logged in to reply to this topic.