0

I have created index with multiple fields in below way,

Class node {

@Indexed(indexName="index")
String name;

@Indexed(indexName="index")
String location;

}

I have a requirement where user can search based on name or location or both of them. What would be the performance issues in this case if i use only name or location in cypher query? As i might use only name or location while searching or both of them in cypher query.

Or Shall i create different indexes on these fields and use WHERE clause? Kindly let me know your opinion on this.

4

1 回答 1

0

发布回复,我从其他论坛的 Michael Hunger 那里得到。

认为可以将它们都放入一个索引中。你说的数据量是多少?Lucene 通常应该足够快地处理查找。

你可以搜索

template.query("name: foo AND location: bar") template.query("name: foo OR location: bar") 或其中任何一个

于 2012-08-28T19:50:09.213 回答