Hi Debin, That is because ‘consign’ is a stem of all three the words you wanted highlighted, whereas ‘disparu’ wasn’t a stem of ‘disparaître’. I can imagine MarkLogic applies cts:stem on search terms, but only includes the shortest or first stem. Applying cts:stem to your search terms manually will make sure all stems are considered..
Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Debin, Infant Jerald (LNG-CON)" <infantjerald.de...@lexisnexis.com<mailto:infantjerald.de...@lexisnexis.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Thursday, March 31, 2016 at 2:28 PM To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: Re: [MarkLogic Dev General] French stemmed word is not getting recognized and highlighted Hi Greet, It is working perfectly for English in below example without having stem introduced in the query, let $text:= <text xml:lang="en">He asked the accused what he knew of the consigned goods. The accused told Mr. Osmond that he was familiar ... ... own goods as opposed to consign reimbursing the owner of the consigning goods.</text> return cts:highlight($text,cts:query(<cts:word-query> <cts:text xml:lang="en">consign</cts:text> <cts:option>case-insensitive</cts:option> <cts:option>diacritic-insensitive</cts:option> <cts:option>punctuation-insensitive</cts:option> </cts:word-query>),<h1>{$cts:text}</h1>) Result : <text xml:lang="en">He asked the accused what he knew of the <h1>consigned</h1> goods. The accused told Mr. Osmond that he was familiar ... ... own goods as opposed to <h1>consign</h1> reimbursing the owner of the <h1>consigning</h1> goods.</text> All the stem words are recognized and highlighted for English without having cts:stem . But French words it is not working as expected. Please advise. Thanks and Regards, Debin Mob: +91-9789826001 From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Thursday, March 31, 2016 7:47 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] French stemmed word is not getting recognized and highlighted Hi Debin, How about applying cts:stem on search terms first? let $text:= <text xml:lang="fr">avec la rupture de septembre 1997, cette disparues situation fait disparaître la justification. Les services fournis disparu par la demanderesse l'ont été dans l'attente d'une rémunération,</text> return cts:highlight($text,cts:word-query(cts:stem("disparu", "fr"), ("lang=fr")),<h1>{$cts:text}</h1>) Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Debin, Infant Jerald (LNG-CON)" <infantjerald.de...@lexisnexis.com<mailto:infantjerald.de...@lexisnexis.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Thursday, March 31, 2016 at 1:14 PM To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: Re: [MarkLogic Dev General] French stemmed word is not getting recognized and highlighted Hi Geert, I understand stem for disparaître is not disparu. But stem for “disparu” is “disparaître”. The same is not getting recognized and highlighted. We need “disparaître” to be highlighted when we give “disparu”. <text xml:lang="fr">avec la rupture de septembre 1997, cette <h1>disparues</h1> situation fait disparaître la justification. Les services fournis <h1>disparu</h1> par la demanderesse l'ont été dans l'attente d'une rémunération,</text> Please advise. Thanks and Regards, Debin Mob: +91-9789826001 From:general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Thursday, March 31, 2016 7:00 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] French stemmed word is not getting recognized and highlighted Hi Debin, The issue is that the stem for disparaître is not disparu, but disparaître. If you highlight with disparaître instead, you should see all highlights you are looking for: for $word in ("disparu", "disparues", "disparaître") return ("==============", $word, "------------", cts:stem("disparu","fr")) Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Debin, Infant Jerald (LNG-CON)" <infantjerald.de...@lexisnexis.com<mailto:infantjerald.de...@lexisnexis.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Thursday, March 31, 2016 at 12:00 PM To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: [MarkLogic Dev General] French stemmed word is not getting recognized and highlighted Hi Team, For the term French term “disparu” corresponding French stemmed word “disparaître” is not getting recognized when performing search. Example: Query: let $text:= <text xml:lang="fr">avec la rupture de septembre 1997, cette disparues situation fait disparaître la justification. Les services fournis disparu par la demanderesse l'ont été dans l'attente d'une rémunération,</text> return cts:highlight($text,cts:query(<cts:word-query> <cts:text xml:lang="fr">disparu</cts:text> <cts:option>case-insensitive</cts:option> <cts:option>diacritic-insensitive</cts:option> <cts:option>punctuation-insensitive</cts:option> </cts:word-query>),<h1>{$cts:text}</h1>) Result: Disparaître is not getting recognized and highlighted as below, <text xml:lang="fr">avec la rupture de septembre 1997, cette <h1>disparues</h1> situation fait disparaître la justification. Les services fournis <h1>disparu</h1> par la demanderesse l'ont été dans l'attente d'une rémunération,</text> Below is the result of cts:stem, cts:stem("disparu","fr") disparu disparaître Please let us know on this issue. Thanks and Regards, Debin Mob: +91-9789826001
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general