Why do MATCH() (SQL) and match() (PHP) have different implicit operators (AND vs. OR)?

Why does the SQL statement MATCH() have AND as the implicit operator…

…but the PHP client function match() has OR as the implicit operator?

The PHP client uses HTTP JSON protocol, not SQL, to send requests to Manticore so it follows the logic of the protocol here.

1 Like

And for the most part the HTTP protocol is designed to closely mimic the elasticsearch interface. Not an exact match, but close enough to be familar. So ‘default’ OR comes from elasticsearch AFAIK


Whereas thje defealt AND in SQL, has origins in Sphinx’es ‘Extended Match Mode’, which became the default matching mode. Actully thing Sphinx had MATCH_ANY as the default very early on, but was sensibly changed.