private CoreSenseiServiceImpl _coreService;
private final SenseiCore _core;
public LocalQueryOnlySenseiServiceImpl(File idxDir) throws Exception{
ZoieConfig zoieConfig = new ZoieConfig();
zoieConfig.setReadercachefactory(SimpleReaderCache.FACTORY);
DemoZoieSystemFactory zoieFactory = new DemoZoieSystemFactory(idxDir,new AbstractZoieIndexableInterpreter<JSONObject>(){
@Override
public ZoieIndexable convertAndInterpret(JSONObject src) {
return null;
}
},zoieConfig);
QueryParser queryParser = new QueryParser(Version.LUCENE_35,"contents", new StandardAnalyzer(Version.LUCENE_35));
DefaultJsonQueryBuilderFactory queryBuilderFactory = new DefaultJsonQueryBuilderFactory(queryParser);
_core = new SenseiCore(1,new int[]{0},zoieFactory,null,queryBuilderFactory, zoieFactory.getDecorator());
_coreService = new CoreSenseiServiceImpl(_core);
_core.start();
}