package com.cameleer.server.core.storage;

import com.cameleer.server.core.search.ExecutionSummary;
import com.cameleer.server.core.search.SearchRequest;
import com.cameleer.server.core.search.SearchResult;
import com.cameleer.server.core.storage.model.ExecutionDocument;

import java.util.List;

public interface SearchIndex {

    SearchResult<ExecutionSummary> search(SearchRequest request);

    long count(SearchRequest request);

    void index(ExecutionDocument document);

    void delete(String executionId);

    /** Returns distinct attribute key names across executions in the given environment. */
    List<String> distinctAttributeKeys(String environment);
}
