lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gindin <vgin...@detectum.com>
Subject Wrong ID in explain() method.
Date Wed, 27 Dec 2017 07:43:14 GMT
Hi all.

I've written a simple plugin, that implements custom scoring logic and
extending `Explanation`. I have some real index data that looks like this:

    "_source": {
          "price": 10000,
          "params_model": "Дверь задняя правая Honda CR-V",
          "categories": [
            {
              "id": 3,
              "shop_category_id": "3",
              "name": "Кузов наружные элементы",
              "level": 1
            },
            {
              "id": 342,
              "shop_category_id": "62",
              "name": "Дверь задняя правая",
              "level": 2
            }
          ],
          "params_vendor": "Honda",
        }

My plugin remembers the document id (that was matched in scorer) to a
collection. When explain(id) is called it checks specified id in this
collection and outputs "matched"/"not matched".

The questions.
0. This document is founded by the plugin, but explain(id) method takes the
wrong ID. Why? It happens in the real installation, but in the test case -
it works fine.
1. ID=342 and others come to explain(id) method. Note, it is not a document
id - it is ID of the nested object (category). Why does it happen?
2. I have a test case, based on ESIntegTestCase. It works fine with this
document. But this document is not founded in the real index.

Regards,
Vadim Gindin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message