How do I make Elasticsearch address search a smooth experience?

Elasticsearch version ( bin/elasticsearch --version ):
Plugins installed :

JVM version ( java -version ):
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

OS version ( uname -a if on a Unix-like system):
Linux myserver 4.4.0-131-generic #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Hi all i'm currently facing an issue where I would like to be able to search for an Address in any way the user could enter said address, e.g. looking for an address.

I want my search to be able to search in such a way that the user input order doesnt matter.

for example an address:
Strawinskylaan 1 (streetname + number)
1077 XW Amsterdam (postalcode + postalcode Letters + City)

The user would input for example:
"1077 XW"


"Amsterdam Strawinskylaan"



Sometimes a building might have a name which is also stored in my documents

I currently store all of these mentioned fields separately as such per document:

  • building_name
  • streetname
  • number
  • postalcode
  • postalcode_letters
  • city

So without knowing in which order the user will give its input, how could i make my example work? Would I need to restructure?

I think you can use the multimatch query and try to apply what the user has entered to every field. You might need to "boost" some fields though.

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