2

I have to implement a Google Custom Search for a website. The website has different content types. One of them is a "publication". A publication consists of different fields:

  • Title
  • Author
  • Published date
  • Document
  • Document type

Document is the URL to a PDF, Text, MS-Word, etc. document. And Document type is, as you can expect, the document type (ie. PDF, DOC, TXT, etc).

I will need this information to be in the Rich Snippet because I have to format the search results differently for each document type (ie. include a different icon, etc).

What schema should I be using for that? I could not find information about how to structure data for that kind of content. Can I use anything from Schema.org? Or should I create my own? Any idea?

Thanks in advance for any input on that.

MrUpsidown
  • 21,592
  • 15
  • 77
  • 131

1 Answers1

3

For customizing results snippets in Google Custom Search, it doesn’t matter which vocabulary you use in your RDFa. You could use an existing one (like Schema.org), or create your own, or use any combination of multiple vocabularies.

You can see the extracted structured data that can be used for this purpose in the Google Structured Data Testing Tool by clicking at "Custom Search Result Filters" (or by changing the results filter from "All data" to "Custom Search Engine").

You can fetch this structured data and create your own presentation layer.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • Hey, thanks for that. It does make sense! Now, aside the Google CSE, I think implementing RDFa is a good idea also for standard Google web search/indexing (correct me if I am wrong). So isn't it better to use a standard vocabulary for that? Or should I be using a mix of both in my case? – MrUpsidown Aug 11 '15 at 10:28
  • 2
    @MrUpsidown: Yes, for Rich Snippets in Google Search, you [have to use the Schema.org vocabulary](https://developers.google.com/structured-data/schema-org) (and Google supports the syntaxes/formats JSON-LD, Microdata and RDFa). So if you want to get Rich Snippets in both search engines, use the vocabulary Schema.org for as much as possible, and additional vocabularies for cases where Schema.org is missing properties/types that you need for your custom snippets. – unor Aug 11 '15 at 11:07
  • Perfect. Thanks a lot for your input! – MrUpsidown Aug 11 '15 at 11:17