From: Ariel L. <ar...@ho...> - 2006-02-08 18:20:12
|
Hi All, i have some questions about the way indexation can be made in = exist. 1) can I specify the order the elements must be indexed? Let's consider = we have=20 DATA: <tag> <subtag code=3D"a">AAAAA</subtag> <subtag code=3D"b">BBBBB</subtag> <subtag code=3D"b">CCCCC</subtag> <subtag code=3D"c">DDDDD</subtag> </tag> Currently I can find the string "AAAAABBBBB" with the next query //tag[(subtag[(@code=3D'a') or (@code=3D'b')]) and = contains(.,"AAAAABBBBB")] But i must find "AAAAACCCCC", "AAAAADDDDD" and "BBBBBAAAAA" too. It's like an incomplete catessian product between subtag elements.=20 There is a way to do this? 2) Wich of the next queries is the best (in efficiency)? All queries = give the same results //tag[contains(.[(subtag/@code=3D'a') or = (subtag/@code=3D'b')],"AAAAABBBBB")] //tag[((subtag/@code=3D'a') or (subtag/@code=3D'b')) and = contains(.,"AAAAABBBBB")] //tag[(subtag[(@code=3D'a') or (@code=3D'b')]) and = contains(.,"AAAAABBBBB")] 3) I'm using latin characters in xml files, but searches must be = insensible to accents.=20 If i search "caf=E9" matches must be "caf=E9", "cafe", "caf=E8", = "caf=EB", etc. I can transform the search term to a String without accents and always search for = "cafe", while the=20 original search expression be "caf=E9", "cafe" or "caf=E8". But I still = cant retrive "caf=E9".=20 The best solution could be remove accents from words in index time, so = index will recognize only "cafe". Any answers will be appreciated. Thanks in advance Ariel Lira |