jolicode / elastically

🔍 JoliCode's Elastica wrapper to bootstrap Elasticsearch PHP integrations
248 stars 37 forks source link

DocumentExchangerInterface should also allow fetching multiple documents at once #55

Open damienalexandre opened 3 years ago

damienalexandre commented 3 years ago

From a performance POV, the current DocumentExchangerInterface is not ideal for the MultipleIndexationRequest use-case.

It can only fetch one document at a time, so it perform 1 SQL request (if SQL is used) for each IndexationRequest instead of possibly one for the whole MultipleIndexationRequest.

Would be nice to add DocumentExchangerInterface::fetchDocuments and use it when appropriate.