I'm using the MarkLogic Java API. I'm looking for a way to set the Query Type of a StringQueryDefinition. The type should be "Value", as described in: https://docs.marklogic.com/guide/search-dev/searchdev#id_34905.
Value: Match an entire literal value, such as a string or number, in a specific JSON property or XML element. By default, value queries use exact match semantics. For example, a search for 'mark' will not match 'Mark Twain'.
I need this because I want my text searches to match only the exact search terms.
Example: the search for 'mark' should ONLY match with documents containing exactly the term 'mark' attached to some key. So, {"anExample1": {"key1": "mark", "key2":"someotheralue"}} is a valid match. But {"anExample2": {"key1": "mark twain", "key2":"someotheralue"}} is not a valid match.
For both examples, I'd like to get the URI and location within the document returned. Hence, the search for "mark" should return uri/anExample1 and anExample1/key1.