Closed indapublic closed 4 years ago
Tried with ->match(["title", "content", "tag"], "foo | bar")
but not worked
@indapublic If you want to use Extended query syntax as the value for match
, you should specify true as the third argument:
->match(['title', 'content', 'tag'], 'foo | bar', true)
will be compiled to:
MATCH("@(title,content,tag) foo | bar")
Please note that you should sanitize user input to avoid injection, you can see in method Query::quoteMatch()
all symbols which should be escaped. Passing true to the third argument of Query::match()
disables automatic escaping.
Oh, stupid me. Sorry. Found 'setQuery' but not third argument for 'match'. Thank you!
Hey! Thanks for your awesome library. Have a question. Is it possible to do OR condition? I want to find all occurrences with "foo" and "bar" for example
Something like that, but it works like AND condition.