【发布时间】:2020-07-28 10:31:58
【问题描述】:
我已经使用 Datastax 6.7 几个月了。使用经典图创建搜索索引需要您通过 solr admin 创建 schema.xml 和 Solrconfig.xml,这可以正常工作。但是当我升级到 DSE 6.8 时,我需要使用 Datastax Studio 6.8 创建搜索索引。我已经能够创建 VertexLabels、materializedView 和 secondaryIndex。但我无法创建搜索索引。
这是我创建搜索索引的代码,
schema.vertexLabel('location').
searchIndex().
ifNotExists().
by('geo_point').
waitForIndex(3000).
create()
这是我得到的错误,
java.lang.IllegalStateException: Could not create search index for vertex label 'location' in graph 'food_cql'. RELOAD or REBUILD failed for search index on 'food_cql.location'. Failed to reload search index food_cql.location because: No resource solrconfig.xml for core food_cql.location, did you miss to upload it?
【问题讨论】:
-
您能否发布标签
location的顶点架构?我已经能够使用您的语法通过 Studio 毫无问题地创建搜索索引。这是创建索引后的架构:schema.vertexLabel('location').ifNotExists().partitionBy('locationKey', Varchar).property('geo_point', Point).create(); schema.vertexLabel('location').searchIndex().ifNotExists().by('locationKey').asString().by('geo_point').create() -
我的问题实际上在于重新加载核心。上传 schema.xml 和 SolrConfig.xml 后,我无法重新加载核心。您是否在 DC 上启用了图形和搜索工作负载?我认为如果我们需要在 datastax 中使用 Solr 查询,我们需要上传这两个文件。我在这里做错了吗?
-
schema.xml和solrconfig.xml是我们通过Gremlin schema API创建搜索索引时自动创建的,不需要先创建上传。
-
谢谢bswynn。我已经能够创建核心、搜索索引,还能够使用 CQL 和 Solr Admin 进行查询。
-
@bswynn 您是否有任何关于使用 Gremlin 制作空间参数、构面字段、构面枢轴和 filterquery(fq) 的信息?
标签: search datastax gremlin datastax-enterprise-graph