Google Custom Search, structured data not working - search

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.

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>

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?

Related

NetSuite Advanced PDF Page Break

Looking for some support on NetSuite Advanced PDF's. I'm configuring an advanced PDF for our Purchase Orders and we're looking to add ~2 pages of terms and conditions as an appendix to our PO form within the same PDF file.
Any recommendations on how to configure this?
Insert a <pbr /> element prior to your T&C
If you are not using source view on the template you should start doing that. It opens a world of possibility.
You can also use <pbr /> to change some characteristics of the following page. See https://bfo.com/products/report/docs/userguide.pdf for details.

How to customize the HTML code of Content Query Web Part

I want to custom the output HTML code of CQWP and I do not want to see <table class="s4-wpTopTable">...</table>. But even I try to edit ContentQueryMain.xsl file by the help of this article:Customizing the HTML code of a Content Query Web Part, the table is still there.I can't even find any code generated the table which class is "s4-wpTopTable".
So ,I need some talent guy to tell me how to stop the CQWP to generate TABLE.
I have tried to set the Content Query Webpart's SuppressWebPartChrome to "True",but the table is still there, such a big problem.
I faced problems like you had and I decided to develop a web part that makes it easy to customize the look & feel of a portal. You can find detailed information about it here: Item Lister Web Part
If you want to customize the output HTML of CQWP,you should:
Insure your CQWP is NOT in the webpartzone, because the webpartzone will make the the SuppressWebPartChrome does not work for your webpart.
Insert your webpart to the page with the help of SPD,and then in the code view,you can change the SuppressWebPartChrome of CQWP to True(Defualt is False).
Look at the source code of your page,the <table class="s4-wpTopTable">...</table> is not there now, cool!
Anyother addtionnal code generated by sharepoint of the CQWP,you can custom it in your ContentQueryMain.xsl file, so you should learn the language--XSTL .Don't be afraid of it,it is so easy for you to learn in one hour.

Fields not present in custom Content Type (inherited from "Page") SharePoint

so I want to deploy a custom Content Type based on "Page" by Feature. The deployment of the Content Types works fine -- the custom Content Types is created based on "Page".
The thing that is missing are the FieldRefs: The Fields I reference in the FieldRefs Tag are not showing up in my deployed Content Type.
My Elements.xml looks like ...
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field Type="Text"
DisplayName="PlantName"
Required="FALSE"
Group="Custom Columns"
ID="{2068B882-8349-4a7f-BA3A-60BE60DEFF9A}"
StaticName="PlantName"
Name="PlantName" />
<ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900A96BBF2C61EC4534A7654CEF00B72A9D"
Name="PlantDocument"
Group="Custom Content Types"
Description="PlantDocument"
Hidden="FALSE"
Version="0">
<FieldRefs>
<FieldRef ID="2068B882-8349-4a7f-BA3A-60BE60DEFF9A"
Name="PlantName" />
</FieldRefs>
</ContentType>
</Elements>
Can anyone tell me why "PlantName" is not present in my Content Type?
THANKS A LOT FOR ALL HELP!
I was having a similar problem, and after some experimentation I found that comments in the XML cause havoc.
This works fine
<FieldRefs>
<FieldRef ID="{4B9D42FA-8081-49AB-9F89-72FAB3C6609C}"/>
</FieldRefs>
This does not work
<FieldRefs>
<!-- My field comment -->
<FieldRef ID="{4B9D42FA-8081-49AB-9F89-72FAB3C6609C}"/>
</FieldRefs>
I will refrain from commenting on this as I may get upset and stop working.
I'm not sure if I've understood your issue totally but it sounds similar to something I've seen before.
I'm going to assume you've checked all the obvious things like your schema definition and wether you're deactivating and activating the your content type feature after deploying your schema..
Once you add a content type to your site, the likely scenario is that you create an instance of a page/list item based on that content type somewhere in your site. In my case it was two sub sites down. This worked fine for me. Once I updated my content type (by adding in a new field), although I could see the content type change spearing in the content type gallery but I couldn't see the change go through to the sub site where I had created a page based on my content type. This is because, when you create an instance of a item based on a certain content type, the sub site creates a cached copy of that content type in its current condition.
Later when you make changes to the content type, the cached copy in the subsite does NOT get updated. This isn't the most obvious thing in the world.
Maybe you cannot see the fields appearing in the sub site but they do exist in your site columns and the your root content type has been updated correctly.
If this is your issue then you need to perform, what we call a 'content-type push down'. To do this you can either download Gary Lapointe's stsadm command which you'll have to run through the command prompt (I hear this is risky in some scenarios). You can also do this manually but sorry, I can't remember exactly how this is done. You have to delete all instances based on your content type and try again. Quite a painful little task.

High CPU usage when deploying content types via a SharePoint feature

I'm creating a SharePoint feature which will be used to deploy some content types (and their custom columns/ fields) into a a new SharePoint site.
I've used an external tool to generate the CAML for the content types (Andrew Connell's custom STSADM commands) but when I put them into the feature and run it I hit a problem.
The feature activates like I expect, but when I try and view the Site Content Types (/_settings/mngctypes.aspx) the CPU shoots up to 100% usage (w3wp) and stays there.
Has anyone seen this and know how to resolve it?
I've seen this before, the XML generated does not contain the XML Namespace:
Also note that this tool doesn't create XML that is 100% correct for use in a Feature.
Bad-XML:
<XmlDocument>
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>
Good-XML:
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>
By custom columns do you meant custom fields? Which Content Type page are you trying to view? The list of all site content types, or the details page for your content type? If its the latter, could it your custom columns be causing the error?

What is the easiest way to implement a search function on a website?

The website is almost entirely d/x/html, and is hosted on a linux/apache server.
While I'm not opposed to using a database, I've been told that I can implement a solution that parses through the html documents and returns my search results without mucking about too much with asp/php/cgi (which I am most certainly a novice in).
Is this possible? Is there a better way? Should I look to a specific third party application?
THANKS!!!
Instead of paying for search appliances, you can also pay Google to have it crawl your site and present customized search results. It's inexpensive and Google does a good job indexing everything (including PDFs). If I remember correctly its ad-supported version is free (i.e. you pay to remove the ads)
There are "spiders" that will crawl your site and generate some form of search index. How reliable these are and how well they perform I really can't say. We recently purchased two Google search appliances here at work and use one for our intranet and one for our external web. They do a very nice job of indexing exactly the content you want as well as setting up specialized "search zones" and even keyword mapping.
I highly recommend them: http://www.google.com/enterprise/mini/
Nicholas
The google search is the easiest route. The only thing I would suggest is that you add a google sitemap to your site. That way you can notify google of updates or new pages to make sure the search listing is as up-to-date as possible.
If you can write some code in your favorite programing language you can also have a look at Apache Solr (url). The concept is simple: You get a seperate Search-Server, already implemented and as a seperated program. You can put in Documents by Posting (HTTP-Post) them to the Search-Server. You can make searches by issuing a GET-Request and getting back a XML-File with the search results.
What you have to write is the code to send the files to the search-search (only some lines of code) and the parsing of the xml-search-results (can be done easily with xslt)
I dont know how many documents you are talking about but this solution scales very well, I currently use it with 2.5 Mio Pages in the Index and get results in under 50 ms.
Add a link to Google that only returns results for your domain (with a site: delimiter). I don't know how to do this but it shouldn't be hard
Thanks all! I'm currently looking into a google custom search engine. The search bars with logos are cumbersome, but if all google wants for the legwork on this is a watermarked search bar and a couple ads served, then that's the solution for me!
Here's how I did the search on my blog (using Google)... don't remember where I got this template from originally but from the comments I guess it originally came from javascriptkit.com. :)
<script type="text/javascript">
// Google Internal Site Search script- By JavaScriptKit.com(http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit-http://www.javascriptkit.com/
// This notice must stay intact for use
//Enter domain of site to search.
var domainroot="ericasberry.com"
function Gsitesearch(curobj)
{
curobj.q.value="site:"+domainroot+" "+curobj.qfront.value
}
</script>
<form action="http://www.google.com/search" method="get"
onSubmit="Gsitesearch(this)">
<p>Search ericasberry.com:<br />
<input name="q" type="hidden" />
<input name="qfront" type="text" style="width: 180px" />
<input type="submit" value="Search" /></p>
</form>
Google Ajax Search API

Resources