Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Simple search returns zero results

Solved by Roger Parkinson View solution

Started by Roger Parkinson 8 years ago · 1 replies · 509 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 Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 53 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1179 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 47 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 72 2 months ago