trint99
-
9/6/2006 8:31:36 PM
Help me understand Search Modes in CMSSearchResults
I am using 1.9.2405 Pro.
I have two files uploaded. One file (File A) contains the phrase "Permissions Matrix". The other file (File B) contains the word "Permissions" but does not contain the word "Matrix".
I have configured my search page with a CMSSearchDialog and a CMSSearchResults.
protected void Page_Load(object sender, EventArgs e) { string searchString = WebProject.Functions.GetRequestValue( "searchtext", String.Empty ); if( !IsPostBack && !string.IsNullOrEmpty( searchString ) ) { SearchDialog.SearchExpression = searchString; SearchResults.SearchExpression = searchString; SearchResults.CMSSearchDialogID = ""; } else { SearchResults.CMSSearchDialog = SearchDialog; } }
If I search for "Permissions Matrix", the first time into the page, "Any Word" is the default mode and both File A and File B are returned. This is as I expect, because both files contain the word "Permissions".
If, in the SearchDialog, I set the search mode to "All Words" and search again, only File A is returned. This is as I expect, because File B does not contain the word "Matrix" and thus does not contain "All Words".
However, when I set the search mode to "Exact Phrase", both File A and File B are returned. My understanding is that, since File B does not contain the exact phrase "Permissions Matrix", it should not be returned.
I tried adding double quotes to the search string in the CMSSearchDialog's SearchExpression text box. With double quotes added, no matter what search mode I choose, both files are returned. Now I am REALLY confused.
Please help me understand what is happening.
|