So I have some legacy code that extends the SharePoint 2010 Content Query Web Part. The old content query web part was quite slow and I’m looking to improve the performance of these user queries by using the crawled indexes in SharePoint Search and the Content Search Web Part.
I have setup the required managed property and a result source in SharePoint Central Admin in the search app. The SharePoint 2013 Search Query Tool is proving to be a very useful tool in troubleshooting SharePoint searches.
Anyway, now that I have my search working as expected, I want to place the content search web part on a web part page and query based on the user’s selection.
The query is basically all list items in lists created with a particular custom template. The Managed Property is called “ClientLookup”.
When hard coded in the query tool, “ClientLookup:9999Z”, the query correctly returns all the appropriate content. But, when I switch the form to use “Value of a field on the page”, it will not return any results…
The query is:
path:”http://myspserver.myco.com” ClientLookup:{Page.txtClientID}
I added an HTML Form Web Page to get the control on the form with the following html.
<div onkeydown=”javascript:if (event.keyCode == 13) _SFSUBMIT_”><input type=”text” name=”txtClientID” value=”9999Z”/><input type=”button” value=”Go” onclick=”javascript:_SFSUBMIT_”/></div>
What am I missing here?!?
Hey folks… Not a lot of answers or recommendations here… 🙁
I managed to get the regular SharePoint Search engine working great, but this Content Search Web Part is killing me…
Has anyone had any luck with the Keyword filter “Value of a field on the page”? I’m getting zip from it and an error in my ULS logs when I attempt to use it in the Content Search Web Part.
Arrrgh… I’m attempting to add this web page to the standard “DispForm.aspx” form.