Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine Cleanup #52

Open
rengaw83 opened this issue Jul 3, 2019 · 1 comment
Open

Engine Cleanup #52

rengaw83 opened this issue Jul 3, 2019 · 1 comment
Labels
BC Break This change cause a BC break enhancement

Comments

@rengaw83
Copy link
Member

rengaw83 commented Jul 3, 2019

The SearchEngineInterface defines a lot of useless methods like deleteIndex.
The engines themselves implement the methods, most with useless copy'n'paste code.
The engines have to be reconsidered and cleaned up.

@Baachi
Copy link
Contributor

Baachi commented Aug 13, 2019

Yeah the engine interface is a mess. What i imagine would be the following:

We have a engine which is only responsible for all read access like searching or find a document. This could looks like this:

interface EngineInterface
{
    function search(Query $query): iterabel;

    function find(string $extKey, int $uid): Document;
}

In opposite to the engine we could have an separate interface for all operations to manipulate the data.

interface IndexInterface
{
     function createDocument(Document $document): void;

     function deleteDocument(Document $document): void;

     function updateDocument(Document $document): void;

     function commit(): void;
}

Would you agree?

/cc @hannesbochmann @digedag

@Baachi Baachi added BC Break This change cause a BC break enhancement labels Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC Break This change cause a BC break enhancement
Projects
None yet
Development

No branches or pull requests

2 participants