As mentioned in one of our previous post for search part 2
we are using FullTextSqlQuery object from Microsoft.Office.Server.Search.Query.
But we are facing problem for while creating query and assigning to QueryText method.
QueryText method accepts string object but it has a limitation.
You can assign maximum 4096 character string to QueryText.
We came to know about this by disassembling this DLL.
What we found is strange thing.
While setting QueryText property it will check
If object is type of FullTextSqlQuery then QueryText max length equals to 4096 char
Else if object is type of KeywordQuery then QueryText max length equals to 1024 char.
If length is more that this limit then it will give ArgumentOutOfRangeException();
We don’t know why is it so?
But just guessing that may be this limitation for rank optimization.
So conclusion is
FullTextSqlQuery QueryText should be < 4096 char
KeywordQuery QueryText should be < 1024 char.
2 comments:
Hi,
is there a workaround to use the Sharepoint Search API with a string any length?
nope no work around for this
Post a Comment