Search against Lucene index with pointeritem not working


I’m trying to add an ExcludeTags to a lucene search request like this:

excludeClause.Tags.Add(new Tag(
                TagNames.GetTagNameForProperty(PageFieldNameConstants.ExcludeBrands), Guid.Parse("44bed877-665b-4419-a8ec-434e663d79e4")));

And then add it to the request like so:


and PageFieldNameConstants.ExcludeBrands is a multiselect of pointeritems. For non obvious reason the page is NOT excluded from the result. I have tried rebuilding the index and verified that it gets updated.

I am running the request against the SearchDomains.Pages

Similar approach have worked for other types of queries.

Litium version: [7.6.3]


The pointer is using the following code during the indexing of the pointer value

var pointerValue = value is PointerPageItem item ? item.EntitySystemId + "," + item.ChannelSystemId : value.EntitySystemId.ToString();

If your pointer is a page pointer you need to do the same logic for the filtering.

1 Like

Thank you for the reply. I have tested that without success. :frowning:

Not sure if the page pointer that you testing with is only pointing to a page or if that is pointing to a page in a specific channel. If you try to use Guid.Empty as the channel system id, will that make any difference?