Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8832

Smart Search - Exact Phrase Match for Document Tags (or how to use IDs)

$
0
0
We are using the Smart Search API to search through documents and want to filter by: 1. text 2. document category 3. document tag We have it working 100% fine for text and category, however, we're still not happy with tag matching. With the category it lets us search by ID for an exact category match using `+documentcategoryids((int)1|(int)2)`. However, there doesn't seem to be an equivalent for tag IDs - we're forced to use the tag name. This wasn't too much of a problem, until we realised that when doing this, it's not doing an exact phrase match. For example, 2 of the tags in our system are "Cash Flow" and "Petty Cash". If we search for "Cash Flow" as follows... `+documenttags:(Cash Flow)` ...this is matching tags for both "Petty Cash" and "Cash Flow" I have tried the following to attempt to force an exact phrase match (based on what I saw for Lucene syntax), however, nothing seems to work - they either bring back no results or they bring back all pages (i.e. they don't filter). `+documenttags:("Cash Flow")` `+documenttags:"Cash Flow"` `+documenttags:[Cash Flow]` `+documenttags:([Cash Flow])` Ideally, I'd like to filter by ID, but I can't seem to (I've tried `tagids`, `tagid`, `documenttagids`, `documenttagid` but never seem to get anything useful from them. So - does anyone know how to: - filter by tag ID? - force an exact phrase match when searching by `documenttags`? Thanks in advance

Viewing all articles
Browse latest Browse all 8832

Trending Articles