I need a very simple example of how to add a node to an index with using Neo4JClient
In the following C# code I have created an index and an employee node.
Question:
In the following code, how can the node that was created be added to the index? The solutions should allow for the ability to search on EmployeeID or Name.
class Program
{
static void Main(string[] args)
{
//Connect to Neo4J
var graphClient = new GraphClient(new Uri(@"http://localhost:7474/db/data"));
graphClient.Connect();
//Create Index
graphClient.CreateIndex("employee", new IndexConfiguration() { Provider = IndexProvider.lucene, Type = IndexType.exact }, IndexFor.Node);
//Create an Employee node
var employee = new Employee() { EmployeeID = "12345", Name = "Mike"};
NodeReference employeeRef = graphClient.Create(employee);
//Add the node that was just created to the Employee index.
}
private class Employee
{
[JsonProperty("EmployeeID")]
public string EmployeeID { get; set; }
[JsonProperty("Name")]
publi