I am using Search API module with Search API DB module to use drupal database for search indexing.

Issue is when I do a phrase search as following "test content" I get results having "test"(let's say nid:1) or "content"(nid:2) or "test content"(nid:3) in them but the content having exact match which is "test content" which is node 3 shows down in the search results.

I do not have any fields for sorting in my search view.

My question is why I am not getting search results on phrase match on top of those who have partial matches?

  • Welcome to Drupal Answers! Notice that, technically, you aren't asking any explicit question; you are just stating some facts.
    – apaderno
    Aug 27, 2015 at 9:54
  • thanks @kiamlaluno, Yes and I realised it later after getting the answer from cedric_a . I was expecting the search results to consider phrase match, but got to know core search does not support it.
    – arpitr
    Aug 27, 2015 at 10:52
  • 1
    Please edit the question to ask an explicit question. Comments are second-class citizens, and should not be used to re-open an on hold question.
    – apaderno
    Aug 27, 2015 at 11:01

1 Answer 1


Database search doesn't support phrases searches as stated here by the maintainer of the module (cf. https://www.drupal.org/node/2043339#comment-7654017) :

Are you using the Database Search backend? In this case it's clear, because that backend currently doesn't support phrase searches due to technical restrictions. However, results should always contain both words, though not necessarily next to each other.

In order to sort your results, see this related question/answer I have no fields available for sorting with Search API sorts module


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.