You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by su...@apache.org on 2012/04/16 10:58:56 UTC

svn commit: r1326536 - in /incubator/stanbol/branches/faceted-browsing/contenthub: search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/ servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/

Author: suat
Date: Mon Apr 16 08:58:56 2012
New Revision: 1326536

URL: http://svn.apache.org/viewvc?rev=1326536&view=rev
Log:
STANBOL-584: 
-Reverted name from DefaultConstrainedDocumentList to DefaultConstrainedDocumentSet
-Removed methods getting offset and limit parameters from FeaturedSearch interface
-ConstrainedDocumentSet returns DocumentResult instead of UriRef
-Adjusted solr query while retrieving documents to get all documents and fields to create DocumentResults

Added:
    incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentSet.java
      - copied, changed from r1325800, incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentList.java
    incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentSet.java
      - copied, changed from r1325800, incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentList.java
Removed:
    incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentList.java
    incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentList.java
Modified:
    incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java
    incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/Facet.java
    incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/FeaturedSearch.java

Copied: incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentSet.java (from r1325800, incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentList.java)
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentSet.java?p2=incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentSet.java&p1=incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentList.java&r1=1325800&r2=1326536&rev=1326536&view=diff
==============================================================================
--- incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentList.java (original)
+++ incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/DefaultConstrainedDocumentSet.java Mon Apr 16 08:58:56 2012
@@ -21,49 +21,59 @@ import java.util.List;
 import java.util.Set;
 
 import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
 import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
 import org.apache.solr.client.solrj.response.FacetField;
 import org.apache.solr.client.solrj.response.FacetField.Count;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
+import org.apache.stanbol.contenthub.search.featured.util.SolrContentItemConverter;
 import org.apache.stanbol.contenthub.servicesapi.search.SearchException;
-import org.apache.stanbol.contenthub.servicesapi.search.featured.ConstrainedDocumentList;
+import org.apache.stanbol.contenthub.servicesapi.search.featured.ConstrainedDocumentSet;
 import org.apache.stanbol.contenthub.servicesapi.search.featured.Constraint;
+import org.apache.stanbol.contenthub.servicesapi.search.featured.DocumentResult;
 import org.apache.stanbol.contenthub.servicesapi.search.featured.Facet;
 import org.apache.stanbol.contenthub.servicesapi.search.featured.FeaturedSearch;
-import org.apache.stanbol.contenthub.servicesapi.store.vocabulary.SolrVocabulary.SolrFieldName;
 
-public class DefaultConstrainedDocumentList implements ConstrainedDocumentList {
+/**
+ * This implementation of {@link ConstrainedDocumentSet} retrieves all results without any smart retrieval
+ * technique e.g retrieve actual documents from the storage when the respective documents are accessed.
+ * 
+ * @author suat
+ * 
+ */
+public class DefaultConstrainedDocumentSet implements ConstrainedDocumentSet {
 
     private String queryTerm;
     private FeaturedSearch featuredSearch;
-    private List<UriRef> documentURIs;
+    private String indexName;
+    private List<DocumentResult> documentURIs;
     private Set<Constraint> constraints;
     private Set<Facet> facets;
 
-    public DefaultConstrainedDocumentList(String queryTerm,
-                                          QueryResponse queryResponse,
-                                          Set<Constraint> constraints,
-                                          FeaturedSearch featuredSearch) throws SearchException {
+    public DefaultConstrainedDocumentSet(String queryTerm,
+                                         QueryResponse queryResponse,
+                                         Set<Constraint> constraints,
+                                         String indexName,
+                                         FeaturedSearch featuredSearch) throws SearchException {
         this.queryTerm = queryTerm;
+        this.indexName = indexName;
         this.featuredSearch = featuredSearch;
-        parseQueryResponse(queryResponse);
         this.constraints = constraints;
+        parseQueryResponse(queryResponse);
     }
 
     @Override
-    public List<UriRef> getDocuments() throws SearchException {
+    public List<DocumentResult> getDocuments() throws SearchException {
         return documentURIs;
     }
 
     private void parseQueryResponse(QueryResponse queryResponse) {
         // parse ids
-        List<UriRef> ids = new ArrayList<UriRef>();
+        List<DocumentResult> ids = new ArrayList<DocumentResult>();
         SolrDocumentList documentList = queryResponse.getResults();
         for (SolrDocument solrDocument : documentList) {
-            ids.add(new UriRef((String) solrDocument.getFieldValue(SolrFieldName.ID.toString())));
+            ids.add(SolrContentItemConverter.solrDocument2solrContentItem(solrDocument, indexName));
         }
         documentURIs = ids;
 
@@ -94,21 +104,17 @@ public class DefaultConstrainedDocumentL
         return this.facets;
     }
 
-    public ConstrainedDocumentList subSet(int offset, int limit) throws SearchException {
-        return featuredSearch.search(queryTerm, getConstraints(), offset, limit);
-    }
-
     @Override
-    public ConstrainedDocumentList narrow(Constraint constraint) throws SearchException {
+    public ConstrainedDocumentSet narrow(Constraint constraint) throws SearchException {
         Set<Constraint> newConstraints = new HashSet<Constraint>(getConstraints());
         newConstraints.add(constraint);
-        return featuredSearch.search(queryTerm, newConstraints);
+        return featuredSearch.search(queryTerm, newConstraints, indexName);
     }
 
     @Override
-    public ConstrainedDocumentList broaden(Constraint constraint) throws SearchException {
+    public ConstrainedDocumentSet broaden(Constraint constraint) throws SearchException {
         Set<Constraint> newConstraints = new HashSet<Constraint>(getConstraints());
         newConstraints.remove(constraint);
-        return featuredSearch.search(queryTerm, newConstraints);
+        return featuredSearch.search(queryTerm, newConstraints, indexName);
     }
 }

Modified: incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java?rev=1326536&r1=1326535&r2=1326536&view=diff
==============================================================================
--- incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java (original)
+++ incubator/stanbol/branches/faceted-browsing/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java Mon Apr 16 08:58:56 2012
@@ -47,7 +47,7 @@ import org.apache.stanbol.commons.solr.m
 import org.apache.stanbol.contenthub.search.featured.util.SolrContentItemConverter;
 import org.apache.stanbol.contenthub.search.solr.util.SolrQueryUtil;
 import org.apache.stanbol.contenthub.servicesapi.search.SearchException;
-import org.apache.stanbol.contenthub.servicesapi.search.featured.ConstrainedDocumentList;
+import org.apache.stanbol.contenthub.servicesapi.search.featured.ConstrainedDocumentSet;
 import org.apache.stanbol.contenthub.servicesapi.search.featured.Constraint;
 import org.apache.stanbol.contenthub.servicesapi.search.featured.DocumentResult;
 import org.apache.stanbol.contenthub.servicesapi.search.featured.FacetResult;
@@ -57,6 +57,7 @@ import org.apache.stanbol.contenthub.ser
 import org.apache.stanbol.contenthub.servicesapi.search.related.RelatedKeywordSearchManager;
 import org.apache.stanbol.contenthub.servicesapi.search.solr.SolrSearch;
 import org.apache.stanbol.contenthub.servicesapi.store.StoreException;
+import org.apache.stanbol.contenthub.servicesapi.store.vocabulary.SolrVocabulary.SolrFieldName;
 import org.apache.stanbol.contenthub.store.solr.manager.SolrCoreManager;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
 import org.apache.stanbol.enhancer.servicesapi.ContentItemFactory;
@@ -193,35 +194,25 @@ public class FeaturedSearchImpl implemen
     }
 
     @Override
-    public ConstrainedDocumentList search(String keyword, Set<Constraint> constraints) throws SearchException {
-        SolrQuery query = SolrQueryUtil.prepareSolrQuery(keyword);
-        SolrQueryUtil.addConstraintsToSolrQuery(constraints, query);
-        List<FacetResult> allFacets = getAllFacetResults();
-        SolrQueryUtil.setFacetFields(query, allFacets);
-        QueryResponse queryResponse = solrSearch.search(query);
-        return new DefaultConstrainedDocumentList(keyword, queryResponse, constraints, this);
-    }
-
-    @Override
-    public ConstrainedDocumentList search(String keyword, Set<Constraint> constraints, String indexName) throws SearchException {
-        // TODO Auto-generated method stub
-        return null;
+    public ConstrainedDocumentSet search(String keyword, Set<Constraint> constraints) throws SearchException {
+        return performSearch(keyword, constraints, SolrCoreManager.CONTENTHUB_DEFAULT_INDEX_NAME);
     }
 
     @Override
-    public ConstrainedDocumentList search(String keyword, Set<Constraint> constraints, int offset, int limit) throws SearchException {
-        // TODO Auto-generated method stub
-        return null;
+    public ConstrainedDocumentSet search(String keyword, Set<Constraint> constraints, String indexName) throws SearchException {
+        return performSearch(keyword, constraints, indexName);
     }
 
-    @Override
-    public ConstrainedDocumentList search(String keyword,
-                                          Set<Constraint> constraints,
-                                          String indexName,
-                                          int offset,
-                                          int limit) throws SearchException {
-        // TODO Auto-generated method stub
-        return null;
+    private ConstrainedDocumentSet performSearch(String keyword, Set<Constraint> constraints, String indexName) throws SearchException {
+        SolrQuery query = SolrQueryUtil.prepareSolrQuery(keyword);
+        SolrQueryUtil.addConstraintsToSolrQuery(constraints, query);
+        List<FacetResult> allFacets = getAllFacetResults();
+        SolrQueryUtil.setFacetFields(query, allFacets);
+        query.setRows(Integer.MAX_VALUE);
+        query.setFields(SolrFieldName.ID.toString(), SolrFieldName.ENHANCEMENTCOUNT.toString(),
+            SolrFieldName.TITLE.toString(), SolrFieldName.MIMETYPE.toString());
+        QueryResponse queryResponse = solrSearch.search(query);
+        return new DefaultConstrainedDocumentSet(keyword, queryResponse, constraints, indexName, this);
     }
 
     @Override

Copied: incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentSet.java (from r1325800, incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentList.java)
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentSet.java?p2=incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentSet.java&p1=incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentList.java&r1=1325800&r2=1326536&rev=1326536&view=diff
==============================================================================
--- incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentList.java (original)
+++ incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/ConstrainedDocumentSet.java Mon Apr 16 08:58:56 2012
@@ -18,16 +18,15 @@ package org.apache.stanbol.contenthub.se
 import java.util.List;
 import java.util.Set;
 
-import org.apache.clerezza.rdf.core.UriRef;
 import org.apache.stanbol.contenthub.servicesapi.search.SearchException;
 
 /**
  * A set of documents that can be narrowed by applying {@link Constraint}s that are grouped by {@link Facet}s.
  * Instances of this class are immutable, narrowing and broadening return new instances.
  */
-public interface ConstrainedDocumentList {
+public interface ConstrainedDocumentSet {
     /**
-     * Returns the documents contained in this {@link ConstrainedDocumentList}. There is no defined order of
+     * Returns the documents contained in this {@link ConstrainedDocumentSet}. There is no defined order of
      * the list, but implementations should keep the order stable as too allow stateless pagination.
      * 
      * Implementations may populate the list just when the respective elements are accessed and implement
@@ -36,10 +35,10 @@ public interface ConstrainedDocumentList
      * match the actual number of elements when iterating throw it at a later point in time. The iterate() as
      * well as the subList(int,int) method are safe.
      * 
-     * @return the documents included in this {@link ConstrainedDocumentList}
+     * @return the documents included in this {@link ConstrainedDocumentSet}
      * @throws SearchException
      */
-    List<UriRef> getDocuments() throws SearchException;
+    List<DocumentResult> getDocuments() throws SearchException;
 
     /**
      * This method returns the {@link Set} of {@link Constraint}s which have been used to obtain the documents
@@ -53,7 +52,7 @@ public interface ConstrainedDocumentList
      * This method returns all possible {@link Facet}s together with all their possible {@link Constraint}s
      * that can be used to filter documents included in this set.
      * 
-     * @return the {@link Facet}s by which this {@link ConstrainedDocumentList} can be restricted.
+     * @return the {@link Facet}s by which this {@link ConstrainedDocumentSet} can be restricted.
      */
     Set<Facet> getFacets();
 
@@ -63,27 +62,27 @@ public interface ConstrainedDocumentList
      * 
      * <code>narrow(additionalConstraint).getDocuments().size()</code>
      * 
-     * Creates a new {@link ConstrainedDocumentList} with the new set of {@link Constraint} which is formed by
+     * Creates a new {@link ConstrainedDocumentSet} with the new set of {@link Constraint} which is formed by
      * adding the specified <code>constraint</code> the constraint set returned by {@link #getConstraints()}.
      * 
      * @param constraint
      *            the additional {@link Constraint} to apply
-     * @return the restricted {@link ConstrainedDocumentList} by applying the given additional
+     * @return the restricted {@link ConstrainedDocumentSet} by applying the given additional
      *         <code>constraint</code>
      * @throws SearchException
      */
-    ConstrainedDocumentList narrow(Constraint constraint) throws SearchException;
+    ConstrainedDocumentSet narrow(Constraint constraint) throws SearchException;
 
     /**
-     * Creates a new {@link ConstrainedDocumentList} with the new set of {@link Constraint}s which is formed by
+     * Creates a new {@link ConstrainedDocumentSet} with the new set of {@link Constraint}s which is formed by
      * removing the specified <code>constraint</code> from the constraint set returned by
      * {@link #getConstraints()}.
      * 
      * @param constraint
      *            the {@link Constraint} which must be member of the set returned by {@link #getConstraints()}
-     * @return the broadened {@link ConstrainedDocumentList} by removing the given <code>constraint</code>.
+     * @return the broadened {@link ConstrainedDocumentSet} by removing the given <code>constraint</code>.
      * @throws SearchException
      */
-    ConstrainedDocumentList broaden(Constraint constraint) throws SearchException;
+    ConstrainedDocumentSet broaden(Constraint constraint) throws SearchException;
 
 }

Modified: incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/Facet.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/Facet.java?rev=1326536&r1=1326535&r2=1326536&view=diff
==============================================================================
--- incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/Facet.java (original)
+++ incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/Facet.java Mon Apr 16 08:58:56 2012
@@ -19,7 +19,7 @@ import java.util.Locale;
 import java.util.Set;
 
 /**
- * A {@link Facet} is an aspect by which the {@link ConstrainedDocumentList} can be narrowed. Facets correspond
+ * A {@link Facet} is an aspect by which the {@link ConstrainedDocumentSet} can be narrowed. Facets correspond
  * to properties of documents and they are used in the search operations in {@link FeaturedSearch} of
  * Contenthub. Facets are considered as equal if their default labels are the same. Default labels of facets
  * are obtained by providing <code>null</code> to {@link #getLabel(Locale)}.

Modified: incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/FeaturedSearch.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/FeaturedSearch.java?rev=1326536&r1=1326535&r2=1326536&view=diff
==============================================================================
--- incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/FeaturedSearch.java (original)
+++ incubator/stanbol/branches/faceted-browsing/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/featured/FeaturedSearch.java Mon Apr 16 08:58:56 2012
@@ -116,9 +116,9 @@ public interface FeaturedSearch {
 
     /**
      * This method searches the given <code>keyword</code> in the default index of Contenthub considering the
-     * given <code>constraints</code>. Results are returned in a {@link ConstrainedDocumentList} instance and
+     * given <code>constraints</code>. Results are returned in a {@link ConstrainedDocumentSet} instance and
      * all search results are returned without considering any <i>offset</i> or <i>limit</i> value.
-     * Furthermore, returned {@link ConstrainedDocumentList} contains {@link Constraint}s that were used to
+     * Furthermore, returned {@link ConstrainedDocumentSet} contains {@link Constraint}s that were used to
      * filter the results and all possible {@link Facet}s that can be used to filter results even more.
      * 
      * @param keyword
@@ -126,17 +126,17 @@ public interface FeaturedSearch {
      * @param constraints
      *            a {@link Set} of {@link Constraint}s to be provided in addition to initial query
      *            <code>keyword</code>
-     * @return an instance of {@link ConstrainedDocumentList} including the search results and additional
+     * @return an instance of {@link ConstrainedDocumentSet} including the search results and additional
      *         {@link Constraint} and {@link Facet} information.
      * @throws SearchException
      */
-    ConstrainedDocumentList search(String keyword, Set<Constraint> constraints) throws SearchException;
+    ConstrainedDocumentSet search(String keyword, Set<Constraint> constraints) throws SearchException;
 
     /**
      * This method searches the given <code>keyword</code> in the Solr index identified by the given
      * <code>indexName</code> considering the given <code>constraints</code>. Results are returned in a
-     * {@link ConstrainedDocumentList} instance and all search results are returned without considering any
-     * <i>offset</i> or <i>limit</i> value. Furthermore, returned {@link ConstrainedDocumentList} contains
+     * {@link ConstrainedDocumentSet} instance and all search results are returned without considering any
+     * <i>offset</i> or <i>limit</i> value. Furthermore, returned {@link ConstrainedDocumentSet} contains
      * {@link Constraint}s that were used to filter the results and all possible {@link Facet}s that can be
      * used to filter results even more.
      * 
@@ -147,67 +147,11 @@ public interface FeaturedSearch {
      *            <code>keyword</code>
      * @param indexName
      *            name of the index (Solr core) on which search will be done
-     * @return an instance of {@link ConstrainedDocumentList} including the search results and additional
+     * @return an instance of {@link ConstrainedDocumentSet} including the search results and additional
      *         {@link Constraint} and {@link Facet} information.
      * @throws SearchException
      */
-    ConstrainedDocumentList search(String keyword, Set<Constraint> constraints, String indexName) throws SearchException;
-
-    /**
-     * This method searches the given <code>keyword</code> in the default index of Contenthub considering the
-     * given <code>constraints</code>. Results are returned in a {@link ConstrainedDocumentList} instance and
-     * search results are selected according to given <code>offset</code> and <code>limit</code> parameters.
-     * This allows pagination on the search results. Furthermore, returned {@link ConstrainedDocumentList}
-     * contains {@link Constraint}s that were used to filter the results and all possible {@link Facet}s that
-     * can be used to filter results even more.
-     * 
-     * @param keyword
-     *            keyword to be searched
-     * @param constraints
-     *            a {@link Set} of {@link Constraint}s to be provided in addition to initial query
-     *            <code>keyword</code>
-     * @param offset
-     *            a subset of all search results for the given <code>keyword</code> and
-     *            <code>constraints</code> is obtained starting from this value.
-     * @param limit
-     *            a subset having the size of this value of all search results for the given
-     *            <code>keyword</code> and <code>constraints</code> is obtained starting from
-     *            <code>offset</code>.
-     * @return an instance of {@link ConstrainedDocumentList} including the search results and additional
-     *         {@link Constraint} and {@link Facet} information.
-     * @throws SearchException
-     */
-    ConstrainedDocumentList search(String keyword, Set<Constraint> constraints, int offset, int limit) throws SearchException;
-
-    /**
-     * This method searches the given <code>keyword</code> in the Solr index identified by the given
-     * <code>indexName</code> considering the given <code>constraints</code>. Results are returned in a
-     * {@link ConstrainedDocumentList} instance and search results are selected according to given
-     * <code>offset</code> and <code>limit</code> parameters. This allows pagination on the search results.
-     * Furthermore, returned {@link ConstrainedDocumentList} contains {@link Constraint}s that were used to
-     * filter the results and all possible {@link Facet}s that can be used to filter results even more.
-     * 
-     * @param keyword
-     *            keyword to be searched
-     * @param constraints
-     *            a {@link Set} of {@link Constraint}s to be provided in addition to initial query
-     *            <code>keyword</code>
-     * @param offset
-     *            a subset of all search results for the given <code>keyword</code> and
-     *            <code>constraints</code> is obtained starting from this value.
-     * @param limit
-     *            a subset having the size of this value of all search results for the given
-     *            <code>keyword</code> and <code>constraints</code> is obtained starting from
-     *            <code>offset</code>.
-     * @return an instance of {@link ConstrainedDocumentList} including the search results and additional
-     *         {@link Constraint} and {@link Facet} information.
-     * @throws SearchException
-     */
-    ConstrainedDocumentList search(String keyword,
-                                  Set<Constraint> constraints,
-                                  String indexName,
-                                  int offset,
-                                  int limit) throws SearchException;
+    ConstrainedDocumentSet search(String keyword, Set<Constraint> constraints, String indexName) throws SearchException;
 
     /**
      * This method obtains the available field names of the default index of Contenthub.