简体   繁体   English

我应该使用Neo4j寻找类似用户还是坚持使用像MySQL这样的东西?

[英]Should I use Neo4j for finding similar users or stick with something like MySQL?

I'm starting a new project and although I'm used to MySQL, I'm worried about efficiency. 我正在开始一个新项目,虽然我已经习惯了MySQL,但我担心效率问题。 I'm open to other options, and graph databases sound intriguing. 我对其他选项持开放态度,图形数据库听起来很有趣。

I will need to find similar users based on location and rating like values. 我需要找到类似于位置和评级的类似用户。 In mysql I probably would have to join across 2 many to many relationships and order based on distance of both location and those values (euclidean distance probably). 在mysql中,我可能必须加入2到多个关系,并根据位置和这些值的距离(可能是欧几里德距离)进行排序。 MySQL seems slow with things like that. MySQL似乎很慢。

I will also need to do things like find 10 nodes with text that starts with a sub string, and has the largest number of connections (which is an autocomplete I guess). 我还需要做一些事情,比如查找10个节点,文本以子字符串开头,并且具有最大数量的连接(我猜是自动完成)。

Would Neo4j or another graph database do this easily and efficiently? Neo4j或其他图形数据库能否轻松有效地完成这项工作?

Yes, Neo4J is certainly more appropriate than MySQL. 是的,Neo4J当然比MySQL更合适。 I've used it myself for similarity searches and continue to do so. 我自己用它进行相似性搜索并继续这样做。 Check out Cypher , or Gremlin depending on how complex your criteria are -- together with the inbuilt Lucene index, it's terrific. 查看CypherGremlin取决于您的标准有多复杂 - 与内置的Lucene索引一起,它非常棒。

Examples of what you may be trying to achieve: http://docs.neo4j.org/chunked/stable/data-modeling-examples.html 您可能尝试实现的示例: http//docs.neo4j.org/chunked/stable/data-modeling-examples.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM