-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override of NodeIndexConfig throwing compile error #6
Comments
Can you check if this works for you? class datastore extends Neo4jWrapper with SingletonEmbeddedGraphDatabaseServiceProvider with Neo4jIndexProvider {
def neo4jStoreDir = "data/datastore.db"
override def NodeIndexConfig = ("personIndex", Some(Map("provider" -> "lucene", "type" -> "fulltext"))) ::
("eventIndex", Some(Map("provider" -> "lucene", "type" -> "fulltext"))) ::
Nil
} |
Tested it with the additional "Some" - should work. I updated the README. |
Christopher, Excellent! Thanks for the information. The neo4j-scala library has been very eye-opening with regard to the DSL capabilities of Scala. The language almost expresses exactly what the comment would read... I'm new to Scala as wells as Neo4j and haven't come across 'Some' yet... still a bit baffled, but I'll track down what is it doing, good reason to dig a bit deeper. Been reading 'Programming in Scala' to pickup the language, see 'Some' listed on page 313 while I'm still at 185 or so. Learning while doing with more than a single new technology can be such a challenge. Do you have any suggested learning resources for Scala? Especially for a Java/Spring Architect? The language/syntax is challenging enough, but I really feel I am missing the 'best design' type practices piece of the puzzle. Thanks again for the quick fix/information... Kevin On 5/06/2012, at 3:32 AM, Christopher Schmidt wrote:
|
Thanks! The addition of "Some" worked fine. |
"'best design' type practices" - difficult answer... Scala provides a lot more ways to so do things. So I think that best practices are still evolving. Personally I like examples. I would recommend Joshua Suereth's Scala in Depth (http://www.manning.com/suereth/) after reading Programming in Scala. |
Hi Christopher, Quick question... are the surefire/unit tests with neo4j-scala currently working? (mvn clean install) When I build locally with mvn they fail, just checking if it my environment or just the current state. thanks, Kevin On 6/06/2012, at 12:02 AM, Christopher Schmidt wrote:
|
Yes - they should. Which one fails? On Fri, Jul 27, 2012 at 5:39 AM, khein <
|
Here's the failing area... Results : Failed tests: NeoWrapper should::read a property in a node in node['property'] notation(org.neo4j.scala.unittest.Neo4jWrapperRESTSpec): 'None' is not equal to 'Some(bar)' expected:<[Some(bar)]> but was:<[None]> Tests in error: Tests run: 36, Failures: 2, Errors: 11, Skipped: 0 On 27/07/2012, at 4:01 PM, Christopher Schmidt wrote:
|
These are the REST tests. You have to start a Neo4j server before... On Fri, Jul 27, 2012 at 6:06 AM, khein <
|
oh, that makes sense. I haven't used anything restful yet, just embedded. Thanks! On 27/07/2012, at 4:13 PM, Christopher Schmidt wrote:
|
Receiving the following compiler error:
type mismatch; found : List[(java.lang.String, ScalaObject with Equals)] required: List[(String, examples.wyrzytDatastore.IndexCustomConfig)]
Error location points to the '::' operator separating the two List elements. Using neo4j-scala 0.2.0-M1 with Scala 2.9.2.
When removing either List element, compiles fine. Since this is almost verbatim code as in the neo4j-scala readme, thought I'd report as an issue.
code is: --- ---
object datastore extends Neo4jWrapper with SingletonEmbeddedGraphDatabaseServiceProvider with Neo4jIndexProvider with TypedTraverser {
def neo4jStoreDir = "data/datastore.db"
override def NodeIndexConfig = ("personIndex", Map("provider" -> "lucene", "type" -> "fulltext")) :: ("eventIndex", Map("provider" -> "lucene", "type" -> "fulltext")) :: Nil
The text was updated successfully, but these errors were encountered: