Closed rgaudin closed 11 months ago
It seems it is issue with the xapian indexation of the book (internal database in library).
We index the book with Xapian::TermGenerator::index_text
(https://github.com/kiwix/libkiwix/blob/main/src/library.cpp#L439) which is made to index "classic" text, and so understand the .
as a sentence separator. So we have 3 indexed name for the book : 3dprinting
, stackexchange
and com_en_all
.
Changing to doc.add_term("XN"+normalizeText(book.getName()));
properly index the name as only one name containing dot.
curl '<host>/catalog/v2/partial_entries?name=3dprinting.stackexchange.com_en_all'
now return a result.
However curl '<host>/catalog/v2/partial_entries?name=3dprinting'
does not as there is no book with the name "3dprinting".
OK thank you for the explanation. I'm in favor of the move. @kelson42 WDYT?
Looks like hyphens (-
) are triggering it as well
I'm in favour of that move, but this should not impact other metadata of the ZIM file, so only the Name
... but if I look to the code, this seems to be already the case! @mgautierfr Can you please provide the quickfix?
OPDS /catalog/v2/entries endpoint allows filtering entries by specifying a name.
As per the doc, it is the ZIM-name which is a modified filename in case of file-using kiwix-serve or the
name
in library.xml for a library-using kiwix-serve. [[ why isn't it using theName
metadata? ]]This is not working as expected. I am using only library based example as it is supposed to reuse the name directly.
This works, we get the 3dprinting ZIM entry. It's name in the library is
3dprinting.stackexchange.com_en_all
.Trying to filter using the name doesn't work.
As the filter matches the beginning of the name, we can test that it stops working as soon as there is a
.
in it.This prevents checking that a ZIM is indeed in the library… without downloading all the catalog. Kind of not the point of OPDS.