Hi Marcus, this is because `ft:search` can scan the index directly, `contains text` needs to construct some objects before. `ft:search` doesn't return strings but text nodes, so you can use a parent axis step to get the containing node: ft:search($x, 'double')/parent::node() Kind regards from Lake Constance, Germany, Jens -- Jens Erat [phone]: tel:+49-151-56961126 [mail]: mailto:email@jenserat.de [jabber]: xmpp:jabber@jenserat.de [web]: http://www.jenserat.de PGP: 350E D9B6 9ADC 2DED F5F2 8549 CBC2 613C D745 722B Am 19.09.2012 um 10:22 schrieb <basex@phpexpert.net>:
My searches are
<no>{let $quasi := (for $x in /record where ft:search($x, 'double') and ($x/item[@name="STATUS"]/value/string() = "edited") return <quasi>{data($x/@id)}<content>{$x//value[text() contains text 'double']}</content></quasi>) return $quasi }</no>
<no>{let $quasi := (for $x in /record where ($x//value[text() contains text 'double']) and ($x/item[@name="STATUS"]/value/string() = "edited") return <quasi>{data($x/@id)}<content>{$x//value[text() contains text 'double']}</content></quasi>) return $quasi }</no>
These searches take a lot of time (about 300 seconds) cause of nearly 600.000 objects (about 4 GB data) to search through
A Fulltext search wich only delivers the textnodes only takes 2 seconds to deliver text results
On Wed, 19 Sep 2012 09:55:50 +0200, Jens Erat <jens.erat@uni-konstanz.de> wrote:
Hi Marcus,
`ft:search(…)` is built for returning text nodes, have a look at the [documentation]. If you want to get the nodes, you should use the more general [full text expressions].
If you need help transforming your query, would you please paste your query (or better: the full text search relevant part of it)?
Regards, Jens
[documentation]: http://docs.basex.org/wiki/Full-Text_Module#ft:search [full text expressions]: http://docs.basex.org/wiki/Full-Text
-- Jens Erat
[phone]: tel:+49-151-56961126 [mail]: mailto:email@jenserat.de [jabber]: xmpp:jabber@jenserat.de [web]: http://www.jenserat.de
PGP: 350E D9B6 9ADC 2DED F5F2 8549 CBC2 613C D745 722B
Am 19.09.2012 um 09:33 schrieb <basex@phpexpert.net>:
Hi @all,
is there a way if i use ft:search on the database to get the nodes of results back instead of just the results?
Regards
Marcus
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
participants (1)
-
Jens Erat