Forum Replies Created
- duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29563
Unfortunately 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”: []
}duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29561Sorry, incorrect, it is Solr 6.6.5
duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29560wptb-tables is a tables plugin, should be a post type and on each subsite, I could remove it from indexing if that is the issue.
Solr version is 7
duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29559Here is the query through the debug.log file:
[15-Apr-2022 15:58:56 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: “/opt/data/solr/rossweb”
Nb results shown: 0
Total nb results: 0
Speed: 927 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”: {
“date”: “desc”
},
“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:(\”wptb-tables\” OR \”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”,
5,
“Financial Aid”,
45,
“Hospitality”,
16,
“Ross IT”,
123
]
},
“facet_ranges”: [],
“facet_intervals”: [],
“facet_heatmaps”: []
}
}duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29556Not sure if this helps, but here is the query upon selecting the first facet:
{ “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”: { “date”: “desc” }, “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:(\”wptb-tables\” OR \”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”: [] }, “front-end exclusion 1”: { “query”: “(*:* -is_excluded_s:[* TO *]) OR is_excluded_s:(n)”, “tags”: [] } } }
duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29555Is this where I should be looking for error log results?
duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29553The page stops at the error and does not render the rest of the page, no Query Monitor available. Even the Query Monitor drop down at the top is broken, no drop down options. I can show you the query before that, but I am guessing that won’t help? I can provide the URL query string if that helps?
?wpsolr_q=student&wpsolr_sort=sort_by_relevancy_desc&wpsolr_fq%5B0%5D=categories%3AHospitality&wpsolr_fq%5B1%5D=categories%3ARoss%20IT
duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29551When enabling the Query Monitor extension it produces this error message when attempting to select multiple facets:
Solr HTTP error: Bad Request (400) {“error”:{“metadata”:[“error-class”,”org.apache.solr.common.SolrException”,”root-error-class”,”org.apache.solr.common.SolrException”],”msg”:”Specify at least one field, function or query to group by.”,”code”:400}}
duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29530I tried both, still produced same result.
duckParticipant2 years ago in reply to: Selecting Multiple Facets Issue with cross-domain #29521To add more to this issue. I am able to select multiple facets from the same subsite, just not when I choose two facets from two different subsites in our multisite cross-domain search page. At this moment I am just using facets provided by categories for each page from each subsite. No custom taxonomies or anything else unusual, just a single main category and one sub category from the same site is what works.
duckParticipant2 years ago in reply to: Modifying Search Results Page #29517Thank you thank you, the {{ dump(result) }} is exactly what I was looking for so I could list out all of the objects that are available to use!
duckParticipant2 years ago in reply to: Modifying Search Results Page #29509Okay excellent, that helps point me in the right direction and glad I don’t need to become a twig expert, just yet! 🙂 I will just need to make sure our content editors do not have access to remove the custom taxonomy from the page, which should be feasible.
One last question, is there not an easy way to add the modified date to the search results in twig like the publish date: {{ result.meta_information.date }}
If the answer is no, there is not already an object I can call, then I will table this for now until I have more time to become a twig expert in order to pull it from the post. I was just hoping that since we can sort by modified that the object already exists. Thanks for your help on this!
duckParticipant2 years ago in reply to: Modifying Search Results Page #29495Trying to be more specific. Is it possible to add each subsite as a facet through the twig template, instead of relying on the subsite categories for the facets?
Since this is in a multisite network I want to remove the ability for our site admins to add endless categories to their sites causing the cross domain search results facets to be overloaded with categories that they add to their sites. I want to add a top level faceted search for just the subsites, and not show every single sub category in the facets. Looking for some guidance on how to achieve this and we may need your assistance to do so.
duckParticipant2 years ago in reply to: Pagination Not Working #29493I was able to fix the incorrect pagination identifier by changing this line:
<a class=”paginate {{ (page == pages.current_page) ? ‘active’ : ” }}”
to:
<a class=”paginate {{ (page == pages.current_page -1) ? ‘active’ : ” }}”Is there a way to turn off ajax pagination so that the page will reload at the top on the next page? So that the user does not need to scroll back up each time.
duckParticipant2 years ago in reply to: Pagination Not Working #29492Pagination is currently showing the next page highlighted in the pagination instead of the current page. When on page 1 it highlights and turns the text red for page 2. Page 2 shows 3 in red and so on. I tried changing the twig template and either introduced a negative number or a 0 but the identification was still never on the correct page.
Also, the page does not go back to the top of the page when switching to the next pagination page. Is this normal behavior or is it supposed to go back to the top of the page?