From: Marcus <StM...@gm...> - 2007-06-18 14:23:32
|
Hi, thanks for that detailed answer. To your question: That was only i little snip of the regular xml-tree. Indeed there are = many "text-nodes" that keep little texts, also inhabit embedded html. So = the content of <Inhalt> could be i.e.: <p>[M 1] Item ein predigpuch; das helt in im <a href=3D"#mbk-1"/><a = href=3D"/xxx/yyy/1">die au=DFlegung der<img id=3D"mbk-1" = src=3D"/apps/images/info.gif" class=3D" xforms-help-image"><label = class=3D" xforms-help" for=3D"mbk-1">der vor acht selikeyt verbessert = aus die. </label> acht selikeyt</a> und <a href=3D"#mbk-2"/><a = href=3D"/xxx/yyy/2">XV grad rechter gedult</a> und <a = href=3D"#mbk-3"/><a href=3D"/xxx/yyy/3">XV czaichen rechter = diemutikeyt</a> und <a href=3D"#mbk-4"/><a href=3D"/xxx/yyy/4">die = au=DFlegung des engelischen gru=DF</a></p> Of course in the doc it is saved as "<p>[M 1] Item ein predigpuch; = ... &/lt;a>&/lt;p>" And i do need ways not only to search for singel terms, but also = phrases, which you normaly would enter as "Test abc" in Google i.e.=20 Hope that makes my point a bit clearer to you? Regards, Marcus PS: While you used "Gelbe Seiten" as example, in privat you can write = german, that would make things a bit easier for me as my english istn't = so well i suppose :-) ----- Original Message -----=20 From: Oystein Reigem=20 To: Marcus=20 Cc: Exi...@li...=20 Sent: Monday, June 18, 2007 4:06 PM Subject: Re: [Exist-open] Textsearch Problems :-( Marcus, Marcus wrote:=20 Hi,=20 i have some difficulties to get the right xquery for my search i = think, but while i don't know much about the internal machanism, i need = your help with that! Here is my sample data: ----------------------------------- <data> <KatEintrag> <KatID>10</KatID> <Inhalt>Test</Inhalt> <Referenz>Test</Referenz> <Apparat>abc</Apparat> </KatEintrag> <KatEintrag> <KatID>13</KatID> <Inhalt>Test abc</Inhalt> <Referenz>Test</Referenz> <Apparat>dfg</Apparat> </KatEintrag> </data> My Query: --------------- let $hits :=3D = collection('/db/test/')//KatEintrag[text:match-all(.,"Test abc")] match-all() does a fulltext search. I.e, it searches for words. Correct syntax is match-all(.,"Test ", "abc") with one parameter per = word, and not match-all(.,"Test abc"). (Note that match-all() only searches elements that are fulltext = indexed. By default everything is fulltext indexed, though.) (Note also that the parameters of match-all() are regular = expressions.) But is it really a fulltext search (word search) you need? What kind = of data does your <Inhalt> element contain? Is it phrases (e.g, like = 'Gelbe Seiten')? Or is it sets or strings of independent words that = represent independent and separate values (e.g, like 'Gelb Rot Grau')? - =D8ystein - for $hit in $hits return $hit But i get nothing back :-( How can i query for word-groups that = belong together? Or can i achiev querying for words with a specific word-distance? = i.e. 0 words between "Test" and "abc"? If that is possible, please tell me how :-( I need such queries, so i need to find a way! Thanks a lot,=20 Marcus -------------------------------------------------------------------------= --- -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/-------------------------------------= --------------------------------------- _______________________________________________ Exist-open mailing list Exi...@li... https://lists.sourceforge.net/lists/listinfo/exist-open =20 --=20 =D8ystein Reigem, The department of culture, language and information = technology (Aksis), Allegt 27, N-5007 Bergen, Norway. Tel: +47 55 58 32 = 42. Fax: +47 55 58 94 70. E-mail: <oys...@ak...>. Home = tel: +47 56 14 06 11. Mobile: +47 97 16 96 64. Home e-mail: = <or...@br...>. Aksis home page: <www.aksis.uib.no>. -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ -------------------------------------------------------------------------= ----- _______________________________________________ Exist-open mailing list Exi...@li... https://lists.sourceforge.net/lists/listinfo/exist-open |