How to create a setup for searching for people


(Christer Nordvik) #1

We have a list of 80K names, only fullnames so no split between first name and last name.

We have indexed the names with multiple inputs and one output like:
"John Stones" has inputs of

  1. "John Stones"
  2. "Stones"
    And output of
    "John Stones".

But when we do a search for "John S" we get hits with better score like:
"John Keister"

I think we are missing something fundamental here so any guidance would be really appreciated as we're new to Elasticsearch. How should we setup the search so it gets us better results where John Stones has a higher score than "John Keister" when searching for "John S"?


(Christoph) #2

Hi,

some more information about your document structure, your mappings (have you defined any) and the queries you are trying out would be of help here. Generally speaking, for your use case, Prefix Query would be something to worth looking at, but maybe there are variations that are more performant.


(Christer Nordvik) #3

Thanks! Prefix Query seems like it is what we are after. We'll have a go at that!

We are using .NET and using the automapper so nothing very special set in terms of mapping.


(system) #4