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: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.