@Override public void onLocation(IDeviceEventContext context, IDeviceLocation location) throws SiteWhereException { SolrInputDocument document = SiteWhereSolrFactory.createDocumentFromLocation(location); try { queue.put(document); } catch (InterruptedException e) { throw new SiteWhereException("Interrupted during indexing.", e); } }
@Override public void onLocationNotFiltered(IDeviceLocation location) throws SiteWhereException { SolrInputDocument document = SiteWhereSolrFactory.createDocumentFromLocation(location); try { queue.put(document); } catch (InterruptedException e) { throw new SiteWhereException("Interrupted during indexing.", e); } }