Skip to content

Commit

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

* Update comments

Co-authored-by: Aaron (Qilong) <173288704@qq.com>
  • Loading branch information
mjkkirschner and QilongTang committed Mar 1, 2024
1 parent ccf29e4 commit 658262a
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 @@ -160,8 +160,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 @@ -106,6 +106,8 @@ internal LuceneSearchUtility(DynamoModel model, LuceneStartConfig config)
/// </summary>
internal void InitializeLuceneConfig()
{
if (DynamoModel.IsHeadless) return;

addedFields = new List<string>();

DirectoryInfo luceneUserDataFolder;
Expand Down

0 comments on commit 658262a

Please sign in to comment.