full-text index available for attributes (is 'contains' applicable to attributes)?

Friday, 9 July 2010 · 2 messages
PS
Patrick Schäfer9 Jul 2010 14:22 #
Hi, I wonder if the full-text index is also available to attribute nodes: XQuery-Expression:
for $i in //*:identifier[contains(@*:value,'nc1n2[C@H]')]
     return $i
Query executed in 4106.57 ms. I also tried:
for $i in //*:identifier[@*:value contains text 'nc1n2[C@H]']
     return $i
Query executed in 22350.34 ms. The full-test was activated using the console:
Quoted text · 1 line
> create index fulltext
Index created in 562.23 ms.
Quoted text · 1 line
> OPTIMIZE
Database optimized in 27349.05 ms.
Quoted text · 1 line
> SET FTINDEX
Full-Text Index: ON Thank you Patrick
CG
Christian Grün9 Jul 2010 14:28 #
Quoted text · Patrick Schäfer · 1 line
> I wonder if the full-text index is also available to attribute nodes:
Unfortunately it's not; as most queries we know are based on text nodes, we decided to skip attribute full-text requests. Note, however, that special characters, such as "[", are ignored anyway.
Quoted text · Patrick Schäfer · 7 lines
> The full-test was activated using the console: >> create index fulltext > Index created in 562.23 ms. >> OPTIMIZE > Database optimized in 27349.05 ms. >> SET FTINDEX > Full-Text Index: ON
Just as a hint (the documentation is very sparse on that): optimize is only needed after database updates. If FTINDEX is set to ON, all subsequent database creations will include fulltext indexing. Christian

⚡Generated with XQuery