W3C home > Mailing lists > Public > public-schemaorg@w3.org > May 2016

Re: SearchAction vs FindAction, and OpenSearch totalResults equivalent

From: Tim Strehle <tim@strehle.de>
Date: Tue, 31 May 2016 16:20:40 +0200
Cc: "schema.org Mailing List" <public-schemaorg@w3.org>
Message-Id: <89BEFD66-8621-4274-9494-5D968E28002F@strehle.de>
To: Jarno van Driel <jarnovandriel@gmail.com>
Hi Jarno,

thanks a lot for taking the time to work out a solution! 

So you’re using an ItemList which allows you to use the numberOfItems property. Makes sense to me.

I don’t think I fully understand why you went with a top-level ItemList (linked to a SearchResultsPage via mainEntityOfPage) instead of a top-level SearchAction with an ItemList in its result property. What was your reasoning behind that? (I’m a schema.org newbie, so I’m probably missing something obvious.)

Thanks again,
Tim

> Am 31.05.2016 um 13:00 schrieb Jarno van Driel <jarnovandriel@gmail.com>:
> 
> Hi Tim,
> 
> I just read your blog post: https://www.strehle.de/tim/weblog/archives/2016/05/30/1593 <https://www.strehle.de/tim/weblog/archives/2016/05/30/1593> and had a go at it. Does the following work for you?
> 
> <script type="application/ld+json">
> {
>   "@context":"http://schema.org <http://schema.org/>",
>   "@id":"#MainEntity",
>   "@type":"ItemList",
>   "mainEntityOfPage":
>   {
>     "@type":"SearchResultsPage",
>     "url":"http://example.com/search?page=2 <http://example.com/search?page=2>",
>     "potentialAction":
>     [
>     {
>       "@type":"SearchAction",
>       "actionStatus":"CompletedActionStatus",
>       "query":"john doe",
>       "result":
>       {
>         "@id":"#MainEntity"
>       }
>     },
>     {
>       "@type":"SearchAction",
>       "name":"Did you mean 'jane doe'?",
>       "target":
>       {
>         "@type":"EntryPoint",
>         "urlTemplate":"http://example.com/?q=jane+doe <http://example.com/?q=jane+doe>"
>       }
>     },
>     {
>       "@type":"SearchAction",
>       "name":"See also: 'dole'",
>       "target":
>       {
>         "@type":"EntryPoint",
>         "urlTemplate":"http://example.com/?q=dole <http://example.com/?q=dole>"
>       }
>     }    
>     ]
>   },
>   "numberOfItems":35,
>   "itemListOrder":"ItemListOrderDescending",
>   "itemListElement":
>   [
>   {
>     "@type":"ListItem",
>     "@id":"#FirstSearchResult",
>     "previousItem":"http://example.com/search?page=1#LastSearchResult <http://example.com/search?page=1#LastSearchResult>",
>     "position":1,
>     "item":
>     {
>       "@type":"ImageObject",
>       "name":"Photo of Jane Doe"
>     }
>   },
>   {
>     "@type":"ListItem",
>     "position":2,
>     "item":
>     {
>       "@type":"ImageObject",
>       "name":"Photo of John Doe"
>     }
>   },
>   {
>     "@type":"ListItem",
>     "@id":"#LastSearchResult",
>     "nextItem":"http://example.com/search?page=3#FirstSearchResult <http://example.com/search?page=3#FirstSearchResult>",
>     "position":3,
>     "item":
>     {
>       "@type":"ImageObject",
>       "name":"Photo of John Doe"
>     }
>   }
>   ]
> }
> </script>


Received on Tuesday, 31 May 2016 14:21:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:12:25 UTC