Jump to content

Boolean Searching (AND, OR, NOT, etc.)


dandeckr
 Share

Recommended Posts

Hello!

I'm making my way through my first encounter with ProcessWire, and I'm very near the end of my tasks! I've searched Google, these forums, and for add-ons, but I haven't found any documentation or reference work for implementing boolean searching in the native CMS? Am I missing a thread, add-on, or docs that can point the way? I'm sure I'm not the first to have a need like this? Thanks in advance! 

Link to comment
Share on other sites

Hello @dandeckr!

I'm sure you also stumbled upon the selector docs. Can you elaborate what you are trying to achieve? Do you need to do some complex queries? If you tell us a bit about your site structure, and what you have already done so far, I'm sure we could jump in with some practical tips.

A simple NOT would mean simply using field!=value.

There are also quite a few methods where the documentation is scattered a bit all over the place, e.g.

https://processwire.com/blog/posts/pw-3.0.25/

https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#selector-engine-array-support

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello and thank you!

Indeed, the more I research the more I've determined the difference between what the client says and what the client means. Basically, its advanced filtering. They want "results with THESE words, or THOSE words, but not THAT word". As you noted, going over the selector docs, I think It's possible to gather a result set with pages that "contain 'all these words'" and then filter the result set for "but not 'these words'" before display. 
I'll follow up with my outcomes once I get to test my means! Thank you again!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...