Closed darthf1 closed 2 years ago
๐๐ผ There a many errors like this. Since elastically is a drop-in replacement of elastica but adds new features, it's hard to avoid such kind of errors.
I already fixed some of them, but the way the library is built, IMHO is not the best one. I would like to propose another approach (don't know it yet :p) but I don't have time ATM to do it.
So I think the quick win, for now, would be to extends some classes, and use them instead of elastica ones... If you wan to submit a PR, It would be awesome ๐
@lyrixx I have provided a fix for this issue, more details on PR.
The discussion happened here https://github.com/jolicode/elastically/pull/105#issuecomment-1117011122 and I can say we are not going to fix it.
Hello, This has been solved in #150 ๐
Hi!
According to the docs, to add a document to the index, you have to to the following:
In the indexer, if the
$data
inside theDocument
(the$dto
parameter) is an object, it is sent to theserializer
:However, the constructor of
Elastica\Document
is typehinted asarray|string
:And
getData
returns anarray|string
as well:At the moment, this results in statistical analysis errors. In the future, this could lead to PHP errors when these PHPDoc's are converted to real typed properties.