Nuxeo 5

Nuxeo 5 Component
org.nuxeo.ecm.core.search.api.client.querymodel.QueryModelService

Individual Documentation Coverage

done proportion
100.0 %


The QueryModel service registers QueryModelDescriptor instances that
are used by the QueryModelActionsBean to build QueryModel instances
upon requests.

A QueryModel is used to perform NXQL queries on the core with search
parameters set dynamically. They come in two flavors: stateless and
stateful query models:

- Stateless query models are described by a patterned query and the
dynamic parameters are provided as an array by the caller of the
``getDocument(Object[] params)`` method. See the default
"/user_dashboard.xhtml" view for sample usage.

- Stateful query models use an internal non persistent DocumentModel
instance to store use editable parameters. Thus the
``getDocument()`` does not take any parameters since they are read
from the document model instead. The interpretation of the
parameters follow a structure defined by the ``whereClause``
attribute of the QueryModelDescriptor class. A parameter *name* can occur
several times, possibly with different values within a single where clause.

Among other things, it's possible to register an escaper to configure
which special characters should be escaped in fulltext-like fields (
"escaper" attribute) for STATEFUL query models.

Stateless ones are usually handled by some applicative code that
can take care of this. This typically depends on both the search backend and
the behaviour expected by the end user.




Author: Olivier Grisel ([email protected])

Version: missing

Location: nuxeo-services/nuxeo-platform-search-api/src/main/resources/OSGI-INF/querymodel-framework.xml

Require

No requirements

Required by

Not required

Implementation


Extension Points:

model


Registry for QueryModelDescriptor instances.


Author: Olivier Grisel ([email protected])


Has contribution from:

Last generation: 18:21:25 CEST 11/07/2009