lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <m...@apache.org>
Subject Re: Wrong ID in explain() method.
Date Fri, 29 Dec 2017 09:21:48 GMT
Responded on the elastic forum. Have you seen it?


On Fri, Dec 29, 2017 at 9:25 AM, Vadim Gindin <vgindin@detectum.com> wrote:

> If I check
>
> GET myindex/mytype/342
>
> Nothing is found.
>
> I suppose there is a name conflict and Lucene erroneously finds "id" of
> a nested object (category from a list) and erroneously assumes that it is
> an ID of a whole document.
>
> Is that possible? Is "id" string is reserved word for Lucene?
>
> Regards,
> Vadim Gindin
>
> On Wed, Dec 27, 2017 at 12:43 PM, Vadim Gindin <vgindin@detectum.com>
> wrote:
>
> > 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
> >
>



-- 
Sincerely yours
Mikhail Khludnev

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