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

Reply via email to