How to optimize a query in Tamino

Hi.
We are sending the folowing query:

/schema/field [/field]

where field is an optional label with no value. But, this query is not optimal (it uses postprocessor).

We’ve notices this one uses postprocessor too:
/schema/field [/field=""]
But this one, not:
/schema/field [/field=" "] (blank space)

The problem is that last one doesn’t return correct results (label has no value).

Does anyone how to make and optimal and correct query under these circustamces?

Thanks.

Hello Jim,

could you please tell us which version of Tamino you are using, and post the schema?

My first thought is that using a Structure Index is the right solution for this.
(Please see Harald’s posting here.)

Greetings,
Trevor.

As far as I understand this XPath stuff, filter [/field] means that you select documents with root element field? Is that really what you want?

I can only guess what your query is supposed to mean: my guess is:

/schema/field[.=""]

A predicate like [/field=""] doesn’t depend on the current node, and is therefore almost always wrong.

Michael Kay