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

Search results tag with collection parameter doesn't work #2206

Closed
peimann opened this Issue Oct 19, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@peimann

peimann commented Oct 19, 2018

Describe the bug
Search with collection parameter doesn't work,

To Reproduce
Do a search (search for summer) in the default installation of {s} with Redwood theme and see results then add a collection="blog" parameter to Redwood search results template and do the same search. It must return the same result! But no!

Environment details (please complete the following information):

  • Statamic Version 2.10.7
  • Fresh Install:
  • OS: macOS Mojave
  • Browser: chrome
  • Web Server: nginx
  • PHP Version: 7.1
@peimann

This comment has been minimized.

peimann commented Oct 19, 2018

Also when I change the driver to Algolia and add collection paramater, it returns back this error in search:
screen shot 2018-10-19 at 9 48 42 pm

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Oct 31, 2018

When you add collection="something", it changes the index it looks in. You need to make sure that index exists. See https://docs.statamic.com/search#collection-indexes

Since you are searching in a different index, which doesn't exist, that's why you are getting no results.

The error you see in your next comment is fixed for next release.

@peimann

This comment has been minimized.

peimann commented Oct 31, 2018

Thank you, Jason, I added searchable properties to the folder but didn't see the command to run...
Does it need to run this command to index new entries, every time after adding an entry?

@jasonvarga jasonvarga closed this Nov 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment