0

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?

grtjn
  • 20,254
  • 1
  • 24
  • 35
  • I have actually found a bug-like behavior while I was doing some tests using this approach. – Ed Macabebe Aug 22 '17 at 02:38
  • When I set my query options to be case-insensitive, the response seems to be correct on all, except on a certain pattern, both starts "lim", such as {"stopWords":[... ,"limited", "limitee", ...]} These two words does not resolve to queries when this is invoked, cts.fieldValueMatch("stopwords", "Limited", lexOptions); where var lexOptions = ["case-insensitive", "collation=http://marklogic.com/collation/"]; – Ed Macabebe Aug 22 '17 at 02:39

0 Answers0