Developer forum

Forum » CMS - Standard features » System.Data.SqlClient.SqlException in weighted search when having 5 or more words in the search input

System.Data.SqlClient.SqlException in weighted search when having 5 or more words in the search input

Peter Leleulya
Reply

Hi folks,

On a DW 8.8.10 solution we got a customer notification that when searching sometimes a template error occurs.
We can reproduce this and found out this happens when more than four words are submitted as the q value of the weighted search module when the search setting is set to 'Whole word (part of word if whole word not found)' or 'Part of word' in combination with searches in 'Pages and paragraphs'.

So,
q = one two three four works
q = one two three four five results in an error

The error:

System.Data.SqlClient.SqlException (0x80131904): The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
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 Dynamicweb.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior)
at Dynamicweb.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, CommandBehavior behavior, Int32 commandTimeout)
at Dynamicweb.Database.CreateDataReader(CommandBuilder commandBuilder, String database, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
at Dynamicweb.Database.CreateDataReader(CommandBuilder commandBuilder)
at Dynamicweb.Modules.WeightedSearch.Frontend.DBSearchItems(String[] searchItems, Boolean searchInItemLists)
at Dynamicweb.Modules.WeightedSearch.Frontend.Searchv1_SearchItemsDB(String q, ResultItemCollection searchResults, Boolean searchInItemLists)
at Dynamicweb.Modules.WeightedSearch.Frontend.DoSearch(String q, ResultItemCollection searchResults)
at Dynamicweb.Modules.WeightedSearch.Frontend.GetContent()
at Dynamicweb.Frontend.Content.GetModule(DataRow& ParagraphRow)
ClientConnectionId:04f5b416-d28d-4d38-928e-801e4b8c66f6
Error Number:8003,State:1,Class:16

 

Perhaps anyone can tell me why this happens and how to prevent this?
Couldn't find anything on this being a known issue which has been fixed in a later version ...

Thanks in advance,
Peter

 


Replies

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

I confirm the issue not to be reproduced on my test environment based on last DW89 and DW94, different options in the module paragraph settings, section 'Section-Page contents' have been tested.

BR, Oleg QA  

 

You must be logged in to post in the forum