Reputation: 1867
I'm currently extending the features of a Google Site Search/Custom search setup on a website. Im not very big on this subject, but ive setup the sitemap with "Pagedata" element that contains some extra data, like Date and Category.
<url>
<loc>
http://www.videnscenterfordemens.dk/viden-om-demens/til-patienter-og-paaroerende
</loc>
<lastmod>2013-10-28</lastmod>
<PageMap xmlns="http://www.google.com/schemas/sitemap-pagemap/1.0">
<DataObject type="document" id="hibachi">
<Attribute name="category">En kategori</Attribute>
<Attribute name="date">20131028</Attribute>
</DataObject>
</PageMap>
</url>
Queries like this to get pages with a specific category:
q=patienter+more:pagemap:document-category:En kategori
But that don return the above page, instead in return other pages, that dont even have a category set. Any idea on what i need to do, to be able to search in pages with specific category attribute?
PS. the sitemap has been indexed by google after the changes where made.
Upvotes: 0
Views: 899
Reputation: 1103
One way to debug this it the Structured Data Testing tool:
In the tab Google custom Search you can see attributes recognized by Google for search. Seems like you pagemap is not appearing there - maybe check with other pages you mentioned and look for differences?
Also, annotating via sitemaps work only for verified site owners. If you're an owner of videnscenterfordemens.dk, maybe you need to verify your site with Webmaster tools?
Upvotes: 0
Reputation: 31
Try changing your page map as follows and you should see it show up in the structured data testing tool that Devnook linked.
<PageMap >
<DataObject type="document" id="hibachi">
<Attribute name="category" value="En kategori" />
<Attribute name="date" value="20131028" />
</DataObject>
</PageMap>
Upvotes: 1