Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Simple search returns zero results

Solved by Roger Parkinson View solution

Started by Roger Parkinson 8 years ago · 1 replies · 799 views
8 years ago

New to Grav, coming over from Wordpress.
I have the Antimatter theme and the simplesearch 1.14.1 plugin
I'm getting a search box in the side bar on my blog page (good) but when I search it always returns nothing.
I messed about with the simplesearch.yaml file, changed it from
filters:
category: blog
to
filters:
category: page
Still nothing.
I saw some old posts here with similar problems and they said update to the latest version, but I just installed this so I assume I already have that.
Any ideas?

8 years ago Solution

Okay, I figured it out. The docs said to 'keep the filter section empty' so I deleted it and got zero results. But eventually I tried just leaving 'filters:' in there with nothing under it. Took ages to come back with the first result so I guess it was building an index. Second result was fast, both were correct. So my working simplesearch.yaml now looks like this:

enabled: true
built_in_css: true
built_in_js: true
display_button: true
min_query_length: 3
route: /search
search_content: rendered
template: simplesearch_results
filters:
filter_combinator: and
ignore_accented_characters: false
order:
by: date
dir: desc

Suggested topics

Topic Participants Replies Views Activity
Plugins · by complanar, 6 days ago
6 265 2 days ago
Plugins · by BenLaKnet, 3 days ago
1 95 3 days ago
Plugins · by complanar, 4 weeks ago
2 415 3 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 706 2 months ago
Plugins · by Mathieu Lecouturier, 2 months ago
3 545 2 months ago