Does anyone know how to enable "supportProtected" on an Examin index - in v7 we could do this via the examinesettings.config file - but the config files are no longer available in v8.
var index = new LuceneIndex("SitemapIndex",
CreateFileSystemLuceneDirectory("SitemapIndex"),
new FieldDefinitionCollection(
new FieldDefinition("updateDate", FieldDefinitionTypes.DateTime),
new FieldDefinition("changeFrequency", FieldDefinitionTypes.Float)
),
new StandardAnalyzer(Version.LUCENE_30),
new ContentValueSetValidator(true, includeItemTypes:new string[]{ "BlogPost", "TextPage", "BlogOverview" }) );
ContentValueSetValidator has a second constructor with a parameter 'supportProtectedContent'. I don't have any further insights, since the code of this class is not self-explanatory:
Having this same issue. I already have the index the external one i need to just allow SupportProtectedContent and set it to true. Don't want to have to go through setting up the whole index again.
that each index does have a ValueSetValidator property
and this can be set to be a new instance of a ContentValueSetValidator which takes a parameter to support protected content or not...
however as this property has it's 'set' protected, it can only be set via the constructor for the index, which you can only do when creating it afresh...
... but I might be misunderstanding! and there may be another way...
but looks like removing the existing index and creating a new one with the desired configuration is the way to go...
Umbraco 8 Examine Index - supportProtected
Hello!!
Does anyone know how to enable "supportProtected" on an Examin index - in v7 we could do this via the examinesettings.config file - but the config files are no longer available in v8.
Any ideas?
There is a ContentValueSetValidator class:
ContentValueSetValidator has a second constructor with a parameter 'supportProtectedContent'. I don't have any further insights, since the code of this class is not self-explanatory:
https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/src/Umbraco.Examine/ContentValueSetValidator.cs
Having this same issue. I already have the index the external one i need to just allow SupportProtectedContent and set it to true. Don't want to have to go through setting up the whole index again.
Hi Ismail
It looks like in the source for examine
https://github.com/Shazwazza/Examine/blob/864168c7f019908242dd56197e075edea5ee77cf/src/Examine/Providers/BaseIndexProvider.cs
that each index does have a ValueSetValidator property
and this can be set to be a new instance of a ContentValueSetValidator which takes a parameter to support protected content or not...
however as this property has it's 'set' protected, it can only be set via the constructor for the index, which you can only do when creating it afresh...
... but I might be misunderstanding! and there may be another way...
but looks like removing the existing index and creating a new one with the desired configuration is the way to go...
Marc,
Callum seems to think you can over ride, but i did see that protected property so could be you remove then re add afresh
Ok so superstar callum came up with the goods with a package see https://github.com/callumbwhyte/umbraco-config-contrib
Currently it seems the Umbraco Examine Config package has some issues, which cause a boot error - at least while testing on Umbraco v8.12.2: https://github.com/callumbwhyte/umbraco-examine-config/issues
I implemented the following instead to enable
SupportProtectedContent
in ExternalIndex and close to the example documented here: https://our.umbraco.com/documentation/reference/searching/examine/indexing/#changing-ivaluesetvalidatoris working on a reply...