How can I make the search in opensearch more strict?

  1. In OpenSearch, there are documents that contain the following field:
 "address": {
    "city": "London",
    "street": "Baker street",
    "building": "221b",
    "floor": "1",
    "room": "4"
}

When I send a request with request body through the API like this:

{
   "filters": {
       "address": "london baker street 221bsdfsdf"
   }

}

We receive all documents containing “london baker street 221b”. How can I make it so that a request of this kind does not return documents, since “london baker street 221bsdfsdf” is an invalid address? Here is a block of code from the API:

if (requestFilters.address() != null) {
   boolQueryBuilder.must(
       new Query.Builder().nested(
           new NestedQuery.Builder()
               .path("address")
               .query(
                   queryForMatchField(
                       List.of(
                           "address.city",
                           "address.street",
                           "address.building",
                           "address.room"),
                       requestFilters.address()
                   )
               )
               .build()
       ).build()
   );

   private Query queryForMatchField(List<String> fieldNames, String value) {
       return new Query.Builder().multiMatch(
           new MultiMatchQuery.Builder()
               .fields(fieldNames)
               .query(value)
               .fuzziness("AUTO")
               .zeroTermsQuery(ZeroTermsQuery.All)
               .build()
       ).build();
   }
  1. How can I ensure that when requesting “address”: “london baker street 221b”, documents with “london baker street 221” or “london baker street 221a” are not returned?

in the multimatch query set operator to and or set minimum_should_match to the number of words