Package com.netflix.exhibitor.core.index

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


            return "{}";
        }
        ObjectNode          node;
        try
        {
            CachedSearch        cachedSearch = logSearch.getCachedSearch(searchHandle);
            DateFormat          dateFormatter = new SimpleDateFormat(DATE_FORMAT_STR);
            ArrayNode           dataTab = JsonNodeFactory.instance.arrayNode();
            for ( int i = iDisplayStart; i < (iDisplayStart + iDisplayLength); ++i )
            {
                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);
                }
            }

            node = JsonNodeFactory.instance.objectNode();
            node.put("sEcho", sEcho);
            node.put("iTotalRecords", logSearch.getDocQty());
            node.put("iTotalDisplayRecords", cachedSearch.getTotalHits());
            node.put("aaData", dataTab);
        }
        finally
        {
            context.getExhibitor().getIndexCache().releaseLogSearch(logSearch.getFile());
View Full Code Here

TOP

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

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.