Although I've found a section covering stop words in "Inside MarkLogic Server", I can't seem to digest it at the moment, i.e. how to even lookup and utilize the "StopKeySet". If there's a detailed guide, please provide clues.
The sorted list of stop-words (around 120 distinct & sorted) is provided by my client. I stored it in a document as json key in a string array. I ingested it via mlcp into my "constants" uri & collection.
To solution it, I've arranged a field and field-range-index calling it stopwords which includes the keyName of the stopwords array in the json doc. Then for each search:suggest request in our rest service, I filter the query string to remove each stopword that exist in my indexed stopwords set, using cts:field-value-match("stopwords", each word in query string, options) .
Is this the right approach, or is there a more atomic approach than this?