Error Running Simple Page Search Package

Topics: Standard packages, Troubleshooting
Apr 30, 2011 at 11:13 PM


I am running version Composite 2.1.1 converted to SQL Server.  I installed the Simple Page Search package version 2.0.1.  I followed the instructions at http://docs.composite.net/C1/Packages/CompositeC1searchpackages/CompositeSearchSimplePageSearch.aspx and everything seemed to install OK.  I set up a page for my search results and inserted the Composite.Search.SimplePageSearch.SearchResults function on the page.  Then I set up a search form by inserting the Composite.Search.SimplePageSearch.SearchForm function on my home page, specifying my search results page as instructed.  Now, when I search for something (or just display the search results page) I get the following error.:

Error: XSLT Function call markup for failed to parse ('The Function named 'Composite.Search.SimplePageSearch.GetSearchResult' is not known.'). Please see server log for more details.
Error details:
Failed to get value for function 'Layout.MasterTemplate'
One or more errors occurred.
Failed to get value for function 'Composite.Search.SimplePageSearch.SearchResults'
XSLT Function call markup for failed to parse ('The Function named 'Composite.Search.SimplePageSearch.GetSearchResult' is not known.'). Please see server log for more details.

Any help would be greatly appreciated.  Thanks!

John Graminski (john@graminski.net)

May 1, 2011 at 1:55 AM

Hi John,

I tried to repro, but could not (it worked as expected).

The function that is stated as missing (Composite.Search.SimplePageSearch.GetSearchResult) is a "External C# Function" and you should probably be able to see the definition of it below "Functions | C# Functions | Composite | Search | SimplePageSearch".  This definition points to a static C# method defined in the file "~/App_Code/Composite/Composite/Search/SimplePageSearch/SimplePageSearch.cs". Both the definition and the cs file was introduced when you installed the package.

My gut guess is that you are running on a site you have pre-compiled, and the new cs file is not "picked up" by asp.net, but thats just a guess.

Please the the server log (in the C1 Console, top menu Tools | Server Log) and see if there are any warnings or errors there. When Composite C1 start up C1 Functions (like this one that is missing) are resolved - any problems resolving a C1 Function is documented to the log.

Let me know what you find out.

 

Marcus

May 1, 2011 at 4:11 PM

Hi Marcus:

Thanks for the quick reply.  As it turns out, my hosting provider was having trouble with my SQL Server database access - I figured this out when my site crashed completely and I began to investigate.  Since I had previously converted my C1 site to use SQL Server, the database issue was the likely culprit.  This morning, my database was back and the search is now working as it should.

I do have one other question though - does the search only work on static page content?  The reason I ask is because the search does not seem to be able to find anything in my news content (or any other function-generated data).  It would be nice to have a search engine search the news articles. 

Also, does the search find partial words (e.g. if I search for the word "test" will it return results for the word "latest"?)  Thanks!

John Graminski

May 3, 2011 at 7:56 AM

> does the search only work on static page content?

Yes, the Composite.Search.SimplePageSearch  will do a simple LIKE search (string.Contains()) on Page titles and content only. There are a number of other search options which is based on indexes/crawlers which will search non-page content like news, blogs etc. All the search packages described below http://docs.composite.net/C1/Packages/CompositeC1searchpackages.aspx do this (except SimplePageSearch).

> Also, does the search find partial words (e.g. if I search for the word "test" will it return results for the word "latest"?)

I would expect this to be the case for SimplePageSearch - the other search packages use actual search products like Google or Microsoft Search Server so you can expect more from them.