I am working on a search function for a protected area of a website. It needs to search in the members section. I need to be able to search on the Name and two custom properties.
using Examine; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;
public partial class SearchResults : System.Web.UI.UserControl { // The term being searched on protected string SearchTerm { get; private set; }
// The search results list protected IEnumerable<SearchResult> SearchResults { get; private set; } public SearchResults() { SearchTerm = string.Empty; SearchResults = new List<SearchResult>(); } protected void Page_Load(object sender, EventArgs e) { SearchTerm = Request.QueryString["s"]; if (string.IsNullOrEmpty(SearchTerm)) return;
var criteria = ExamineManager.Instance.SearchProviderCollection["MemberSearchSearcher"].CreateSearchCriteria();
I get this error on my searchresults page: Error loading userControl '~/usercontrols/SearchResults.ascx'
Right now my ascx.cs and .ascx are both just copied to the umbraco usercontrols folder. Could that be causing the error? Does it need to be a dll instead?
public examine member search
Hi folks
I am working on a search function for a protected area of a website. It needs to search in the members section. I need to be able to search on the Name and two custom properties.
I followed the videoes by Tim on umbraco
In my ExamineIndex.config l added:
And in the ExamineSettings.config I added:
The usercontrol and my search field are set up just like in the video.
What am I doing wrong?
Any help/pointers welcome :)
Thanks in advance.
/Michael
Are there any files in the ~/App_Data/TEMP/ExamineIndexes/MemberSearch/ folder?
Just these :)
Looks good, could you show us some code that does the searchquery (I haven't seen those videos)?
My ascx code looks like this:
And the ascx.cs
Hmm, looks ok. Did you try a ToLower() on your searchterm. I don't think Examine is case sensitive.
No luck with:
BTW, my search field code looks like this:
I get this error on my searchresults page: Error loading userControl '~/usercontrols/SearchResults.ascx'
Right now my ascx.cs and .ascx are both just copied to the umbraco usercontrols folder. Could that be causing the error? Does it need to be a dll instead?
is working on a reply...