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.
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?
I don’t completely understand why but your suggestion acutally worked! It would be appreciated with a more detailed explanation why this is if possible? (IE - have i configured the field incorrecly or is this the way it should be done?)
When you’re using a page pointer you can either point to just a page or to a page on a specific channel (like if you wanted to explicitly link to a page on the English channel). If you’re not using a specific channel the page link will be resolved in context of the current channel. See below how to access the channel specific option.
The page and channel system id is stored together with for that field in the format PageGuid,ChannelGuid. If no specific channel is selected, Guid.Empty is used in its place Example from index:
Let’s say you have two channels - one in English and one in Swedish. They use the same website so they both have the same set of pages available.
The most common way to add a page for a pointer field is that we only selected the page and let the channel be contextual, so the page will be fetched using the same channel that we are currently on. So on the English channel you would get back an URL for that channel and vice versa on the Swedish one. In this scenario, we will store Guid.Empty together with the page id.
But you can also specifically say that you want to link to a certain page on the English channel, in that case we will get the English URL even when we are on the Swedish channel. Here we would have the actual channel system id stored together with the page id.