Neo4JClient - Cómo agregar un nodo al índice
Necesito un ejemplo muy simple de cómo agregar un nodo a un índice usando Neo4JClient
En el siguiente código C #, he creado un índice y un nodo de empleado.
Pregunta:
En el siguiente código, ¿cómo se puede agregar el nodo que se creó al índice? Las soluciones deben permitir la posibilidad de buscar en EmployeeID o 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