| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<component name="org.nuxeo.ecm.core.search.api.client.querymodel.QueryModelService"> |
|---|
| 4 |
<implementation |
|---|
| 5 |
class="org.nuxeo.ecm.core.search.api.client.querymodel.QueryModelService" /> |
|---|
| 6 |
|
|---|
| 7 |
<documentation> |
|---|
| 8 |
The QueryModel service registers QueryModelDescriptor instances that |
|---|
| 9 |
are used by the QueryModelActionsBean to build QueryModel instances |
|---|
| 10 |
upon requests. |
|---|
| 11 |
|
|---|
| 12 |
A QueryModel is used to perform NXQL queries on the core with search |
|---|
| 13 |
parameters set dynamically. They come in two flavors: stateless and |
|---|
| 14 |
stateful query models: |
|---|
| 15 |
|
|---|
| 16 |
- Stateless query models are described by a patterned query and the |
|---|
| 17 |
dynamic parameters are provided as an array by the caller of the |
|---|
| 18 |
``getDocument(Object[] params)`` method. See the default |
|---|
| 19 |
"/user_dashboard.xhtml" view for sample usage. |
|---|
| 20 |
|
|---|
| 21 |
- Stateful query models use an internal non persistent DocumentModel |
|---|
| 22 |
instance to store use editable parameters. Thus the |
|---|
| 23 |
``getDocument()`` does not take any parameters since they are read |
|---|
| 24 |
from the document model instead. The interpretation of the |
|---|
| 25 |
parameters follow a structure defined by the ``whereClause`` |
|---|
| 26 |
attribute of the QueryModelDescriptor class. A parameter *name* can occur |
|---|
| 27 |
several times, possibly with different values within a single where clause. |
|---|
| 28 |
|
|---|
| 29 |
Among other things, it's possible to register an escaper to configure |
|---|
| 30 |
which special characters should be escaped in fulltext-like fields ( |
|---|
| 31 |
"escaper" attribute) for STATEFUL query models. |
|---|
| 32 |
|
|---|
| 33 |
Stateless ones are usually handled by some applicative code that |
|---|
| 34 |
can take care of this. This typically depends on both the search backend and |
|---|
| 35 |
the behaviour expected by the end user. |
|---|
| 36 |
|
|---|
| 37 |
@author Olivier Grisel (og@nuxeo.com) |
|---|
| 38 |
</documentation> |
|---|
| 39 |
|
|---|
| 40 |
<extension-point name="model"> |
|---|
| 41 |
<object |
|---|
| 42 |
class="org.nuxeo.ecm.core.search.api.client.querymodel.descriptor.QueryModelDescriptor" /> |
|---|
| 43 |
<documentation> |
|---|
| 44 |
Registry for QueryModelDescriptor instances. |
|---|
| 45 |
|
|---|
| 46 |
@author Olivier Grisel (og@nuxeo.com) |
|---|
| 47 |
</documentation> |
|---|
| 48 |
</extension-point> |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
</component> |
|---|