Updated Index has data but not showing in the hits

Hi,

I'm using Elasticsearch for query search of indexed data. Each document contains 116 fields (text) and 116 values (keyword). I'm able to load to an index properly. When I tried searching for newly updated data in the index using Kibana Query it's not showing any hit but if I use the auto generated _id it's showing the result. When I query for _cat /indices I can see the number of documents increased. I have checked the mappings; it is correct and the same as before. How to resolve this?
Thanks in advance!

Best Regards,
Joshua Ravi

Hey @joshua26,

Can you check if your search query is correct. If you see the _count go up it means that documents are indexed. If you can give more information on the query that would be helpful

You should be able to do the same query in Kibana DevTools.

GET <index-name>/_count first to make sure documents are indexed. Which I think you already certain for that.

POST <index-name>/_search`
{
    // your query here`
}

Hi @efegurkan,

Thanks for quick response, I have tried as you suggested and included the query, output below.
for POST API, I have tried match, term, .keyword still not showing any hits.

GET grch_final/_count
output
{
  "count": 537480235,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  }
}
query:
POST grch_final/_search
{
 "query": {
    "term": {
      "variation": "14_19000050_G/A"
    }
  }
}

output:
{
  "took": 1,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 0,
      "relation": "eq"
    },
    "max_score": null,
    "hits": []
  }
}

looking at your query, do you want to filter fits based on your condition?

Take a look at the index mappings, "variation" maybe a text field here and what it appears you want is doing a term query on a keyword field to do exact match.

You can find the index mappings via GET grch_final/_mapping

We have a search tutorial that maybe helpful here Filters — Elastic Search Labs

Also worth reading through this notebook to understand all the different types of querying and filtering thats on offer and the type of fields they need to be aswell.

Joe

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