I have generated my index with content categories defined for many documents. One type of category consists of an "A" concatenated with a number. In my search box, I'm hard-coding one of these for testing.
Here is my search box definition:
Code: <keyoti:SearchBox ID="sbxLibSearchBox" runat="server" AutoCompleteQuery="True" AutoCompleteQueryFailSilent="True" AutoCompleteQueryMaxSuggestions="10"
AutoCompleteQueryRunSearchOnSelect="True" AutoCompleteQueryShowNumberOfResults="True" CssClass="input-cont" OnSearch="sbxLibSearch_OnSearch" RememberQuery="True">
<QueryTextBox ID="qtbLibSearchBox" runat="server" CssClass="text init" type="text" />
<SearchButton ID="sbLibSearchBox" runat="server" CssClass="go" type="button" />
</keyoti:SearchBox>
Here is the OnSearch event handler:
Code: Protected Sub sbxLibSearch_OnSearch(ByVal sender As Object, ByVal e As System.EventArgs)
Dim SearchText As String = ""
Dim SearchBox As Keyoti.SearchEngine.Web.SearchBox = CType(sender, Keyoti.SearchEngine.Web.SearchBox)
If SearchBox IsNot Nothing Then
Dim ContentCategoryArray As String() = {"A6"}
SearchBox.SearchOptions = New Keyoti.SearchEngine.Search.SearchOptions("", ContentCategoryArray)
SearchText = HttpUtility.HtmlDecode(SearchBox.QueryTextBox.Value)
Response.Redirect(SearchResultsNavUrl(SearchText))
End If
Response.Redirect(Request.RawUrl)
End Sub
The results don't seem to be taking this content category into effect. It represents the ID of a specific author, yet I'm getting results for lots of different authors. Is there a different way to do the search options?
Thanks!
Dan