String with author and his book is given. There are two fields in index: author
and title
. I need to find all books where author and title matches.
String may contain only author or only title, so I can't parse it. If I search
SELECT id FROM books
WHERE MATCH('@(author, title) "jane smiley horse heaven");
, I don't get the most relevant book with author="jane smiley" and title="horse heaven".
I need something like
SELECT id FROM books
WHERE MATCH('@(title) "horse heaven" @(author) "jane smiley"');
but without splitting the string.
Is it possible?