Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alessandro 21 posts 51 karma points
    May 02, 2014 @ 13:35
    Alessandro
    0

    Umbraco 6.2 prevent a document index

    Hi

    there's a way to prevent to index a document only if some conditions are true?

    I try to cancel GatheringNodeData and DocumentWriting event but with no success

    indexer.DocumentWriting += new EventHandler<DocumentWritingEventArgs>(indexer_DocumentWriting);
    
    
    
    
    
    private void indexer_GatheringNodeData(object sender, IndexingNodeDataEventArgs e) {    
            if(someConditions == true){
                e.Cancel = true;
            }   
        }
    
    
    
    private void indexer_DocumentWriting(object sender, DocumentWritingEventArgs e) {
            if(someConditions == true){
                e.Cancel = true;
            }
        }
    

    any suggestion?

Please Sign in or register to post replies

Write your reply to:

Draft