Package com.netflix.exhibitor.core.index

Examples of com.netflix.exhibitor.core.index.SearchItem


        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()),
                new String(bytes, "UTF-8"),
                ExplorerResource.bytesToString(bytes)
            );
        }
        finally
View Full Code Here


            {
                if ( i < cachedSearch.getTotalHits() )
                {
                    ObjectNode      data = JsonNodeFactory.instance.objectNode();
                    int             docId = cachedSearch.getNthDocId(i);
                    SearchItem      item = logSearch.toResult(docId);
                   
                    data.put("DT_RowId", "index-query-result-" + docId);
                    data.put("0", getTypeName(EntryTypes.getFromId(item.getType())));
                    data.put("1", dateFormatter.format(item.getDate()));
                    data.put("2", trimPath(item.getPath()));

                    dataTab.add(data);
                }
            }
View Full Code Here

TOP

Related Classes of com.netflix.exhibitor.core.index.SearchItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.