0

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.

Christian Bekker
  • 1,857
  • 4
  • 27
  • 43

2 Answers2

1

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>
LucianAMD
  • 31
  • 2
0

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?

Devnook
  • 1,103
  • 7
  • 9
  • Hmmm. well it is verified on webmaster tools.. Is it better to place my pagemap in the html? i just think its a bit messy... is my pagemap structure correcT? – Christian Bekker Oct 31 '13 at 11:01
  • Now added pagemap in the html, using this method https://support.google.com/customsearch/answer/1628213 .. but still the testing tool says that there is no structured data – Christian Bekker Oct 31 '13 at 13:31