Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4352 posts 9407 karma points MVP 2x admin c-trib
    Oct 03, 2019 @ 09:25
    Ismail Mayat
    0

    IndexOperationComplete cannot get index

    I have implemented the IndexOperationComplete on a custom index. After its completed indexing I am doing the following:

                    _examineManager.TryGetIndex(HiqhQIndexConstants.ExamineIndexName, out var highQIndex);
    
                LuceneIndex luceneIndex = (LuceneIndex) highQIndex;
    
                using (var reader = IndexReader.Open(luceneIndex.GetLuceneDirectory(), true))
                {
                    var tags = _tagService.GetTags(HiqhQIndexConstants.IndexFieldAliases.Tags,
                        "__IndexType:highqfeeditem",
                        reader);
    
                    _tagService.AddTags(tags, Constants.Site.HighQTagGroup);
                }
    

    The issue i am having is that its getting the index but its empty, in theory it should not be empty. When I run this same code in a controller after building index it works.

Please Sign in or register to post replies

Write your reply to:

Draft