Daisy documentation
 PreviousHomeNext 
4.12.21 p:performFacetedQueryBook Index4.12.23 p:performWorkflowQuery

4.12.22 p:performQuery

Returns the result of executing a query.

4.12.22.1 Request

Syntax:

<p:performQuery>
  <p:query>select ... where ... order by ...</p:query>

  [ optional elements: ]
  <p:extraConditions>...</p:extraConditions>
  <p:document>...</p:document>

</p:performQuery>

If there is a context document available (i.e. if this p:performQuery is used inside a p:document) then the ContextDoc function can be used in the query.

The optional p:extraConditions element specifies additional conditions that will be AND-ed with those in the where clause of the query. This feature is not often needed. It can be useful when you let the user enter a free query but want to enforce some condition, e.g. limit the documents to a certain collection.

The optional p:document element can contain publisher instructions that will be performed for each row in the query result set, their result of them will be inserted as child elements of the row elements. On each result set row, the document corresponding to the row is pushed as context document. This functionality is similar to what can be done with p:forEach, but has the advantage that information about the query such as chunk offset and size stays available.

4.12.22.2 Response

The result of a query is a d:searchResult element.

 PreviousHomeNext 
4.12.21 p:performFacetedQuery4.12.23 p:performWorkflowQuery