iOS9搜索功能说明

这几天因为工作的需要接触到iOS9的搜索功能,这篇文章对iOS9的的搜索功能做了一个简单的介绍,感兴趣的朋友可以查看苹果的官方文档(https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/AppSearch/index.html#//apple_ref/doc/uid/TP40016308),同时我写了一个demo放在github上,有兴趣的朋友可以下载参考(https://github.com/JinLeiWang/CoreSpotlight-Demo)。

iOS9的search功能提供一种方式来提高应用的曝光率。用户可以通过Spotlight、Safari、Handoff、 Siri和Reminders搜索到相关应用。

搜索index
1、A private on-device index。保存在用户设备上,不会同步到Apple服务器与其它设备上。
2、Apple’s server-side index。pubulic index,内容保存在应用服务器。

设置search内容主要有三种方式
1、 NSUserActivity。可以将用户的使用信息设置为搜索项,on-device index。
2、Core Spotlight。on-device index。适合持续的用户数据。
3、Web markup。pubulic index.内容必须在应用服务器,苹果利用applebot(苹果网络爬虫)获取相关数据,iOS所有用户均可以利用Spotligight和Safari搜索功能获取到相关内容。中国不支持(Note that search results generated by web markup are shown in countries that are supported by Spotlight Suggestions.)

⚠️尽管iOS9可以使用search功能,但是NSUserActivity与Core Spotlight不支持 iPhone 4s, iPad 2, iPad (3rd generation), iPad mini, and iPod touch (5th generation)。

支持的快捷操作
1、拨打电话。
2、导航。

可以与iOS9 search功能配合使用的三种技术
1、Universal links.
2、Smart App Banners.
3、Handoff.

影响搜索结果的因素
1、用户使用内容的频繁性、相关性(which is captured only through the use of NSUserActivity)。
2、搜索结果点击次数。
3、make-up web content,依据流行度与可用的数据量、可用数据的数据量(In the case of marked-up web content, the popularity of a URL and the amount of structured data available )。

实现搜索功能时考虑的三个问题
1、Do you have a website that hosts some or all of the content that’s in your app?
2、Does your app contain user-generated or user-specific data?
3、Does your app contain content that users are likely to want to revisit?


你可能感兴趣的:(search,IOS9)