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

211
Views
Elasticsearch, how to get a search result in all circumstances

I've been dealing with a project. My goal is to get result from search engine in all circumstances for example, although i enter a keyword which is not include the keys inside data or is a empty string, I still need to get some result.How can i reach my goal?

you can see the query below :

  query: {
          regexp: {
            title: "something to not found .*",
          },
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try use "prefix" or "query_string"

You also can use title.keyword for exact value

1 - 
{
  "query": {
    "prefix": {
      "title": {
        "value": "<data>"
      }
    }
  }
}

2 - 
{
  "query": {
    "query_string": {
      "default_field": "title",
      "query": "<data>*^0"
    }
    
  }
}
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!