Selecting Multiple Facets Issue with cross-domain
- wpsolrKeymaster2 years, 6 months ago #29562
I’m not sure this is the issue, but according to our Solr client php library:
“There is no Solr version requirement. But it’s highly recommended that you use at least 7.7. All older versions are EOL.”duckParticipant2 years, 6 months ago #29563Unfortunately until we get this one off the ground we are unable to move to a newer version at this time. We do plan to upgrade once we are done with this Drupal to WordPress migration project. I reran the query in debug after removing wp-tables from all 3 subsites currently being searched and this is the result, still errors out:
[15-Apr-2022 16:16:32 UTC] WPSOLR Log query =>
Url: “/search/?wpsolr_q=student&wpsolr_sort=sort_by_relevancy_desc&wpsolr_fq%5B0%5D=categories%3AFinancial%20Aid&wpsolr_fq%5B1%5D=categories%3AHos>
Index: “/opt/data/solr/rossweb”
Nb results shown: 0
Total nb results: 0
Speed: 316 ms
Query: {
“options”: {
“handler”: “select”,
“resultclass”: “Solarium\\QueryType\\Select\\Result\\Result”,
“documentclass”: “Solarium\\QueryType\\Select\\Result\\Document”,
“query”: “(student)”,
“start”: 0,
“rows”: 25,
“fields”: “*,score”,
“omitheader”: true,
“querydefaultoperator”: “AND”
},
“query”: “(student)”,
“highlighting”: [
{
“name”: “title”,
“simpleprefix”: “<b>”,
“simplepostfix”: “<\/b>”,
“fragsize”: 500
},
{
“name”: “content”,
“simpleprefix”: “<b>”,
“simplepostfix”: “<\/b>”,
“fragsize”: 500
},
{
“name”: “comments”,
“simpleprefix”: “<b>”,
“simplepostfix”: “<\/b>”,
“fragsize”: 500
}
],
“sorts”: [],
“grouping”: {
“fields”: [],
“options”: {
“resultquerygroupclass”: “Solarium\\Component\\Result\\Grouping\\QueryGroup”,
“resultvaluegroupclass”: “Solarium\\Component\\Result\\Grouping\\ValueGroup”
}
},
“fields”: [
“id”,
“PID”,
“type”,
“meta_type_s”,
“title”,
“numcomments”,
“comments”,
“displaydate”,
“displaymodified”,
“*categories_str”,
“author”,
“*post_thumbnail_href_str”,
“*post_href_str”,
“snippet_s”
],
“facets”: {
“categories_str”: {
“type”: “field”,
“excludes”: [
“fct_excl_categories_str”
]
}
},
“filters”: {
“authorized indexed types”: {
“query”: “type:(\”post\” OR \”page\”)”,
“tags”: [
“fct_excl_type”
]
},
“bad_statuses”: {
“query”: “-post_status_s:(\”draft\” OR \”pending\” OR \”trash\” OR \”future\” OR \”private\” OR \”auto-draft\”)”,
“tags”: []
},
“categories_str:\”Financial Aid\””: {
“query”: “categories_str:\”Financial\\ Aid\””,
“tags”: [
“fct_excl_categories_str”
]
},
“categories_str:\”Hospitality\””: {
“query”: “categories_str:\”Hospitality\””,
“tags”: [
“fct_excl_categories_str”
]
},
“front-end exclusion 1”: {
“query”: “(*:* -is_excluded_s:[* TO *]) OR is_excluded_s:(n)”,
“tags”: []
}
}
}
Results: {
“response”: {
“numFound”: 0,
“start”: 0,
“docs”: []
},
“facet_counts”: {
“facet_queries”: [],
“facet_fields”: {
“categories_str”: [
“Department Information”,
2,
“Financial Aid”,
40,
“Hospitality”,
4,
“Ross IT”,
48
]
},
“facet_ranges”: [],
“facet_intervals”: [],
“facet_heatmaps”: []
},
“highlighting”: []
}wpsolrKeymaster2 years, 6 months ago #29564Here are some possible actions for you:
– Remove the custom post type from the WPSOLR settings in 2.2
– Try quickly with a recent Solr version, for instance with an OpenSolr free trial
– Recreate the problem on Solr admin, by rebuilding the query piece by piece: start with an empty query (returning everything), then add the filter on ‘categories_str’, then the facets.
- This reply was modified 2 years, 6 months ago by wpsolr.
duckParticipant2 years, 6 months ago #29570Same problem after switching over to OpenSolr using Solr v8, latest query results:
[15-Apr-2022 16:48:38 UTC] WPSOLR Log query =>
Url: “/search/?wpsolr_sort=sort_by_relevancy_desc&wpsolr_fq%5B0%5D=categories%3AFinancial%20Aid&wpsolr_fq%5B1%5D=categories%3AHospitality”
Index: “rossweb”
Nb results shown: 0
Total nb results: 0
Speed: 1025 ms
Query: {
“options”: {
“handler”: “select”,
“resultclass”: “Solarium\\QueryType\\Select\\Result\\Result”,
“documentclass”: “Solarium\\QueryType\\Select\\Result\\Document”,
“query”: “(*)”,
“start”: 0,
“rows”: 25,
“fields”: “*,score”,
“omitheader”: true,
“querydefaultoperator”: “AND”
},
“query”: “(*)”,
“highlighting”: [],
“sorts”: [],
“grouping”: {
“fields”: [],
“options”: {
“resultquerygroupclass”: “Solarium\\Component\\Result\\Grouping\\QueryGroup”,
“resultvaluegroupclass”: “Solarium\\Component\\Result\\Grouping\\ValueGroup”
}
},
“fields”: [
“id”,
“PID”,
“type”,
“meta_type_s”,
“title”,
“numcomments”,
“comments”,
“displaydate”,
“displaymodified”,
“*categories_str”,
“author”,
“*post_thumbnail_href_str”,
“*post_href_str”,
“snippet_s”
],
“facets”: {
“categories_str”: {
“type”: “field”,
“excludes”: [
“fct_excl_categories_str”
]
}
},
“filters”: {
“authorized indexed types”: {
“query”: “type:(\”post\” OR \”page\”)”,
“tags”: [
“fct_excl_type”
]
},
“bad_statuses”: {
“query”: “-post_status_s:(\”draft\” OR \”pending\” OR \”trash\” OR \”future\” OR \”private\” OR \”auto-draft\”)”,
“tags”: []
},
“categories_str:\”Financial Aid\””: {
“query”: “categories_str:\”Financial\\ Aid\””,
“tags”: [
“fct_excl_categories_str”
]
},
“categories_str:\”Hospitality\””: {
“query”: “categories_str:\”Hospitality\””,
“tags”: [
“fct_excl_categories_str”
]
},
“front-end exclusion 1”: {
“query”: “(*:* -is_excluded_s:[* TO *]) OR is_excluded_s:(n)”,
“tags”: []
}
}
}
Results: {
“response”: {
“numFound”: 0,
“start”: 0,
“numFoundExact”: true,
“docs”: []
},
“facet_counts”: {
“facet_queries”: [],
“facet_fields”: {
“categories_str”: [
“Department Information”,
5,
“Financial Aid”,
45,
“Hospitality”,
16,
“Ross IT”,
123
]
},
“facet_ranges”: [],
“facet_intervals”: [],
“facet_heatmaps”: []
}
}duckParticipant2 years, 6 months ago #29573I created an entirely new multisite instance, installed just WP Solr, FakerPress to generate content & Code Snippets to easily add categories to pages on all subsites, nothing else. Connected it back to the new OpenSolr instance with Solr 8. Everything was working up until the point I added a main category on two of the 4 subsites and assigned all pages to those main categories for 2 subsites. Once I tried to filter on both facets, same problem, no results found.
duckParticipant2 years, 6 months ago #29574https://staging-testmultisite-vuj.kinsta.cloud/search/
Second Site & Site One are a category each on their respective subsite.
wpsolrKeymaster2 years, 6 months ago #29576I understand that you use post “categories” to hold each site, and use it as filter.
The issue appear when you select 2 categories (sites): no results are returned.
Which is normal, because each post type belongs to only one site.Unless you selected the ‘OR’ option on the categories facet.
If you did, we should see it in the Solr query.
You must be logged in to reply to this topic.