Advanced search errors when enabling Full Text search
Posted: Fri Mar 05, 2010 1:43 pm
Two issues: (7.0.3, build 12458)
1.) We've had complaints from our staff that our advanced search is not working properly. Example: typing in 'gotoh tuners' (without the quotes, FYI) returns no found items. It looks like advanced search is using a text as a literal string. The only way to get the expected results of any occurance of the words 'gotoh' and 'tuner' within a text field is to encase the words in asterisks. (*gotoh*tuner*) Is there a way to modify the advanced search logic?
2.) We have not had full text search enabled. I tried to enable it on our live site. I can click on the enable full text search box and click save, but the check box does not remain checked. When trying to use the advanced search page after this we get a yellow error screen and the following error:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'ac_Products' because it is not full-text indexed.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteReader(DbCommand command, CommandBehavior cmdBehavior)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command)
at CommerceBuilder.Data.Database.ExecuteReader(DbCommand command)
at CommerceBuilder.Products.ProductDataSource.AdvancedSearch(String keyword, Int32 categoryId, Int32 manufacturerId, Boolean searchName, Boolean searchDescription, Boolean searchSKU, Decimal lowPrice, Decimal highPrice, Int32 maximumRows, Int32 startRowIndex, String sortExpression)
at CommerceBuilder.Products.ProductDataSource.AdvancedSearch(String keyword, Int32 categoryId, Int32 manufacturerId, Boolean searchName, Boolean searchDescription, Boolean searchSKU, Decimal lowPrice, Decimal highPrice, String sortExpression)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)
at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at ConLib_AdvancedSearchPage.BindProductsGrid()
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.advancedsearch_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
URL: /AdvancedSearch.aspx
Reffering URL: /AdvancedSearch.aspx
User Id: 3676466
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
It looks like full text is partially enabled or attempting to be enabled, even though the check box does not appear to be checked in store configuration. We can click on the checkbox again (and save) and the error goes away. Checkbox stays blank. Any input on the error and/or the full text search checkbox error?
Thanks everyone!
1.) We've had complaints from our staff that our advanced search is not working properly. Example: typing in 'gotoh tuners' (without the quotes, FYI) returns no found items. It looks like advanced search is using a text as a literal string. The only way to get the expected results of any occurance of the words 'gotoh' and 'tuner' within a text field is to encase the words in asterisks. (*gotoh*tuner*) Is there a way to modify the advanced search logic?
2.) We have not had full text search enabled. I tried to enable it on our live site. I can click on the enable full text search box and click save, but the check box does not remain checked. When trying to use the advanced search page after this we get a yellow error screen and the following error:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'ac_Products' because it is not full-text indexed.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteReader(DbCommand command, CommandBehavior cmdBehavior)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command)
at CommerceBuilder.Data.Database.ExecuteReader(DbCommand command)
at CommerceBuilder.Products.ProductDataSource.AdvancedSearch(String keyword, Int32 categoryId, Int32 manufacturerId, Boolean searchName, Boolean searchDescription, Boolean searchSKU, Decimal lowPrice, Decimal highPrice, Int32 maximumRows, Int32 startRowIndex, String sortExpression)
at CommerceBuilder.Products.ProductDataSource.AdvancedSearch(String keyword, Int32 categoryId, Int32 manufacturerId, Boolean searchName, Boolean searchDescription, Boolean searchSKU, Decimal lowPrice, Decimal highPrice, String sortExpression)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)
at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at ConLib_AdvancedSearchPage.BindProductsGrid()
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.advancedsearch_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
URL: /AdvancedSearch.aspx
Reffering URL: /AdvancedSearch.aspx
User Id: 3676466
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
It looks like full text is partially enabled or attempting to be enabled, even though the check box does not appear to be checked in store configuration. We can click on the checkbox again (and save) and the error goes away. Checkbox stays blank. Any input on the error and/or the full text search checkbox error?
Thanks everyone!