Package com.flaptor.indextank.search

Examples of com.flaptor.indextank.search.SearchResults


        Map<String, String> extras = createExtraParameters(fetch, snippet,
                fetchVariables, fetchCategories);

        try {
            long t0 = System.currentTimeMillis();
            SearchResults results = api.search(q, start, len, function, vars, facetFilters, variableRangeFilters, functionRangeFilters, extras);
            long t1 = System.currentTimeMillis();
            double searchTime = (t1 - t0) / 1000;
            int matches = results.getMatches();
            Map<String, Map<String, Integer>> facets = toFacets(results.getFacets());
            String didYouMean = results.getDidYouMean();
           
            JSONArray ja = new JSONArray();
            for(SearchResult result: results.getResults()) {
                addResult(ja, result);
            }

            JSONObject jo = createResponse(q, searchTime, ja, matches, facets, didYouMean);
           
View Full Code Here


                    new IntersectionMatchFilter(
                            convertToVariableRangeFilter(variableRangeFilters),
                            convertToFunctionRangeFilter(functionRangeFilters)
                    )
            );
            SearchResults search = searcher.search(query, start, len, scoringFunctionIndex, extraParameters);
            return search;
        } catch (NoSuchQueryVariableException e) {
            throw new IndexEngineApiException("Missing query variable with index '" + e.getMissingVariableIndex() + "'", e);
        } catch (ParseException e) {
            throw new IndexEngineApiException("Invalid query", e);
View Full Code Here

TOP

Related Classes of com.flaptor.indextank.search.SearchResults

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.