How to search in Clusterpoint DB for full text match only?

95 Views Asked by At

I am executing Search query

<query>
<edu>college</edu>
<studies>mathematics</studies>
</query>

The result is returned even for documents where values for <studies> is “mathematics and statistics”, “geometry in mathematics” etc. But my purpose is to get documents where in tag <studies> is value “mathematics” and nothing else.

Is there a possibility to search by exact text value?

2

There are 2 best solutions below

0
On BEST ANSWER

For this purpose you should use exact-match operator ==”” and rule "exact-match=binary" for appropriate tag in policy configuration. Your query could look like:

<query>
  <team>college</team>
  <studies>=="mathematics"</studies>
</query>

This will return results where "studies" tag contains only "mathematics" as value and no other words.

0
On

Check out their docs. Exact match clause should be the one (I believe): http://docs.clusterpoint.com/wiki/Search_query_syntax#Exact_match