When is structure index created?

I’m indexing XML content for the first time. I updated an existing schema by setting structuredIndex to full at the doctype level. XML instances already exist in the doctype. I deleted and re-imported all XML instances but my queries do not run any faster. In case it matter, my queries are against the attributes of one element that occurs only once in every XML instance.

When does the XML actually get indexed? How can I tell if the instances have been indexed?

Thanks everyone,

Allen

Hi Alan,

After defining an index it should be available. The question is how does your query look like and what kind of index have you defined on your attribute?

Best Regards,

Thorsten

Throsten,

Here is my XQL query:
//GEM-TAMINO-METADATA[@filename~=“*” and @qid~=“oracle_wip” and @current~=“1”]

Currently, I have structureIndex=full at the doctype level and no indexing set on the GEM-TAMINO-METADATA element or any of it’s attributes. I assumed that setting indexing at the doctype level would index all elements and attributes in instances in that doctype including those not defined in the schema. The schema does not define the GEM-TAMINO-METADATA element (it’s very open).

I realize I am using the full text operator (~) but changing the query to the following did not reduce the response time:
//GEM-TAMINO-METADATA

Any guidance is greatly appreciated.

Allen

Hi Allen,

Unfortunately “full” structure does not mean any performance advantage for your text search predicates. The full structure index can only improve the performance of existence checks. For example the query:

//GEM-TAMINO-METADATA[@filename]

should show a performance improvement if most of the documents do not contain a “filename” attribute as part of a “GEM-TAMINO-METADATA” element.

To improve the performance of text search predicates text indexes are necessary. Due to the fact that you schema is “very open” you may have to define it on the doctype level. But performance improvements will be only shown if your text search predicate is looking for a word that is not contained in every document.

Best Regards,

Thorsten