使用LabelMatchInformation的术语库关键字关键词集搜索不返回不区分大小写的结果 [英] Term store Keyword Termset search using LabelMatchInformation not returns results case insensitive

查看:80
本文介绍了使用LabelMatchInformation的术语库关键字关键词集搜索不返回不区分大小写的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试使用SharePoint Online中的CSOM读取Termstore关键字术语集值.我们尝试使用LabelMatchInformation通过术语名称查找特定术语.但是由于某种原因,GetTerms(LabelMatchInformation)方法未返回大小写 关键字词库的不敏感结果.如果我们搜索术语 microsoft, ,尽管术语库包含关键字 Microsoft ,但代码下方的术语库中没有该术语.

We are trying to read the Termstore Keyword termset values using CSOM in SharePoint Online. We tried using LabelMatchInformation to find specific term by term name. But for some reason, the GetTerms(LabelMatchInformation) method was not returning the case insensitive results from the keyword term store. If we search for term microsoft, though the termstore contains the keyword Microsoft exists in termstore below code does not return that term.

这是我们尝试使用的代码:

Here is the code that we are trying with:

TaxonomySession session = TaxonomySession.GetTaxonomySession(context);
TermStore ts = session.GetDefaultKeywordsTermStore();
TermSet tset = ts.KeywordsTermSet;
LabelMatchInformation match = new LabelMatchInformation(clientContext);
match.Lcid = DefaultLanguage;
match.TrimUnavailable = true;
match.TermLabel = term;
TermCollection termMatches = tset.GetTerms(match);

根据MSDN文档,LabelMatchInformation应该返回不区分大小写的结果.

As per MSDN documentation LabelMatchInformation should return Case insensitive results.

有人可以提供其他任何搜索关键字条件的方法,以返回不区分大小写的结果的方法.

Can someone help on any other approach to search keywords termset to return case insensitive results.

谢谢.

推荐答案

请在代码中添加以下代码行.

Please add the following line of code in your code.

match.StringMatchOption = StringMatchOption.StartsWith;

如果仍然无法正常运行,请获取最新的SharePoint Online客户端组件.

If it still not works, please get the latest SharePoint Online client component.

并检查以下线程:

> https://sharepoint.stackexchange.com/questions/132787/labelmatchinformation-not-case -不敏感

最好的问候,

丹尼斯


这篇关于使用LabelMatchInformation的术语库关键字关键词集搜索不返回不区分大小写的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆