Simplesearch: What does it search, and what can be customized?

This plugin is really driving me nuts (if I’m being honest), I can’t seem to noodle out what it is actually looking for, and how to customize the search to cover multiple categories. I’ve looked at the RTFM skeleton and the Deliver skeleton files, and all I manage to do is break it.

I would like to be able to:

  • customize the results output
  • have it search (up to 4) multiple categories
  • plus I would love to see a yaml file with a comprehensive list of what can be customized

I have the latest version, and without touching it, using 1 category, it returns results, but that doesn’t help me much.

Thanks in advance.

Make sure the plugin config contains e.g.


filters:
  category: ['blog', 'test']
filter_combinator: or

That should work

Thanks, that solved that part.
Cheers.

SimpleSearch was intended as a simple search solution (hence the name!), and it started off with just the ability to search title and content for strings based on a taxonomy filter.

It was recently updated to add support for searching text in the taxonomies for the page.

That is all it supports. It is not pluggable and was not intended to be so. There is definitely room for a more sophisticated search solution that uses indexes, but this has yet to be written!

BTW, if you needed to add something you could simply fork it, and modify it for your needs.

Yeah, I can totally understand that. Sorry if I came off a bit short. Actually, I am going to fork it, and see if I can get it to do what I want, it’s a great start though.

When you say content, does that include information from just the page.md file, or will it also look at what is in a modular page and it’s assets. I haven’t really taken the time yet to get into the code to see what it’s doing, I fully admit that - just haven’t had the time yet.

Thanks.

It looks inside the modular pages “modules”, but if combined with the taxonomy, I verified you need to put the taxonomy information inside the module pages too. Otherwise if the taxonomy is defined only on the “root” modular page, search does not work.
It’s likely a shortcoming of the plugin, which can/should be fixed I think

Thanks for the follow-up. I’m not certain that it’s a shortcoming, it probably adds a bit more flexibility to being able to include or exclude pages easily. It’s certainly easy enough to add the taxonomy to the modular pages, though I can see where it would get unwieldy if you had a lot of pages.