1 #include <SphinxTaskReducersManager.h>
2 #include <SphinxTaskReducersStorage.h>
3 #include <SphinxTaskReducerFactory.h>
4 #include <SphinxResultJSONConvertor.h>
8 using namespace HCE::sphinx;
9 using namespace HCE::sphinx::reduce_task;
13 int main(
int argc,
char** argv)
20 sphinxResultJSONConvertor);
22 string sphinxResultJSON =
"";
24 if (!sphinxTaskReducersManager.isSphinxTaskReducerExist(itemId)){
25 sphinxTaskReducersManager.createSphinxTaskReducer(itemId);
29 sphinxTaskReducersManager.addDataInSphinxTaskReducer(itemId, sphinxResultJSON);
31 catch(WrongJSONStructureException& e){
32 cout <<
"WrongJSONStructureException" <<
endl << sphinxResultJSON <<
endl;
39 catch(NotFoundByKeyException &e){
40 cout <<
"NotFoundSphinxTaskReducerException" <<
endl;
44 sphinxTaskReducersManager.deleteTaskReducerBy(itemId);
46 catch(NotFoundByKeyException &e){
47 cout <<
"NotFoundSphinxTaskReducerException" <<
endl;