From: Dominic L. <dom...@gm...> - 2018-10-04 09:43:57
|
Dear Adam, Thanks for your help. The comments in the TEI express the tests e.g. <!-- this should get indexed --> <!-- this should not get indexed -- attribute name ns does not match --> I think the question is how to express that as a test in exist i.e. that a particular text node has been indexed. Does that make sense? With best wishes, Dominic On Wed, 3 Oct 2018 at 09:43, Adam Retter <ad...@ex...> wrote: > > Erm... you don't say what you are trying to test exactly? > > On Wed, 3 Oct 2018 at 12:59, Stanislav <st...@gm...> wrote: > >> Hi guys, >> >> A test case is required for the code that implements: >> "Allow more elaborate XPath expressions in the Lucene index spec in >> collection.xconf" (#2169) >> >> and I have trouble understanding how existing indexing tests do work (and >> I am a bit tired of reverse-engineering) >> It would be great if someone familiar with the matter could give me a >> hand here: >> >> *The collection.xconf should be like this:* >> <collection xmlns="http://exist-db.org/collection-config/1.0"> >> <index xmlns:tei="http://www.tei-c.org/ns/1.0"> >> <!-- Lucene indexes --> >> <lucene diacritics="no"> >> <analyzer >> class="org.apache.lucene.analysis.standard.StandardAnalyzer"/> >> <text field="title" match="//tei:title[@xml:lang='Sa-Ltn']" >> boost="2.0"/> >> </lucene> >> </index> >> </collection> >> >> *While the document being indexed should be like this:* >> <?xml-model href="../schema/1.0/tei.rng" schematypens=" >> http://relaxng.org/ns/structure/1.0"?> >> <TEI xmlns="http://www.tei-c.org/ns/1.0"> >> <teiHeader> >> <title type="longTitle" xml:lang="Sa-Ltn">Buick</title> <!-- this >> should get indexed --> >> <title type="longTitle" lang="Sa-Ltn">Cadillac</title> <!-- >> this should not get indexed -- attribute name ns does not match --> >> <title type="longTitle" xml:lang="En"> Ford</title> <!-- this >> should not get indexed -- attribute value does not match --> >> <title type="longTitle"> Dodge >> </title> <!-- this should not get indexed -- attribute is entirely missing >> --> >> </teiHeader> >> </TEI> >> >> >> Kind regards, >> /St. >> >> _______________________________________________ >> Exist-development mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-development >> > > > -- > Adam Retter > > eXist Core Developer > { United Kingdom / United States } > ad...@ex... > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |