Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
Cómo miro hacia adelante en las búsquedas Elastic Co

Estoy tratando de agregar una función de búsqueda para usuarios en mi aplicación. Cuando escribo la palabra "Josh" en la barra de búsqueda, las personas con el nombre "Joshua" no aparecen. He escrito el nombre completo "Joshua". ¿Cómo puedo agregar esta función de anticipación?

Aquí está mi consulta actual:

 "bool": { "must": [ { "multi_match": { "fields": [ "first", "first.edge", "last", "last.edge", "title", "title.edge" ], "query": search, "fuzziness": 1, } } ] }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Una forma de resolverlo es usando ngram.

 PUT ngram_custom_example { "settings": { "analysis": { "analyzer": { "ngram_analyzer": { "tokenizer": "standard", "filter": [ "3_5_grams" ] } }, "filter": { "3_5_grams": { "type": "edge_ngram", "min_gram": 2, "max_gram": 5 } } } }, "mappings": { "properties": { "name":{ "type": "text", "analyzer": "ngram_analyzer" } } } } POST ngram_custom_example/_bulk {"index":{}} {"name":"josh"} {"index":{}} {"name":"joshua"} GET ngram_custom_example/_search { "query": { "bool": { "must": [ { "multi_match": { "fields": [ "name" ], "query": "josh" } } ] } } }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!