Match() with OR logic operator

I have a user auto suggest that allows the user to choose OR not to choose the suggested items. In my query the condition with OR logic does not work. The ID based search can also be a list of up to 30 ids or so.

WHERE MATCH(’@(name,location,summary), bike’) OR company_id IN (1)

If the AND operator is used, it works but this is not what I need.

WHERE MATCH(’@(name,location,tags), bike’) AND company_id IN (1)

My current solution is doing 2 queries :

  • MATCH()
  • ID based query

Then I merge them together in PHP. I have this kind of user input logic in plenty of areas in my application and I think there might be a more efficient way of doing this.

currently OR works inside filters only. There is no way to combine fulltext search operator via OR with filters

Ah I see! I think this is quite helpful to include in the documentation. Probably this would be a nice feature update in the future. :grin:

you might create ticket at GitHub to be informed on progress