Can I limit displayed search results to applicable sentences or paragraphs rather than entire document?

I have indexed 24 Jack Reacher books.
Any successful search displays at least one book in its entirety.
e.g.:

}
GET books4/_search
{
  "query": {
    "match_phrase":{
    "content": "deerfield nodded"
    }
  }
}

Is there a way of requesting just the containing sentences, like with n-grams?

Is it highlighting? Fragments?

Tried this (modified from an example at the bottom of the 'Highlights'page) but it didn't work, or at least not the way I expected, as the result still contained all the text.

GET books4/_search
{
  "query": {
    "match_phrase" : {"content" : "deerfield nodded"}
  },
  "highlight": {
    "type" : "unified",
    "number_of_fragments" : 3,
    "fields": {
      "content": {}
    }
  }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.