简体   繁体   中英

Use Liferay 7.2 Elastisearch Custom Filter to exclude all Web Content Articles with specific tag

I'm attempting to exclude all Web Content Articles with tag "no-search" applied to them from appearing in search results. However, I'm having difficulty figuring out how to set up the Custom Filter widget for that.

Here's what I have:

Filter Field: tagNames (have also tried assetTagNames)

Filter Value: no-search

Filter Query Type: Exists (have tried everything in the list with no success)

Occur: must_not

The documentation isn't being terribly useful for this. I even tried other example filter parameters provided on this page and they didn't function as expected either. What parameters do I need to use to do this successfully?

Answering for myself, since I ended up reaching out to Liferay support for help with this, and so this is accessible to anyone searching for it in the future. Here's what they told me to use.

Filter Field: assetTagNames

Filter Value: no-search (or your own exclusion tag here)

Filter Query Type: Match

Occur: must_not

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM