From: Eduard D. <ed...@fr...> - 2021-01-14 07:21:29
|
Perhaps, but the fields option enables you to define multiple indexes on one qname already, see Joe's answer: collection.xconf: <analyzer id="nostops" class="org.fryske_akademy.exist.lucene.InsensitiveWhitespaceAnalyzer"/> <analyzer id="nostopssensitive" class="org.fryske_akademy.exist.lucene.SensitiveWhitespaceAnalyzer"/> <text qname="tei:quote" analyzer="nostops"> <field name="sensitive" analyzer="nostopssensitive"/> </text> xquery: [ft:query(., teidictjson:searchTerm($searchterm))] declare function teidictjson:searchTerm($term as xs:string) { if (teidictjson:findParam("sensitive","") = "") then $term else "sensitive:(" || $term || ")" }; Regards, Eduard -----Original Message----- From: PIERRICK BRIHAYE <Pie...@br...h<mailto:PIERRICK%20BRIHAYE%20%3cP...@br...h%3e>> To: Duncan Paterson <du...@ex...<mailto:Duncan%20Paterson%20%3cd...@ex...%3e>>, exist-open <exi...@li...<mailto:exist-open%20%3ce...@li...%3e>> Subject: Re: [Exist-open] diacritic switch (Eduard Drenth) Date: Tue, 12 Jan 2021 14:51:17 +0000 Hello, When we introduced indexes in eXist some... 13 years ago , I planned a multi-indexing fixture, i.e. every text content would be indexed into several indexes. Unfortunately, this hasn't been developed yet, but I think it could be a very interesting feature to implement. It goes much further than "simply" treating diacritics IMHO. I've made such an approach with my arabic analyzer <http://www.nongnu.org/aramorph/english/lucene.html> http://www.nongnu.org/aramorph/english/lucene.html . You can query an arabic text in arabic or in english and get a result, sometimes totally inaccurate I must admit :-) Cheers, p.b. ________________________________________ De : Duncan Paterson < <mailto:du...@ex...> du...@ex... > Envoyé : mardi 12 janvier 2021 14:52 À : exist-open Objet : Re: [Exist-open] diacritic switch (Eduard Drenth) Dear Eduard, wouldn’t unicode decomposition via <http://www.xqueryfunctions.com/xq/fn_normalize-unicode.html> http://www.xqueryfunctions.com/xq/fn_normalize-unicode.html be the easier option here? Is there something not working with that approach? Greetings Duncan Ceterum censeo exist-db.org< <http://exist-db.org> http://exist-db.org > esse conriganda 1. diacritic switch (Eduard Drenth) 2. Re: diacritic switch (Eduard Drenth) ---------------------------------------------------------------------- Message: 1 Date: Tue, 12 Jan 2021 07:08:50 +0000 From: Eduard Drenth < <mailto:ed...@fr...> ed...@fr... <mailto: <mailto:ed...@fr...> ed...@fr... >> To: " <mailto:exi...@li...> exi...@li... <mailto: <mailto:exi...@li...> exi...@li... >" < <mailto:exi...@li...> exi...@li... <mailto: <mailto:exi...@li...> exi...@li... >> Subject: [Exist-open] diacritic switch Message-ID: < <mailto:c21...@fr...> c21...@fr... <mailto: <mailto:c21...@fr...> c21...@fr... >> Content-Type: text/plain; charset="utf-8" Dear all, Can I programmatically query a specific index? I want to offer my users a switch for case and diacritics sensitivity. For this I want to define two indexes using different analyzers. Then I want to query one or the other depending on the switch. Can this be done this way? Bye, Eduard -- Eduard Drenth, Software Architekt <mailto:ed...@fr...> ed...@fr... <mailto: <mailto:ed...@fr...> ed...@fr... ><mailto: <mailto:ed...@fr...> ed...@fr... > Doelestrjitte 8 8911 DX Ljouwert +31 58 234 30 47 +31 62 094 34 28 (priv?) skype: eduarddrenth <https://github.com/eduarddrenth> https://github.com/eduarddrenth frisian.eu gpg: <https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth> https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth Op freed bin ik th?s/wurkje ik minder -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Tue, 12 Jan 2021 09:27:56 +0000 From: Eduard Drenth < <mailto:ed...@fr...> ed...@fr... > To: " <mailto:exi...@li...> exi...@li... " < <mailto:exi...@li...> exi...@li... > Subject: Re: [Exist-open] diacritic switch Message-ID: < <mailto:7a2...@fr...> 7a2...@fr... > Content-Type: text/plain; charset="utf-8" If this isn't possible I will create a copy collection with a separate collection.xconf -----Original Message----- From: Eduard Drenth < <mailto:ed...@fr...> ed...@fr... > To: <mailto:exi...@li...> exi...@li... < <mailto:exi...@li...> exi...@li... > Subject: [Exist-open] diacritic switch Date: Tue, 12 Jan 2021 07:08:50 +0000 Dear all, Can I programmatically query a specific index? I want to offer my users a switch for case and diacritics sensitivity. For this I want to define two indexes using different analyzers. Then I want to query one or the other depending on the switch. Can this be done this way? Bye, Eduard -- Eduard Drenth, Software Architekt <mailto:ed...@fr...> ed...@fr... Doelestrjitte 8 8911 DX Ljouwert +31 58 234 30 47 +31 62 094 34 28 (priv?) skype: eduarddrenth <https://github.com/eduarddrenth> https://github.com/eduarddrenth frisian.eu gpg: <https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth> https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth Op freed bin ik th?s/wurkje ik minder _______________________________________________Exist-open mailing <mailto:lis...@li...> lis...@li... <https://lists.sourceforge.net/lists/listinfo/exist-open> https://lists.sourceforge.net/lists/listinfo/exist-open -- Eduard Drenth, Software Architekt <mailto:ed...@fr...> ed...@fr... Doelestrjitte 8 8911 DX Ljouwert +31 58 234 30 47 +31 62 094 34 28 (priv?) skype: eduarddrenth <https://github.com/eduarddrenth> https://github.com/eduarddrenth frisian.eu gpg: <https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth> https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth Op freed bin ik th?s/wurkje ik minder -------------- next part -------------- An HTML attachment was scrubbed... -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: This is a digitally signed message part ------------------------------ ------------------------------ Subject: Digest Footer _______________________________________________ Exist-open mailing list <mailto:Exi...@li...> Exi...@li... <https://lists.sourceforge.net/lists/listinfo/exist-open> https://lists.sourceforge.net/lists/listinfo/exist-open ------------------------------ End of Exist-open Digest, Vol 177, Issue 12 ******************************************* _______________________________________________ Exist-open mailing list <mailto:Exi...@li...> Exi...@li... <https://lists.sourceforge.net/lists/listinfo/exist-open> https://lists.sourceforge.net/lists/listinfo/exist-open -- Eduard Drenth, Software Architekt ed...@fr...<mailto:ed...@fr...> Doelestrjitte 8 8911 DX Ljouwert +31 58 234 30 47 +31 62 094 34 28 (privé) skype: eduarddrenth https://github.com/eduarddrenth frisian.eu gpg: https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth Op freed bin ik thús/wurkje ik minder |