/** Construct for given index and context */
public FullTextQueryBuilder(FullTextIndex index, AkibanInformationSchema ais,
QueryContext buildContext) {
this.indexName = index.getIndexName();
ServiceManager serviceManager = null;
if (buildContext != null) {
try {
serviceManager = buildContext.getServiceManager();
}
catch (UnsupportedOperationException ex) {
}
}
if (serviceManager != null) {
this.infos = serviceManager.getServiceByClass(FullTextIndexService.class);
}
else {
this.infos = new TestFullTextIndexInfos(ais);
}
this.buildContext = buildContext;