-
Notifications
You must be signed in to change notification settings - Fork 268
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 shows no results if more than one entry in mainSections #290
Comments
@onweru Can you take a look when you get a chance? |
I don't know if this can be considered a related question, but I would be interested to understand how to get the passive search function to search multiple sections (ie, "post" and "recipe") without having to set "recipe" as a mainSection. I think once I understand how multiple mainSections are searched, I could probably set a config for |
@timatlee, at the moment, the search function should search the entire site. This may not be ideal. First I'll explore the anomaly described by @robe2. As an improvement, I might introduce the concept of search scope. For granular search |
@onweru I do see the content for the whole site being generated in I should have annotated that image, but the URL path is showing that I'm in Limited screenshot showing that the post in question is in If I change I'm not sure how I can illustrate this, to be honest. The same behaviour exists using the exampleSite and the 'page' content types - the About page is in index.json, but does not surface in the search results, though in that case, the About page in index.json does not have a section value. I understand that the search behaviour for the whole site may not be ideal. Once the initial anomaly is addressed, I thought I would take an attempt at a way to define the search scope within the site's configuration... but at the instant in time, I don't have a good understanding of how the search component works :) Thanks for your response! |
@timatlee, thanks for this feedback. I will ready a fix asap. |
@onweru Thanks! Great fix, and seems like it strikes a good balance of site-wide versus section-wide searching. Great work! |
I have checked all the prerequisites below and I'm yet experiencing a problem
Describe the bug
Search does not find anything if more than one directory specified in mainSections.
I have 3 directories: post, pages, events
If I put any of the below in my params.toml file, then it can search just that section
mainSections = ["post"]
or
mainSections = ["events"]
or
mainSections = ["pages"]
However if I put all of them in like so:
mainSections = ["post", "events", "pages"]
Then search finds nothing.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: