本文介绍了Azure搜索突出显示带有双引号的短语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个天蓝色的Web应用程序,其中有一个搜索框,当我们输入带有双引号的文本(例如"App Service")时,它会正确列出带有"App Service"的记录,但是它不仅突出显示"App Service",而且还会突出显示突出显示应用程序"以及服务"(如果分别找到),可以这样做,以便仅突出显示应用程序服务",这不会在用户之间造成混乱.

We have a azure web application where in there is one search box, when we enter text with double quotes like "App Service" it correctly list records with "App service" however it not only highlights "App Service" but it also highlights "App" as well "Service" if they are found individually, what can be done so that only "App service" is highlighted this will not create chaos among the users.

推荐答案

在Azure搜索中,我们使用Lucene的张贴荧光笔.该荧光笔忽略了匹配词条的位置,这就是为什么您看到所有短语词条被单独突出显示的原因.不幸的是,目前无法自定义此行为.我意识到这可能会使您的用户感到困惑.

In Azure Search we use Lucene's Postings Highlighter. This highlighter ignores positions of terms that matched, that's why you see all phrase terms highlighted independently. Unfortunately there is no way to customize this behavior at the moment. I realize this could be confusing to your users.

请使用我们的 UserVoice 页面对更改当前行为进行投票.

Please use our UserVoice page to vote for changing the current behavior.

这篇关于Azure搜索突出显示带有双引号的短语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 05:12