From: Stanislav <st...@gm...> - 2018-10-05 14:23:17
|
Ok, I've crafted a basic test case and it does not work (not sure if it is the test that is wrong or the code tested that is wrong) Could someone knowledgeable in LuceneIndexTest(s) take a look at the test that I just added and tell me why it fails: https://github.com/eXist-db/exist/pull/2169/commits/39896b258b34571e4e264c46e4759b6ed14292ce /St. On Thu, Oct 4, 2018 at 6:43 PM Stanislav <st...@gm...> wrote: > Exactly - as Dom has explained it. > (Excuse me for not making myself clearer) > > /Stanislav > > On Thu, 4 Oct 2018 at 12:43, Dominic Latham <dom...@gm...> > wrote: > >> 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 >>> >> |