Hi Lisa, I notice you use xml:lang="rus" yourself, while the detect function returns a value of 'ru'. I recall that the xml:lang attribute usually contains a two-letter code. Perhaps the search doesn't handle your three-letter code correctly. Does it help if you replace the value of the attribute with 'ru'?
Kind regards, Geert Van: [email protected] [mailto:[email protected]] Namens Lisa Liddle Verzonden: woensdag 16 februari 2011 18:31 Aan: [email protected] Onderwerp: [MarkLogic Dev General] search:search returning result in incorrect language I'm using search:search and passing in an options node that specifies the language: <term-option>lang={$lang}</term-option> There is also an additional-query which specifies the language in the appropriate places in the query. Our content has the @xml:lang on the root node and only on the root. This has been working and returned the results in only the language specified, except recently we've found a case where when searching in English we get a result in Russian (@xml:lang="rus"). I modified the additional-query and added a cts:element-attribute-value-query to get the particular language used in the search and this fixes it, but I'm still stumped on why I should have to do this. I can't see anything wrong with the document. I ran xdmp:encoding-language-detect on the document and get back this as the first result (which would seem to indicate that the db recognizes the document as Russian): <encoding-language> <encoding>utf-8</encoding> <language>ru</language> <score>39.66</score> </encoding-language> Does anyone have any idea why this would happen? Thanks, Lisa NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
