Skip to content
Discussion options

You must be logged in to vote

@jtkech I have updated ContentItemByTermIndexProvider.cs to have when filter and it works.
Here is then condition in when statement.

    context.For<ContentItemByTermIndex>()
    .When(contentItem =>
    {
        // Search for Taxonomy fields
        _fieldDefinitions = GetTaxonomyFieldsDefinitions(contentItem);
        return _fieldDefinitions.Any();
    })
 
    // GetTaxonomyFieldsDefinitions
    private IReadOnlyCollection<ContentPartFieldDefinition> GetTaxonomyFieldsDefinitions(ContentItem contentItem)
    {
        // Lazy initialization because of ISession cyclic dependency
        _contentDefinitionManager ??= _serviceProvider.GetRequiredService<IContentDefinitionManager>();

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@MikeAlhayek
Comment options

@aaronamm
Comment options

@MikeAlhayek
Comment options

Comment options

You must be logged in to vote
2 replies
@MikeAlhayek
Comment options

@aaronamm
Comment options

Comment options

You must be logged in to vote
4 replies
@aaronamm
Comment options

@jtkech
Comment options

@aaronamm
Comment options

Answer selected by aaronamm
@JimBobSquarePants
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants