题
我是索引国家代码作为顶点属性
v.setProperty("country","IN");
.
但是当我这样搜索时,如
g.indexQuery("search","v.country:IN").vertices();
.
返回零结果。我认为它是因为它是哈丁世代古典etagcode作为停止字。我怎样才能避免这个?
解决方案
您可以通过索引国家作为字符串来解决这个问题:
import com.thinkaurelius.titan.core.Parameter
g.makeKey("country").dataType(String.class).indexed("search", Vertex.class,
Parameter.of(Mapping.MAPPING_PREFIX, Mapping.STRING)).make()
g.commit()
.
看全文和字符串搜索细节。
欢呼, 丹尼尔
不隶属于 StackOverflow