if ( logSearch == null )
{
return Response.status(Response.Status.NOT_FOUND).build();
}
SearchResult result;
try
{
DateFormat dateFormatter = new SimpleDateFormat(DATE_FORMAT_STR);
SearchItem item = logSearch.toResult(docId);
if ( item == null )
{
return Response.status(Response.Status.NOT_FOUND).build();
}
byte[] bytes = logSearch.toData(docId);
if ( bytes == null )
{
bytes = new byte[0];
}
result = new SearchResult
(
docId,
item.getType(),
item.getPath(),
dateFormatter.format(item.getDate()),