How to only get exactly partial-matched result?


(Bing Qiu) #1

We are using N-Gram tokenizer for the full_name, when we search "/_search?q=full_name:BIANA", we get the results which not exactly matches the "BIANA", results examples are as below. Is there a way we can only return results which exactly partial-matches the "BIANA", e.g. "BIANA Sharp" or "ABIANA Sharp", but not "Bianca Sharp"?

 {
    "_index": “indexname_demo",
    "_id": "109903557",
    "_score": 1.0684229,
    "_source": {
      "create_d": "2017-02-22T19:09:56.000Z",
      "full_name": "Bianca Sharp",
      "l_status": "1",
      "u_status": "3"
      }
  },
  {
    "_index": "indexname_demo",
    "_id": "106268391",
    "_score": 0.76905566,
    "_source": {
      "create_d": "2017-01-21T00:18:44.000Z",
      "full_name": "Iliana Gonzalez",
      "l_status": "1",
      "u_status": "3"
      }
  }

(system) #2

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