yet another fulltext question
I'm looking for a performant way to look up fulltext information in a collection of image descriptions.
The db / document contains less than 10.000 items. The structure is easy:
<bilder> <bild> <InterneId/> <titel/> <kuenstler> <person/> </kuenstler> <datierung/> <dargestellte_person/> ... <widmung></widmung> <beschreibung></beschreibung> </bild> <bild/> <bild/> ... </bilder>
When trying to get the title ('titel') of all nodes that contain a search string 'mag' i get the following:
doc('bilder')/bilder/bild[text() contains text 'mag' ]/titel no result
doc('bilder')/bilder/bild[. contains text 'mag' ]/titel 18 Hits Query Time about -> 950 ms
the following query produces the same result but is much faster ft:search(doc('bilder'),'mag')/ancestor::*[local-name(.) = 'bild']/titel 18 Hits Query Time less than -> 3 ms
Can i say that one should prefer ft:search then climbing the ancestor axis over the 'contains text'. The documentations says the 'contains text' is processed using the fulltext index. If so, how can this performance diffrence be explained?
TIA
-- Manfred Knobloch - Medientechnik -
Leibniz-Institut für Wissensmedien IWM - Knowledge Media Research Center (KMRC) Schleichstraße 6 | 72076 Tübingen Fon: +49 7071 979-340 Internet: http://www.iwm-kmrc.de/m.knobloch