diff --git a/src/DynamoCore/Utilities/LuceneSearchUtility.cs b/src/DynamoCore/Utilities/LuceneSearchUtility.cs index c6b4fba184e..4b108438ed9 100644 --- a/src/DynamoCore/Utilities/LuceneSearchUtility.cs +++ b/src/DynamoCore/Utilities/LuceneSearchUtility.cs @@ -442,6 +442,10 @@ internal void AddNodeTypeToSearchIndex(NodeSearchElement node, Document doc) } SetDocumentFieldValue(doc, nameof(LuceneConfig.NodeFieldsEnum.Parameters), node.Parameters ?? string.Empty); + if(writer == null) + { + CreateLuceneIndexWriter(); + } writer?.AddDocument(doc); } }