Package com.flaptor.indextank.search

Examples of com.flaptor.indextank.search.SearchResult


        // adds fetch variables to the transform function
        if ("*".equals(fetchVariables) || "true".equalsIgnoreCase(fetchVariables)) {
            transformFunction = new Function<ScoredMatch, SearchResult>() {
                @Override
                public SearchResult apply(ScoredMatch scoredMatch) {
                    SearchResult searchResult = baseTransform.apply(scoredMatch);
                    searchResult.setVariables(boostsManager.getVariablesAsMap(scoredMatch.getDocId()));
                    return searchResult;
                }
            };
        }

        // adds fetch categories to the transform function
        final Function<ScoredMatch, SearchResult> prevTransform = transformFunction;
        if ("*".equals(fetchCategories) || "true".equalsIgnoreCase(fetchCategories)) {
            transformFunction = new Function<ScoredMatch, SearchResult>() {
                @Override
                public SearchResult apply(ScoredMatch scoredMatch) {
                    SearchResult searchResult = prevTransform.apply(scoredMatch);
                    searchResult.setCategories(boostsManager.getCategoryValues(scoredMatch.getDocId()));
                    return searchResult;
                }
            };
        }
       
View Full Code Here

TOP

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

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.