Skip to content

Commit

Permalink
DYN-6364 Skip Lucene indexing process in UIless mode (#14523)
Browse files Browse the repository at this point in the history
* skip Lucene indexing process in UIless mode

* Update comments
  • Loading branch information
QilongTang committed Mar 1, 2024
1 parent d901560 commit 758f130
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DynamoCore/Models/DynamoModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ internal LuceneSearchUtility LuceneUtility

/// <summary>
/// Flag to indicate that there is no UI on this process, and things
/// like the update manager and the analytics collection should be
/// disabled.
/// like the node index process, update manager and the analytics collection
/// should be disabled.
/// </summary>
public static bool IsHeadless { get; set; }

Expand Down
2 changes: 2 additions & 0 deletions src/DynamoCore/Utilities/LuceneSearchUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ internal LuceneSearchUtility(DynamoModel model)
/// </summary>
internal void InitializeLuceneConfig(string dirName, LuceneStorage storageType = LuceneStorage.FILE_SYSTEM)
{
if (DynamoModel.IsHeadless) return;

addedFields = new List<string>();

DirectoryInfo luceneUserDataFolder;
Expand Down

0 comments on commit 758f130

Please sign in to comment.