private volatile LogService logService;
private volatile ProductService productService;
@Override
public void indexProduct(Product product) {
Document document = index.newDocument();
document.setField("uri", product.get_id());
document.setField("content", product.getName());
try {
index.update(document);
} catch (SearchException e) {
logService.log(LogService.LOG_ERROR, "Error indexing product with name '" + product.getName() + "'", e);