开发者

Indexing Service Query Language returning more items than expected

We're using Indexing Service Query Language (a.k.a. Dialect 2) and the following query,

@TaxCategory  "\Areas\Technology\" AND @XmlConfigId = 14

it unexpectedly matches the following two items instead of just the first:

Technology 
Technology, Media & Entertainment 

We expected the ending slash would constrain the search to just that item; however it appears to grab anything having the given text at the beginning of the string.

How do we write 开发者_如何转开发queries to target the first and second items independently?


Update: The content actually indexed by indexing service is this:

<ekttaxcategory>#eksep# \Areas\Technology #eksep#</ekttaxcategory>

and

<ekttaxcategory>#eksep# \Areas\Technology, Media & Entertainment#eksep#</ekttaxcategory>

respectively.


Because the substring #eksep# always appears at the end of what we're seeking, seen the example of indexed items in the question, we ended up solving the issue using this query:

@TaxCategory  "\Areas\Technology#eksep#" AND @XmlConfigId = 14

We also considered using UNIX style pattern matching in the query and the period . as a string terminator, but never needed to try that after the above query worked.

If somebody else solves a similar problem using a different way or with pattern matching, please post another answer with sample query. Thanks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜