java - @功能 提示一般如何实现?
天蓬老师
天蓬老师 2017-04-18 10:32:13
0
3
426

现在各种地方都有@功能,典型的qq空间。 一般输入中文或者拼音 ,都可以提示出名字,而且不是首字符,中间的字符也可以。 而且速度都很快,一般都是100ms以内,就提示。这个是如何实现的?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
Peter_Zhu

https://github.com/algolia/au...
The basic function is to complete it automatically. You can check out the plug-in in the link, it may be helpful. The key is how you provide an automatically completed list of alternative data...

Peter_Zhu

What I am talking about is the prompt of @, not the analysis of @
Simply put, if there is a personal name Wang hello, you enter ll, e, wang, Wang, an. . . . It can prompt the name Wang hello.

Ty80

In fact, the principle is the same, but if your data volume is relatively large, it is not recommended to implement it directly based on the database. The like query performance is really not complimentary for large data volumes. It is recommended to introduce Lucene and spell out the name (name) and name (namePY) Index, and then implement a retrieval interface. After entering the @ symbol, just perform Suggest+ajax calling interface based on user input.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template