Created
November 7, 2020 17:50
-
-
Save crajah/b39abb6a580ee39850aef834816bce63 to your computer and use it in GitHub Desktop.
In this example, airports, flights and airportSearch are constructed inside the Graph object. However, I want to be able to create the Graph first then create the Collection[D] on the fly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object database extends Graph(databaseName = "graphTest") { | |
val airports: DocumentCollection[Airport] = vertex[Airport] | |
val flights: DocumentCollection[Flight] = edge[Flight] | |
val airportSearch: View[Airport] = view( | |
name = "airportSearch", | |
collection = airports, | |
analyzers = List(Analyzer.Identity), | |
includeAllFields = true, | |
fields = Airport.name -> List(Analyzer.TextEnglish) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment