Commit 0cc6751e authored by Oscar Scholten's avatar Oscar Scholten

CMS-9906 Adding JavaDoc capturing expected behavior when using...

CMS-9906 Adding JavaDoc capturing expected behavior when using returnParentNode in combination with sorting or property selection
parent 894fede4
......@@ -19,12 +19,27 @@ public interface Query {
public Query EMPTY = new EmptyQuery();
/**
* Instructs the search service to return the de-duplicated set of parent nodes of the search results. This is
* very convenient to obtain a set of all handles that have at least one variant that matches the queries
* constraints. Note that properties selected using {@link TypedQuery#select(java.lang.String)} and properties
* used for sorting using {@link #orderBy(java.lang.String)} must be at the parent's level.
*
* @return this query object
*/
Query returnParentNode();
Query offsetBy(int offset);
Query limitTo(int limit);
/**
* Instructs the search service to sort the result using the given property. See also the note at
* {@link #returnParentNode()} when used in combination with that setting.
*
* @param property name of property to sort on
* @return this query object
*/
OrderClause orderBy(String property);
}
......
......@@ -15,9 +15,18 @@
*/
package org.onehippo.cms7.services.search.query;
import org.onehippo.cms7.services.search.document.FieldsDocument;
import org.onehippo.cms7.services.search.query.steps.WhereStep;
public interface TypedQuery extends Query, WhereStep {
/**
* Instructs the search service to collect for each matching document the given property. These properties can be
* read from the result set using {@link FieldsDocument#getFieldValue(java.lang.String)}. See also the note at
* {@link Query#returnParentNode()} when used in combination with that setting.
*
* @param property name of property to collect
* @return this query object
*/
SelectClause select(String property);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment