valantic / pimcore-elastica-bridge Goto Github PK
View Code? Open in Web Editor NEWPimcore Elastica Bridge
Home Page: https://valantic.github.io/pimcore-elastica-bridge/
License: MIT License
Pimcore Elastica Bridge
Home Page: https://valantic.github.io/pimcore-elastica-bridge/
License: MIT License
Currently, a Pimcore autosave triggers an element refresh. This can be seen as both a bug and a feature. Solutions:
supports
strategy to provide custom logicFor simplicity reasons, option 1 will be implemented. If advanced logic is needed, a project can define a listener with a higher priority than what's defined in \Valantic\ElasticaBridgeBundle\EventListener\Pimcore\ChangeListener::getSubscribedEvents
and call \Valantic\ElasticaBridgeBundle\EventListener\Pimcore\ChangeListener::disableListener
.
E.g. \Valantic\ElasticaBridgeBundle\DocumentType\DocumentInterface::TYPES
By @danrot
Currently this is done in the RefreshCommand, where an event listener is called manually with a manually created event. IMO it should be easier to execute that, especially in the context of the application. I have something like
$index->refresh($element)
in mind.
Especially in the context for Pimcore Enterprise setups, the default should be more sensible.
The trait is incredibly useful yet lacks clear documentation and the code isn't easy to parse either.
By @danrot
Sometimes the wrong index is used, e.g. something like
course_23042023
instead ofcourse--green
orcourse--blue
. Seems like the only check is if the index starts with the given string.
The Service should also be aware of possible locks so a soon to be bad index won't be updated. This way we could implement a messenger queue which waits with the update until the lock is available.
Follow up to #61
E.g. to index all documents or assets.
IMO The index should not be updated if pimcore autosaves a concrete or a new version is saved. WDYT?
When running :status
, the list of non-bundle indices is not sorted in any meaningful way. Since this command is primarily meant to be human-readable, alphabetical sort is probably the best way to go.
e.g. replace event listener (sync) with messages (async)
Assets are yet to be used in an index, nothing should prevent it from working though.
Meta fields e.g. __subType
(https://github.com/valantic/pimcore-elastica-bridge/blob/main/src/Document/DocumentInterface.php#L19-L30) aren't mapped as keyword
attributes in IndexInterface::getMapping
by default even though this would provide a sane default.
E.g. \Valantic\ElasticaBridgeBundle\Index\AbstractIndex::getDocumentFromElement
, \Valantic\ElasticaBridgeBundle\Index\AbstractIndex::searchForElements
, and \Valantic\ElasticaBridgeBundle\Index\AbstractIndex::documentResultToElements
as they encourage loading data from Elasticsearch and Pimcore which is often inefficient.
Instead of --no-delete
, use --delete
etc.
suggested by @pryserv
The stats (e.g. doc count) use values from the all
section rather than primaries
which results in e.g. double-counting the documents.
The trait is rarely if ever overridden and virtually always used in the same class.
By @danrot
I think it would be better to have just one
DocumentInterface
. It would make this bundle easier to understand and maintain. It would still be easily possible to have an abstract class just to extract the parts that might be reused among multiple indices, if the developer wishes to do that.
Use rector
\Valantic\ElasticaBridgeBundle\Document\DataObjectNormalizerTrait::relationAttributes
skips empty relations completely, hence the attribute is missing from the ES document. Either allow an optional default value (no BC break) or provide sane defaults (BC break).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.