在我之前的两篇文章中,我谈到了使用Windows 搜索(Windows Search)来查找您想要的内容。我在那些文章中谈到的一些术语可能看起来更像火星人(Martian)而不是你自己的正常说话方式(毫无疑问,因为通常使用这种语言的程序员创建了这个系统)。为什么没有办法通过“说话”来告诉Windows你想找到什么,就像你通常问别人问题的方式一样?理论上是有办法的!它被称为自然语言搜索(Natural Language Search)。让我们看看使用它是否让生活(和搜索)更轻松。
开始自然
由于某些只有Microsoft知道的原因,自然语言搜索(Natural Language Search)默认未打开。要启用它,请在开始菜单搜索框中键入(Start Menu)文件夹选项(Folder Options),然后单击它。在文件夹选项(Folder Options)中,转到搜索(Search)选项卡。在这里,您将看到“使用自然语言搜索”("Use natural language search")选项。选中该框,单击OK,然后您就可以开始了。
执行此操作后,一切看起来都不会明显不同,直到您开始搜索某些东西。让我们看看它有什么不同。
有意义的搜索——有时
根据Microsoft(Microsoft web)网站,搜索(Search)使用所谓的高级查询语法(Advanced Query Syntax)。这是他们解释可用于搜索的术语的文章:Advanced Query Syntax (Windows)。我在之前的文章中讨论了使用查询术语,这应该为您提供这些术语的完整列表。
然而,在尝试使用自然语言搜索(Natural Language Search)时,我发现一些按照微软(Microsoft)的说法应该可以工作的搜索对我来说根本不起作用。这是他们的页面,非常简要地提到了Natural Language,一直在底部:Windows 中搜索的高级技巧(Advanced tips for searching in Windows)。以下是他们提供的一些示例:今天的电子邮件(e‑mail today)、2011 年的文档、作者苏珊(Susan)、图片假期。
由于搜索引擎(search engine)会忽略“the”、“from”和“of”等常用词,即使结果听起来不太自然,您也可以忽略这些词。我决定尝试搜索留下其中一个词,看看自然语言搜索(Natural Language Search)是否真的使用“自然”语言。
为了继续使用之前文章中的搜索词,假设我想查找猫的图片。代替cat type:.jpg,让我们试试cat 的图片(picture of cat)。
等一下!你是什么意思,“没有项目匹配你的搜索”?("No items match your search"?)我有各种各样的猫的照片。就像YouTube 和 LOLcats(YouTube and LOLcats)没有猫的照片就无法生存一样,养猫的人也必然会拍照。这是生活中的事实之一。
好吧,让我们尝试不同的方式。这次是猫的照片(photo of cat)。
显然,就搜索(Search)而言,我使用的“自然语言”是不自然的。让我们再试一次cat photo。(我发现图片猫(picture cat)给出了相同的结果。)
这还差不多!Windows 7 似乎只将 .jpg 文件视为“图片(Pictures)”,而其他文件类型称为“文档”或“文件”,但这没关系。只要(OK. As)搜索出现您要查找的内容,搜索(Search)结果如何分类都没有关系。
日期很重要
假设我不想包含我今天创建的猫图片,而只包含较旧的。这需要一点点弄清楚,而且确实必须按照Windows认为自然的方式进行,这可能与普通人认为的自然方式不符。为了得到我想要的结果,我尝试输入cat photo created before today。这得到了相当多的结果。
然而,当我尝试2012 年 6 月创建的猫照片(cat photo created june 2012)时,我什么也没得到。即使至少有 20 张正确标记或命名为“猫”的图像符合该搜索要求。(我还尝试了 2012 年 6 月创建(document created june 2012)的文档,但一无所获——没有任何类型的文档!)
如您所见,使用自然语言搜索(Natural Language Search)查找文件并不像大多数人想象的那样“自然”。
我还能找到什么?
很大程度上取决于驱动器的索引方式以及用于创建和存储文件的软件。我们已经看到只有 .jpg 文件被算作“图片”。
例如,如果您希望您的电子邮件被索引,并且如果您不使用默认文件夹(default folder)来存储电子邮件(或者如果您不使用Windows 电子邮件(Windows email)应用程序),您将必须告诉搜索(Search)索引文件夹您的电子邮件将被保留。有关如何执行此操作的说明,请参阅上一个教程:如何在Windows 7中使用(Windows 7)搜索(Search)和自定义搜索索引(Search Index)。
但是,仅当您使用与Windows Search(Windows Search)以及Windows如何索引数据的方式兼容的电子邮件客户端时,才会正确索引电子邮件。这意味着您应该使用电子邮件客户端,例如Microsoft Outlook、Windows Live Mail 或 Mozilla(Windows Live Mail or Mozilla)的Thunderbird。
我将Eudora用作桌面电子邮件客户端(desktop email client),但我无法让Search为我找到任何电子邮件。如果我为我的Eudora收件箱输入(Eudora)文件名(file name),它会发现没有问题,但不会对单个邮件进行索引或搜索。
搜索中的搜索
与使用Search(Search)的其他方式相比,搞清楚自然语言搜索(Natural Language Search)只是时间问题和大量(time and plenty)实验。如果你愿意灵活一点,如果你牢记程序员的“自然语言”几乎总是与我们其他人的“自然语言”不同,那么你应该能够弄清楚如何让自然语言搜索(Natural Language Search)为您服务。如果这不值得,请参阅以前的文章,了解如何使用文件名、通配符和高级查询语法(Advanced Query Syntax)术语进行搜索。
Experimenting With Natural Language Search In Windows 7 Searches
In my previous twо articles, I talked about using Windows Search to find what you want. Some of the terminology I talked about in those articles can look more like Martian than your own normal way of speaking (undoubtedly because programmers who normally use that kind of language created the system). Why isn't there a way to tell Windows what you want to find by "speaking" to it the way you would ordinarily ask someone a question? In theory, there is a way! It's called Natural Language Search. Let's see whether using it makes life (and searching) easier.
Start going natural
For some reason known only to Microsoft, Natural Language Search is not turned on by default. To enable it, type Folder Options into the Start Menu search box, then click on it. In Folder Options, go to the Search tab. Here you will see the option "Use natural language search". Check that box, click OK, and you're set to go.
Nothing will look obviously different after you do this, until you start to search for something. Let's see what a difference it makes.
Searches that make sense—sometimes
According to the Microsoft web site, Search makes use of the so called Advanced Query Syntax. Here's their article explaining the terminology you can use for searches: Advanced Query Syntax (Windows). I discussed using query terms in the previous articles, and this should provide you with a comprehensive list of those terms.
However, in experimenting with Natural Language Search, I found that some searches that are supposed to work, according to Microsoft, did not work at all for me. Here's their page that gives a very brief mention to Natural Language, all the way at the bottom: Advanced tips for searching in Windows. And here are some of the examples they gave: e‑mail today, documents 2011, author Susan, pictures vacation.
Since the search engine ignores common words like "the" and "from" and "of," you can leave those out even though the result sounds something less than natural. I decided to try searching leaving one of those words in, just to see if Natural Language Search really uses "natural" language.
To keep using my search term from the previous articles, let's say that I want to look for pictures of cats. Instead of cat type:.jpg, let's try picture of cat.
Wait a minute! What do you mean, "No items match your search"? I've got all kinds of pictures of cats. Just as YouTube and LOLcats would never survive without pictures of cats, people who have cats are bound to take pictures. It's one of those facts of life.
All right, let's try it a different way. This time, photo of cat.
Apparently, the "natural language" I'm using is unnatural as far as Search is concerned. Let's try one more time with cat photo. (I discovered that picture cat gives the same results.)
That's more like it! It appears that Windows 7 only considers.jpg files to be "Pictures," while other file types are called "Documents" or "Files," but that's OK. As long as the search turns up what you're looking for, it doesn't matter how the results are categorized by Search.
Dates do matter
Let's say I didn't want to include the cat pictures I created today, but only older ones. This takes a little figuring out, and it does have to be done the way Windows thinks is natural, which may not match the way the average person thinks is natural. To get the results I want, I tried typing cat photo created before today. This got quite a few results.
However, when I tried cat photo created june 2012 I got nothing. Even though there are at least 20 images properly tagged or named as "cat" that meet that search. (I also tried document created june 2012 and got nothing—no documents of any kind!)
As you can see, finding files with Natural Language Search is not quite as "natural" as most people might think.
What else can I find?
A lot depends on how your drive is indexed, and what software you are using to create and store your files. We've already seen that only.jpg files are counted as "pictures."
If you want your emails to be indexed, for example, and if you don't use the default folder to store email in (or if you don't use a Windows email app) you will have to tell Search to index the folders where your emails are kept. See the previous tutorial for instructions on how to do this: How to Use Search in Windows 7 and Customize the Search Index.
However, email will be correctly indexed only if you are using an e-mail client that is compatible with Windows Search and how Windows indexes data. This means that you should be using an e-mail client such as Microsoft Outlook, Windows Live Mail or Mozilla's Thunderbird.
I use Eudora as a desktop email client, and I have not been able to get Search to find any email messages for me. If I type in the file name for my Eudora inbox, it finds that with no problem, but the individual messages are not indexed or searched.
The search within the Search
Even more than with the other ways of using Search, figuring out Natural Language Search is a matter of time and plenty of experimentation. If you're willing to be flexible, and if you keep in mind that what is "natural language" for a programmer is almost always something different from what is "natural language" for the rest of us, you should be able to figure out how to make Natural Language Search work for you. If this isn't worth the effort, please see the previous articles on how to do the search using file names, wildcards, and the Advanced Query Syntax terminology.