Selecting Multiple Facets Issue with cross-domain

  • duck
    Participant
    2 years, 6 months ago #29561

    Sorry, incorrect, it is Solr 6.6.5

    wpsolr
    Keymaster
    2 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.”

    duck
    Participant
    2 years, 6 months ago #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”: []
    }

    wpsolr
    Keymaster
    2 years, 6 months ago #29564

    Here 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.
    duck
    Participant
    2 years, 6 months ago #29566

    Would the option under tab 0 “Click to generate a free index to test WPSOLR” allow me to use the cross-domain feature to run another test on a newer version of Solr to see if the multiple facets will work?

    wpsolr
    Keymaster
    2 years, 6 months ago #29567

    What is strange is that you get a query with no results, but with facets !

    wpsolr
    Keymaster
    2 years, 6 months ago #29568

    “Click to generate a free index to test WPSOLR” used to create a free test Elasticsearch index, but is no more operational I think.

    duck
    Participant
    2 years, 6 months ago #29569

    I signed up again with a new free trial through Open Solr, had already signed up ages ago so had to do a new account. I will give it a try with Solr v8 and see if I run into the same issues.

    duck
    Participant
    2 years, 6 months ago #29570

    Same 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”: []
    }
    }

    wpsolr
    Keymaster
    2 years, 6 months ago #29571

    One door closed…
    You should now try to recreate the query in Solr admin to understand which part is creating the issue.

    duck
    Participant
    2 years, 6 months ago #29573

    I 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.

    https://staging-testmultisite-vuj.kinsta.cloud/search/?wpsolr_sort=sort_by_relevancy_desc&wpsolr_fq%5B0%5D=categories%3ASecond%20Site&wpsolr_fq%5B1%5D=categories%3ASite%20One

    duck
    Participant
    2 years, 6 months ago #29574

    https://staging-testmultisite-vuj.kinsta.cloud/search/

    Second Site & Site One are a category each on their respective subsite.

    duck
    Participant
    2 years, 6 months ago #29575

    I posted login credentials to this new multisite instance on staging on the private trello board. Maybe you can take a look at my settings and see if I am doing something wrong to break this functionality.

    wpsolr
    Keymaster
    2 years, 6 months ago #29576

    I 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.

    duck
    Participant
    2 years, 6 months ago #29577

    OR is selected on both Type & Categories.

Viewing 15 posts - 16 through 30 (of 43 total)

You must be logged in to reply to this topic.