Wednesday 2 December 2015

Elasticsearch: Java: fuzzy query

Go through following link for details fuzzy query.

QueryBuilder builder = QueryBuilders.fuzzyQuery("text", "aara").boost(1.0f).prefixLength(0).maxExpansions(100).fuzziness(Fuzziness.TWO);

Above statement generates following fuzzy query.

{
  "fuzzy" : {
    "text" : {
      "value" : "aara",
      "boost" : 1.0,
      "fuzziness" : 2,
      "prefix_length" : 0,
      "max_expansions" : 100
    }
  }
}



Previous                                                 Next                                                 Home

No comments:

Post a Comment