From: Lars B. <L.J...@uv...> - 2011-11-24 16:01:50
|
Hi all, Beginner's question. I'm trying to do full-text search in EXist 1.4 using Lucene (ft:query). I have a text collect and a working index. The following returns a proper sequence of hits: let $scope := collection('/db/documents')//scene return $scope[ft:query(., $query)] But now I want to narrow my search down to only include documents having a certain type, so I restrict $scope with a predicate. let $scope := collection('/db/documents')/root[.//house[@type eq "commons"]//scene return $scope[ft:query(., $query)] Now I get only hits from the House of Commons, but I also get false hits for all <scene> elements that have the same parent as a true hit. Am I doing something wrong in my XPath? TIA, -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam |