#pragma once

#include "raiisearch.h"

#include <saas/searchproxy/configs/serviceconfig.h>

namespace NSearchProxy {
    class TCommonMetaSearch
        : public TRaiiSearch
        , public TRaiiSearchParams
    {
    public:
        TCommonMetaSearch(const TServiceConfig& serviceConfig, const TSourcesConfig& searchConfig
            , ICgiCorrectorPtr cgiCorrector, TServiceMetricPtr metric, TEventLogPtr eventlog);

        virtual ISearchContext* CreateContext() const override;
        virtual ISearchContext* CreateContext(const TSearchRequestData& rd) const override;

        virtual TAutoPtr<IMetaRankEnv> CreateMetaRankEnv(const TSearchConfig& config) const override;
    };
}
