如何通过关键字按搜索结果顺序排序字母? [英] How to order the alphabet in search result order by the keyword ?

查看:215
本文介绍了如何通过关键字按搜索结果顺序排序字母?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的网站搜索结果有点问题。当我把关键字和点击搜索....一切正常我得到了正确的结果,但他们没有按关键字排序,但他们按字母顺序排序......一些问题确实发生,如果有的话许多结果显示...人们把关键字的真正结果将在最后一页...因为计算机顺序由字母表。

例如...我把关键字IN

搜索结果显示.... Anin Chinmai Intel .....而不是人们搜索的订单..


我该如何设置这个?


非常感谢你先生。

Paitoon

Hi,
I got a little bit problem about search result in my site. When i put the keyword and click on search ....everything work fine i got the correct result but they not order by the keyword,but they order by the alphabet.....some and the problem is happen sure if there are many result to display...the real result that people put keyword for will be in the last page...because the computer order by the alphabet.
for example...i put the keyword IN
The search result display .... Anin Chinmai Intel .....instead of order by what people search for..

How can i set up this?

Thank you so much sir.
Paitoon

推荐答案

Heya,Paitoon 。


您希望代码做什么?举个例子。

你的代码是做什么的,你不想要它做什么?举个例子。

你的代码是什么*不是*它应该这样做?举个例子。
Heya, Paitoon.

What do you want your code to do? Give an example.
What is your code doing that you don''t want it to do? Give an example.
What is your code *not* doing that it is supposed to? Give an example.


您正在进行相关性搜索,这不是一项简单的任务。你必须首先确定*什么*对用户来说比其他东西更重要,然后确切地说*它应该是多么相关,最后如何*计算*相关性。


你应该得到你的搜索结果,通过你的相关性算法发送它们,对数据进行排序,然后保存/显示它。
You are after relevance searching, which is no simple task. You must first decided exactly *what* counts as more relevant to the user than something else, then exactly *how* relevant it should be, and finally how to *calculate* that relevance.

You should get your search results, send them through your relevance algorithm, sort the data, and then save / display it.


我仍然对此有所了解......但是我可以给你举个例子:

i想找到名字以开头的人所以我把关键词 i 点击进入搜索.....然后搜索结果带有我在旁边的单词....例如Adipong Adichart Bird Chinmai Diorgirl

但他们没有按我搜索的顺序排序。它的顺序by abcdef g ........


似乎搜索知道我想找到名字中名字为i的人,但是不要通过命令我 ..以相反的方式通过abcde订购

f ......


我从谷歌或脸上看到当我把关键词和点击搜索时预订...它将显示以我搜索的关键字开头的单词...


但在我的网站中搜索将找到具有我搜索的关键字的名称,但不是与该关键字一起订购但是按abcdef g排序.........


所以压力: - /

Paitoon
I still cunfuse with this......but i can give you the example:
i want to find the people who have the name start with I so i put the key word i and click to search.....then the search result come with the word which have i in side....for example Adipong Adichart Bird Chinmai Diorgirl
but they not order by what i search for.It order by a b c d e f g........

Seem like the search knows that i want to find people who have name i in their name but it dont order it by i ..in the opposite way it order by a b c d e
f......

I see from google or facebook when i put key word and click search ...it will show the word which begin with the keyword i search for...


but in my site the search will find the name which have the keyword that i search for but not order with that key word but it order by a b c d e f g.........

so stress :-/
Paitoon


这篇关于如何通过关键字按搜索结果顺序排序字母?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆