我目前正在使用ElasticSearch、Python/Django和Django-Haystack。
我希望根据关键字与最左侧的接近程度来对项目进行排名。
例子
项目是
Jeff is friends with John, Laura and Edward
Laura is friends with Francis, Drake, Jessica and Jeff
Edward is friends with Laura, Jeff and Jeff
如果 Jeff 是查询,我希望得到以下结果
Jeff is friends with John, Laura and Edward
Edward is friends with Laura, Jeff and Jeff
Laura is friends with Francis, Drake, Jessica and Jeff
但我明白了:
Edward is friends with Laura, Jeff and Jeff
Jeff is friends with John, Laura and Edward
Laura is friends with Francis, Drake, Jessica and Jeff
有任何想法吗?