getgrav / grav-plugin-simplesearch

Grav SimpleSearch Plugin
https://getgrav.org
MIT License
44 stars 55 forks source link

Only blog page get result from search #116

Closed blackyzero closed 7 years ago

blackyzero commented 7 years ago

Hi everyone,

i installed and enabled simplesearch plugin, however only blog pages which are set as "blog" in category can give the result result. Other pages which are created from different taxonomy and tag are not showing in search result. I tried to empty the "Category filter" (as attached image), and also tried to put filters: "" in user/config/plugins/simplesearch.yaml, none of them works.

Could you please show me how to fix it?

screen shot 2017-05-24 at 1 35 59 pm
blackyzero commented 7 years ago

i got it works after adding following entry into simplesearch.yaml filters: ""

flaviocopes commented 7 years ago

You stumbled on an issue that I fixed this week, see the last 2 commits here: https://github.com/getgrav/grav-plugin-simplesearch/commits/develop

The problem is that adding an empty line in the category filter in Admin falls back to the default, which is filter by "blog" category.

I added a "@none" keyword that will serve that need.

flaviocopes commented 7 years ago

The problem is that setting in the yaml, next time you save in Admin, the changes will be overwritten. Try my solution and let me know if it works fine for you, I'll then make a release

blackyzero commented 7 years ago

thanks @flaviocopes for your comment, This doesn't work after following your instruction,

I added "@none" into Category filter, as below

screen shot 2017-05-25 at 12 56 03 pm

After saving the config, the file /user/config/plugin/simplesearch.yaml

enabled: true built_in_css: true display_button: false min_query_length: 3 route: /search template: simplesearch_results filters: category:

  • '@none' filter_combinator: and ignore_accented_characters: false order: by: date dir: desc
flaviocopes commented 7 years ago

Strange! It's not yet released, did you checkout the latest develop branch?

blackyzero commented 7 years ago

i am using v1.10.2, i installed from admin interface.

flaviocopes commented 7 years ago

The latest release should fix it. In the plugin configuration through Admin, set @none in the category filter.