Skip to content

Commit

Permalink
DYN-7365 Updating Lucene Search Algorithm - Regression
Browse files Browse the repository at this point in the history
With the latest updates in the Search algorithm now when searching for "list create" the List.Create node is at the second position, so I had to modify the test according to the results.
  • Loading branch information
RobertGlobant20 committed Sep 18, 2024
1 parent 31ad32b commit cd52202
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/DynamoCoreTests/SearchModelHostIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void ValidateListCreateNodeInSearch()
string expectedNode = "List Create";
string[] searchTerms = { "list.create", "list create"};
const int nodeResultsToTake = 5;
const int expectedNodeIndex = 0;
int[] expectedNodeIndex = { 0, 1 };

string fullJsonNodesPath = Path.Combine(TestDirectory, @"DynamoCoreTests\NodesJsonDatasets\LuceneIndexedNodesRevit.json");
UpdateIndexedNodesFromJason(fullJsonNodesPath);
Expand All @@ -133,7 +133,7 @@ public void ValidateListCreateNodeInSearch()
Assert.IsTrue(nameResults.Take(nodeResultsToTake).Contains(expectedNode));

//Validates that the expected node is at first place
Assert.IsTrue(nameResults.IndexOf(expectedNode) == expectedNodeIndex, string.Format("The node: {0} is expected at position: {1} but was found in position: {2}", expectedNode, expectedNodeIndex, nameResults.IndexOf(expectedNode)));
Assert.IsTrue(nameResults.IndexOf(expectedNode) == expectedNodeIndex[index], string.Format("The node: {0} is expected at position: {1} but was found in position: {2}", expectedNode, expectedNodeIndex[index], nameResults.IndexOf(expectedNode)));
index++;
}
}
Expand Down

0 comments on commit cd52202

Please sign in to comment.