Wildcard searches

Viewed 31

Our MarkLogic based web-application mostly uses cts.jsonPropertyValueQuery to access needed information. We want to provide the possibility of wildcard searches against specific JSON properties. What is the best way to do it?

Turning on one of the wildcard indexes for the whole database is not an option. I figured out that adding a "wildcarded" parameter to the query itself may solve the problem:

cts.search(cts.jsonPropertyValueQuery("inventor", "R?th", ["wildcarded", "whitespace-sensitive"])); 

But it may work slow due to the absence of indexes. Is there any way to create wildcard indexes only for that specific JSON property?

1 Answers
Related