private void processQueryOptions(SolrQuery solrQuery, Query query) { appendPagination(solrQuery, query.getPageRequest()); appendProjectionOnFields(solrQuery, query.getProjectionOnFields()); appendGroupByFields(solrQuery, query.getGroupByFields()); appendFilterQuery(solrQuery, query.getFilterQueries()); appendSort(solrQuery, query.getSort()); appendDefaultOperator(solrQuery, query.getDefaultOperator()); appendTimeAllowed(solrQuery, query.getTimeAllowed()); appendDefType(solrQuery, query.getDefType()); appendRequestHandler(solrQuery, query.getRequestHandler()); }
@Override public <T> ScoredPage<T> queryForPage(Query query, Class<T> clazz) { Assert.notNull(query, "Query must not be 'null'."); Assert.notNull(clazz, "Target class must not be 'null'."); QueryResponse response = query(query); List<T> beans = convertQueryResponseToBeans(response, clazz); SolrDocumentList results = response.getResults(); return new SolrResultPage<T>( beans, query.getPageRequest(), results.getNumFound(), results.getMaxScore()); }