Search code examples
elasticsearchlucenescoring

Don't understand value in elasticsearch explain result


I am learning about the results of asking for explanation in elasticsearch. I understand the biggest part of it, there is however one value that I cannot find information about. below is the explanation part of a simple match query with one term in one field I have done. This is the result:

_explanation:
  value: 4.715253
  description: "weight(name:love in 604) [PerFieldSimilarity], result of:"
  details:
  - value: 4.715253
    description: "fieldWeight in 604, product of:"
    details:
    - value: 1.0
      description: "tf(freq=1.0), with freq of:"
      details:
      - value: 1.0
        description: "termFreq=1.0"
    - value: 4.715253
      description: "idf(docFreq=57, maxDocs=2382)"
    - value: 1.0
      description: "fieldNorm(doc=604)"

I am looking for the meaning of the number 604, does anyone have an idea?


Solution

  • 604 is the document id.

    It's the id number you would pass in to IndexSearcher.doc in order to fetch the documents stored fields from the index, usually after first searching on some other criteria (document ids are not guaranteed to remain constant).