我有一个网站有多个项目目标。 每个项目都有(例如):
- multiple tags
- multiple categories
- a size
- multiple types
- etc.
I would like to write a method to grab all similar projects based on the above criteria. I can easily retrieve similar projects for each of the above singularly (i.e. projects of a similar size or projects that share a category etc.) but I would like it to be more intelligent then just choosing projects that either have all the above in common, or projects that have at least one of the above in common.
理想的情况是,我要权衡每一项标准,即一个具有共同点的项目,与规模相近的项目相比,并不相似。 一个具有两个共同点的项目比一个具有共同点的项目更为相似。
我可以采取什么办法(实际和数学)来做到这一点?