Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current subsite is not actually applied #3

Closed
phptek opened this issue Jan 20, 2020 · 3 comments
Closed

Current subsite is not actually applied #3

phptek opened this issue Jan 20, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@phptek
Copy link

phptek commented Jan 20, 2020

firesphere/silverstripe-solr-search + firesphere/silverstripe-subsite-solr dev-master, Silverstripe 4.4.3 on PHP7.2

Using a single subsite, search results are not filtered correctly when performing a search from a given subsite.

Note, bug was filed in the context of a DEV env, using the ?SubsiteID=1 URL hack.

@Firesphere Firesphere added the bug Something isn't working label Jan 21, 2020
@phptek
Copy link
Author

phptek commented Jan 21, 2020

Note: Ref's conversation in Slack here: https://silverstripe-users.slack.com/archives/C9KB3U0P8/p1579562395002000

Note also the following repro steps:

Steps to reproduce:

  • Setup YML config as per Slack convo
  • Setup manual exclusions (if required) as per PHP snippet in Slack convo
  • Run the configure task
  • Run the index task
  • Query Solr directly - observe no relevant results are returned for fl=SiteTree_SubsiteID

http://localhost:8983/solr/MyIndex/select?fl=SiteTree_SubsiteID&q=*%3A*

{
  "responseHeader":{
    "status":0,
    "QTime":0,
    "params":{
      "q":"*:*",
      "fl":"SiteTree_SubsiteID"}},
  "response":{"numFound":5944,"start":0,"docs":[
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {}]
  }}

@Firesphere
Copy link
Owner

Do you have a non-Subsite object in your index? It seems like the results are correct, but because there is no Subsite associated, the result is not what is expected....

Just a hunch :) Not sure if it's related, but it seems to matter for me

@Firesphere
Copy link
Owner

I think I got it fixed:
image
Please test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants