From: José M. F. G. <jmf...@cn...> - 2008-12-16 14:23:53
|
Hi Clifford, from you have written and the results you have shown, it seems that only the last node from the sequence passed to ft:query is taken into account for the query, or even worse, only the results sequence from the last node from the sequence passed to ft:query is returned. Best Regards, José María Clifford Wulfman wrote: > The new ft:query() function does not seem to handle lists of nodes > correctly. Consider the following db: > > <animals> > <animal> > <name>house mouse</name> > <food>grain</food> > </animal> > <animal> > <name>wood mouse</name> > <food>grain</food> > </animal> > <animal> > <name>cat</name> > <food>mouse</food> > </animal> > <animal> > <name>dog</name> > <food>stuff</food> > </animal> > </animals> > > and the following collection.xconf: > > <collection xmlns="http://exist-db.org/collection-config/1.0"> > <index> > <fulltext default="none" attributes="no"/> > <lucene> > <analyzer > class="org.apache.lucene.analysis.standard.StandardAnalyzer"/> > <text qname="food"/> > <text qname="name"/> > </lucene> > </index> > </collection> > > The following queries work as expected: > > collection('/db/test')/animals/animal[ft:query(name, 'mouse')] > <animal> > <name>house mouse</name> > <food>grain</food> > </animal> > <animal> > <name>wood mouse</name> > <food>grain</food> > </animal> > > collection('/db/test')/animals/animal[ft:query(food, 'mouse')] > <animal> > <name>cat</name> > <food>mouse</food> > </animal> > > > > But these do not: > > collection('/db/test')/animals/animal[ft:query((food,name), 'mouse')] > <animal> > <name>house mouse</name> > <food>grain</food> > </animal> > <animal> > <name>wood mouse</name> > <food>grain</food> > </animal> > > collection('/db/test')/animals/animal[ft:query((name,food), 'mouse')] > <animal> > <name>cat</name> > <food>mouse</food> > </animal> > > Am I missing something? > > > Clifford E. Wulfman > Coordinator of Library Digital Initiatives > Princeton University Library > cwulfman@Princeton.EDU <mailto:cwulfman@Princeton.EDU> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open -- "There is no reason why anybody would want a computer in their home" - Ken Olson, founder of DEC 1977 "640K ought to be enough for anybody" - Bill Gates, 1981 "Nobody will ever outgrow a 20Mb hard drive." - ??? "Premature optimization is the root of all evil." - Donald Knuth José María Fernández González Tlfn: (+34) 91 732 80 00 / 91 224 69 00 (ext 3061) e-mail: jmf...@cn... Fax: (+34) 91 224 69 76 Unidad del Instituto Nacional de Bioinformática Biología Estructural y Biocomputación Structural Biology and Biocomputing Centro Nacional de Investigaciones Oncológicas C.P.: 28029 Zip Code: 28029 C/. Melchor Fernández Almagro, 3 Madrid (Spain) **NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido. **CONFIDENTIALITY NOTICE** This email communication and any attachments may contain confidential and privileged information for the sole use of the designated recipient named above. Distribution, reproduction or any other use of this transmission by any party other than the intended recipient is prohibited. If you are not the intended recipient please contact the sender and delete all copies. |