public SearchableMethod getMethod(String methodName) {
// TODO refactor to (injected) lookup map
if (methodName.equals("indexAll")) {
LOG.warn("The Searchable Plugin 'indexAll' method is deprecated and will be removed in the next version: please use 'index' instead");
return new DefaultIndexMethod(methodName, compass, compassGps);
}
if (methodName.equals("index")) {
return new DefaultIndexMethod(methodName, compass, compassGps);
}
if (methodName.equals("unindexAll")) {
LOG.warn("The Searchable Plugin 'unindexAll' method is deprecated and will be removed in the next version: please use 'unindex' instead");
return new DefaultUnindexMethod(methodName, compass);
}