我在我的应用程序中使用Lucene 4并且不想更改它.我正在尝试集成Neo4J,它将Lucene 3.5捆绑为IndexProvider实现,neo4j-lucene-index.
不幸的是,neo4j-lucene-index不起作用,并且排除了这种依赖性,应用程序只会在启动时无限期挂起.我已经尝试过neo4j-lucene4-index,但这似乎没有得到很好的维护,需要更新才能与Neo4J 1.9.1一起使用.这些变化超出了我对Neo4J内部的理解.
但是,我可以看到IndexProviders是可插拔的,所以我希望有一个现有的Lucene替代品 - 我现在无法找到它.任何人都可以指出我正确的方向吗?
Lucene 4已经出现了很长时间并且Neo4J不支持它,这似乎很奇怪.我错过了什么吗?
目前,我的POM对于我的Neo4J配置看起来像这样:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>2.2.1.RELEASE</version>
<exclusions>
<exclusion>
<artifactId>neo4j</artifactId>
<groupId>org.neo4j</groupId>
</exclusion>
<exclusion>
<artifactId>neo4j-cypher</artifactId>
<groupId>org.neo4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>1.9.1</version>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-lucene-index</artifactId>
</exclusion>
</dependency>
<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<version>1.9.1</version>
<exclusions>
<exclusion>
<artifactId>neo4j</artifactId>
<groupId>org.neo4j</groupId>
</exclusion>
<exclusion>
<artifactId>neo4j-cypher</artifactId>
<groupId>org.neo4j</groupId>
</exclusion>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-lucene-index</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- A temporary dependency until Neo4J builds in support for Lucene 4.
Looks like they're planning to incorporate this project anyway This project
is available on …Run Code Online (Sandbox Code Playgroud) 这类似于关于SO的其他一些问题,但与我能找到的任何问题都不完全相同.
哪个是在Javascript中检查未定义值的最佳方法,为什么?
第一个例子:
var a;
if (typeof(a) === 'undefined'){...}
Run Code Online (Sandbox Code Playgroud)
第二个例子:
var a;
if (a === undefined){...}
Run Code Online (Sandbox Code Playgroud)
因此,第一个示例是将类型的名称与字符串进行比较,第二个示例是使用等于运算符将变量与未定义的对象进行比较,该运算符检查类型和值是否相同.
哪个更好?或者他们俩都和对方一样好?
请注意,我不是在询问undefined和null之间或truthy或falsey之间的任何区别,只是这两种方法中的哪一种是正确的和/或更好的.
我正在使用带有 Node + Express 的 Firebase 管理员从 Appengine 更新 Firestore 文档。我有一些我想使用 Firestore 模拟器进行的测试。这是我得到的错误:
Error in post /requests Error: {"servicePath":"localhost","port":8080,
"clientConfig":{},"fallback":true,"sslCreds":{"callCredentials":{}},
"projectId":"test-project","firebaseVersion":"9.4.1","libName":"gccl",
"libVersion":"4.7.1 fire/9.4.1","ssl":false,
"customHeaders":{"Authorization":"Bearer owner"},"scopes":[
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"
]}
You need to pass auth instance to use gRPC-fallback client in browser. Use OAuth2Client from google-auth-library.
Run Code Online (Sandbox Code Playgroud)
在每次测试之前,我打电话:
var serviceAccount = require(process.env.FIREBASE_SA_CREDENTIAL);
firebaseAdmin.initializeApp({
credential: admin.credential.cert(serviceAccount),
projectId: 'test-project'
});
Run Code Online (Sandbox Code Playgroud)
并且测试正在使用一个简单地访问 Firestore 的类,如下所示:
this.db = firebaseAdmin.firestore();
...
Run Code Online (Sandbox Code Playgroud)
我有以下 npm 依赖项:
"@google-cloud/firestore": "^4.7.1",
"firebase": "^8.0.2",
"firebase-admin": "^9.4.1"
"firebase-tools": "^8.16.2"
Run Code Online (Sandbox Code Playgroud)
我正在启动模拟器并运行测试:
firebase emulators:exec 'jest --verbose=false'
Run Code Online (Sandbox Code Playgroud)
我看不到配置中有什么不正确 - …