The query for standard开发者_开发百科 request handler is as follows field1:(keyword1 OR keyword2) OR field2:(keyword1 OR keyword2) OR field3:(keyword1 OR keyword2) AND field4:(keyword3 OR keyword4) AND field5:(keyword5)
How the same above query can be written for dismax request handler
There are three kinds of phrses in dismax -mandatory (the word is preceded by (+) mark : means that keywords must be exists both in one document (in one search result) -prohibited (the word is preceded by (-) mark : means that keywords must not be in the search result -and optional which is the default and not preceded by any mark : means that one of the keywords at least in the search result
to filter query against fields you can use the (qf) parameter qf=name title auther ISBN or qf = name to search only on name field
精彩评论