搜索引擎如何进行'AND'操作?(How do search engines conduct 'AND' operation?)
请考虑以下搜索结果:
好。 页面被索引,它只需要查找索引表中的计数和前几个项目,因此速度是可以理解的。
现在考虑使用AND操作进行以下搜索 :
- 谷歌为'大卫约翰' ('大卫'和'约翰') - 在0.25秒内达到1.73亿次点击
这让我勾选;)搜索引擎如何能够如此快速地在巨型数据集上获得AND操作的结果? 我看到以下两种方式来执行任务,两者都很糟糕:
- 你进行'大卫'的搜索。 拿着巨大的临时表,在上面搜索“John”。 但是,临时表未被“John”索引,因此需要进行强力搜索。 无论你有什么硬件,这都不会在0.25秒内计算出来。
- 通过所有可能的单词组合索引,如'David John'。 然后我们面临关键数量的组合爆炸,甚至谷歌都没有处理它的存储容量。
Consider the following search results:
- Google for 'David' - 591 millions hits in 0.28 sec
- Google for 'John' - 785 millions hits in 0.18 sec
OK. Pages are indexed, it only needs to look up the count and the first few items in the index table, so speed is understandable.
Now consider the following search with AND operation:
- Google for 'David John' ('David' AND 'John') - 173 millions hits in 0.25 sec
This makes me ticked ;) How on earth can search engines get the result of AND operations on gigantic datasets so fast? I see the following two ways to conduct the task and both are terrible:
- You conduct the search of 'David'. Take the gigantic temp table and conduct a search of 'John' on it. HOWEVER, the temp table is not indexed by 'John', so brute force search is needed. That just won't compute within 0.25 sec no matter what HW you have.
- Indexing by all possible word combinations like 'David John'. Then we face a combinatorial explosion on the number of keys and not even Google has the storage capacity to handle that.
And you can AND together as many search phrases as you want and you still get answers under a 0.5 sec! How?
原文:https://stackoverflow.com/questions/2340665
最满意答案
而不是
async
使用defer
。 使用defer
标记脚本将不会运行,直到页面加载! 像这样的东西:<script src="source/to/script" defer></script>
Instead of
async
usedefer
. Withdefer
tag script won't run until page loads! Something like this :<script src="source/to/script" defer></script>
相关问答
更多-
Applet优化JVM(Applet Optimize JVM)[2022-08-11]
您当然可以在客户端生成演示文稿,并且由于您提到的原因,如果可能的话,应始终在客户端上完成耗时的过程。 你可能想考虑在客户端使用javascript生成文件而不是applet,因为applet需要用户在他们的系统上安装java插件,你需要一个安全证书来签署applet。 另一方面, Javascript不需要任何特殊插件,也不需要安全证书,因为您可以生成文件数据并使用数据URI动态创建链接,以便用户下载/启动演示文稿 You certainly can generate the presentations o ... -
Applet加载失败通过SSL(Applet Loading failed over SSL)[2023-01-11]
事实证明,测试环境中的Web服务器不支持SSLV3协议。 它仅支持TLSV1。 默认情况下,Jre 5客户端使用SSLv2Hello和SSLv3,因此没有通用协议会引发错误。 但是,jre 6客户端默认运行在SSLv3和TLV1上,在这种情况下,TLSV1是常见的协议btw客户端和web服务器,连接成功,applet加载正常。 错误消息ClassNotFound虽然很奇怪.. Turns out that the Webserver in test environment is not supporting ... -
小程序没有加载(Applet not loading)[2024-05-12]
我找到了导致问题的原因:周围的代码挂在32位PC上的一个javascript函数中(由于文件路径错误)。 这导致屏幕冻结并且不执行applet。 I found what caused the problem: the surrounding code was hanging in one of the javascript functions on the 32-bit PCs (due to a wrong file path). This caused the screen to freeze and ... -
错误是来自服务器端我在跟踪控制台日志后得知,在我的服务器类路径中,comons-collections丢失,我添加了它,并且工作完美。 The error is from server side I came to know after tracing a console log, in my server classpath comons-collections is missing, I added it and things work perfectly.
-
加载Java Applet时出错(Error loading Java Applet)[2022-05-06]
您需要更改Java VM设置,如下所示: Go to the Java Control Panel (On Windows Click Start and search for Configure Java) Click on the Security tab Click on the Edit Site List button Click Add in the Exception Site List window Click in the empty field under the Location fi ... -
小程序麻烦(Applet troubles)[2023-09-01]
改为..如果您正在使用maven,那么您可以提取所需的所有类。 maven插件将为您完成此操作。 如果你有一个jks文件,它也可以签名。 这是maven的一些设置。maven-compiler-plugin 1. ... 在zk中使用隐藏的applet(using hidden applet in zk)[2020-01-19]
发生此问题是因为deployJava.js使用“document.write(applet tag)”来添加applet。 我将div组件添加到width =“1”,height =“1”的页面,并重写deployJava.js以在该div中追加applet。 而且它有效。 This problem happens because deployJava.js use "document.write(applet tag)" to add an applet. I add div component to t ...而不是async使用defer 。 使用defer标记脚本将不会运行,直到页面加载! 像这样的东西: Instead of async use defer. With defer tag script won't run until page loads! Something like this :使用多个作业队列提供程序之一。 示例包括DelayedJob(最简单的一个,不需要额外的部分),Resque和Sidekiq(更快,但你需要一个小的Redis服务器来使用它们)。 “作业”将是(取决于提供者)实现执行的类或实例。 如果它暗示在shell中运行某些东西,你可以这样做 %x[matlab command --options > output.ext] (这只是一个例子,你也可以使用字符串插值: %x[#{executable_name}] ) Use one of several job qu ...相关文章
更多- Open Source Search Engines in Java
- Riak Search
- 我的开源搜索引擎之路
- 在django中加入搜索引擎
- 搜索引擎lucene
- 使用Hibernate+solr取代hibernate search
- 使用nutch和solr建立搜索引擎
- 8 个基于 Lucene 的开源搜索引擎推荐
- 8 个基于 Lucene 的开源搜索引擎推荐
- JavaScript 搜索引擎 lunr.js
最新问答
更多- h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
- 创建一个功能(Create a function)
- 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
- PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
- Qt冻结循环的原因?(Qt freezing cause of the loop?)
- TableView重复youtube-api结果(TableView Repeating youtube-api result)
- 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
- SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
- 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
- 以编程方式创建UITableView(Creating a UITableView Programmatically)
- 如何打破按钮上的生命周期循环(How to break do-while loop on button)
- C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
- 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
- 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
- Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
- 设置kotlin扩展名(Setting a kotlin extension)
- 如何并排放置两个元件?(How to position two elements side by side?)
- 如何在vim中启用python3?(How to enable python3 in vim?)
- 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
- 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
- Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
- dedecms如何安装?
- 在哪儿学计算机最好?
- 学php哪个的书 最好,本人菜鸟
- 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
- 如何覆盖错误堆栈getter(How to override Error stack getter)
- 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
- USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
- 电脑高中毕业学习去哪里培训
- 正则表达式验证SMTP响应(Regex to validate SMTP Responses)