Package org.wijiscommons.ssaf.schema.search

Examples of org.wijiscommons.ssaf.schema.search.SearchResult


                    executeQuery(solrLocation, queryString, startOffSet,
rows + 1, sortList );
               
                int recordCount = solrSearchResult.size();

                SearchResult searchResult = new SearchResult();
               
                PresentationControlParameters presentationControlParameters =
                    new PresentationControlParameters();
               
                if (recordCount == (rows + 1))
                {
                    presentationControlParameters.setMoreRecordsAvailable(true);
                    solrSearchResult.remove(recordCount - 1);
                    recordCount = recordCount - 1;
                }
               
                if (solrSearchResult.size() > 0)
                {
                    List<String> pointerLocations =
                        getPointerLocations(solrSearchResult);

                    // Get Pointers
                    Pointers pointers = getPointers(pointerLocations);

                    searchResult.setPointers(pointers);
                }
                else
                {
                    searchResult.setEmpty(new Empty());
                }
       
        // Set SearchResults
        searchResult.setSearchItems(searchItems);
       
        presentationControlParameters.setReturnedRecordCount(BigInteger
                        .valueOf(recordCount));
                presentationControlParameters.setTotalRecordCount(BigInteger
                        .valueOf(solrSearchResult.getNumFound()));
                presentationControlParameters
                        .setRequestedStartOffset(BigInteger
                                .valueOf(startOffSet));
        presentationControlParameters.setRequestedEndOffset(BigInteger
                        .valueOf(endOffset));

                presentationControlParameters.getSort().addAll(
                    searchRequest.getPresentationControlParameters().getSort() );
        searchResult
                        .setPresentationControlParameters(presentationControlParameters);
        // Return Document
                return marshal(searchResult);
      } else {
        SSAFSolrException ssafException =
View Full Code Here


       
        // Get Pointers
        Pointers pointers = getPointers(pointerLocations);
       
        // Create instance of SearchResult Object
        SearchResult searchResult = new SearchResult();
       
        // Set Pointers
        searchResult.setPointers(pointers);
       
        // Set SearchResults
        searchResult.setSearchItems(searchItems);
       
        // Return Document
        return getDocument(searchResult);
      } else {
        SSAFSolrException ssafException =  new SSAFSolrException();
View Full Code Here

TOP

Related Classes of org.wijiscommons.ssaf.schema.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.