简体   繁体   中英

MarkLogic search:search() not searching a specific TEI element

I have a MarkLogic database containing TEI XML documents. I built an application to search and display these documents. During testing, we found that certain keywords were not being found when searched and narrowed down the problem to realize that the keywords that weren't being found are in the following element:

<foreign xml:lang="lat">unio cum ipso</foreign>

Searching for the latin phrase "unio cum ipso" returns zero results. I'm thinking it has something to do with the @xml:lang, but I'm wondering if anyone has encountered a similar problem and how they solved it. Thanks!

If you are doing a stemmed search (the default) it will be language sensitive and will use the default language from the database unless specified otherwise. If you want to do a cross-language search, use the unstemmed option.

Thanks to @mholstege and @Wagner Michael I was able to solve this. The problem was that we were using @xml:lang to specify multiple languages without having a MarkLogic license key for anything but the default English. Marklogic treats any @xml:lang values as a generic language if you don't have the appropriate license key, so any keyword searches in the database for these non-English terms won't return any matches.

See Marklogic's Search Developer's Guide, Ch. 28 for a better explanation than I can give. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM