MarkLogic - lexicon expansion not working as expected

61 Views Asked by At

I'm trying to address the issue of excessive incorrect results from an unfiltered search with a wildcard.

In my understanding, the right way to fix it is to use "lexicon expansion."

However, when I look at the documentation for cts.jsonPropertyValueQuery(), I only see options for lexicon-expansion-limit and limit-check/no-limit-check. Nothing to turn lexicon expansion on or off.

Apparently it’s not doing lexicon expansion (if I understand it correctly) because when I do a wildcarded search with cts.jsonPropertyValueQuery, it gives lots of spurious results. And since the default lexicon-expansion-limit is 4096, it’s fewer than the 3066 terms that cts.ValueMatch() returns for this query.

So I don’t get why it’s not working.

I can do it explicitly by running cts.valueMatch() and using the result of that as the search term(s) but wasn’t that the point of lexicon expansion?

Can someone help me understand what is going on here?

0

There are 0 best solutions below