Skip to content

Commit

Permalink
DYN-5787-LuceneNET-InCanvasSearch Code Review
Browse files Browse the repository at this point in the history
Added several comments and removed unused fields.
  • Loading branch information
RobertGlobant20 committed May 22, 2023
1 parent fb5ea58 commit 9af2277
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/DynamoCore/Models/DynamoModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ private void InitializeNodeLibrary()

CustomNodeManager.AddUninitializedCustomNodesInPath(pathManager.CommonDefinitions, IsTestMode);

//Initialize searcher
//Initialize searcher, if the applyAllDeletes is true all buffered deletes on documents will be applied (made visible) in the returned reader
dirReader = writer.GetReader(applyAllDeletes: true);
IndexSearcher searcher = new IndexSearcher(dirReader);

Expand Down Expand Up @@ -3254,6 +3254,7 @@ private NodeModelSearchElement AddNodeTypeToSearch(TypeLoadData typeLoadData)
/// <returns></returns>
private Document InitializeIndexDocument()
{
//TODO: all this harcoded string values should be moved to a different class.
var fullCategory = new TextField("FullCategoryName", "", Field.Store.YES);
var name = new TextField("Name", "", Field.Store.YES);
var description = new TextField("Description", "", Field.Store.YES);
Expand Down
3 changes: 2 additions & 1 deletion src/DynamoCore/Search/NodeSearchModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ namespace Dynamo.Search
/// </summary>
public class NodeSearchModel : SearchLibrary<NodeSearchElement, NodeModel>
{
internal XmlDocument document;

//Holds the instance for the IndexSearcher
internal IndexSearcher Searcher;

////Used in DynamoModel for creating the StandardAnalyzer
internal Analyzer Analyzer;

/// <summary>
Expand Down

0 comments on commit 9af2277

Please sign in to comment.