Hi I wonder if anyone could assist, I'm trying to set up examine to search my site.
Firstly I know that this question has been asked before but unfortunately I still can't seem to get it to work (mainly because I don't know enough about examine/lucene) so if someone could spare a minute or 3 that would be great.
This works fine if the search term is only one work but what I'm trying to get is a multi search term working so for instance if someone searches for Legal Training I would like examine to search for Legal and Training and not just the phrase legal training.
Here's what I have so far.
var searcher = ExamineManager.Instance.SearchProviderCollection["CLTSearcher"]; var criteria = searcher.CreateSearchCriteria(BooleanOperation.Or); SearchTerm = Request.QueryString["s"]; if (string.IsNullOrEmpty(SearchTerm)) return; var filter = criteria .GroupedOr(new string[] { "nodeName", "bodyText" }, SearchTerm) .Not() .Field("umbracoNavihide", "1") .Compile(); SearchResults = searcher.Search(filter);
Searching on multiple search words in examine
Hi I wonder if anyone could assist, I'm trying to set up examine to search my site.
Firstly I know that this question has been asked before but unfortunately I still can't seem to get it to work (mainly because I don't know enough about examine/lucene) so if someone could spare a minute or 3 that would be great.
This works fine if the search term is only one work but what I'm trying to get is a multi search term working so for instance if someone searches for Legal Training I would like examine to search for Legal and Training and not just the phrase legal training.
Here's what I have so far.
Like I say this works fine for just a single word.
Could anybody help please?
Thanks,
Craig
is working on a reply...