Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi i am using examine seach in my umbraco project, i have the following issue please help to fix itif i search letter "J" it should display the name starts with j only. but it searches like below
Johnson
Ball Jr. Wells Jr.
Zochowski Jr
I want search result only for JohnsonMy code is var searchCriteria = searcher.CreateSearchCriteria(); IBooleanOperation filter = null; var words = s.Split(' '); var fields = new string[] { "lastName" } foreach (var word in words) { if (filter == null) { filter = searchCriteria.GroupedOr(fields, word.MultipleCharacterWildcard()); } else { filter = filter.And().GroupedOr(fields, word.MultipleCharacterWildcard()); } } foreach (string id in lawyersToExclude) { filter = filter.Not().Field("id", id); } return filter;
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Examine search for single word
Hi i am using examine seach in my umbraco project, i have the following issue please help to fix it
if i search letter "J" it should display the name starts with j only.
but it searches like below
Johnson
Ball Jr.
Wells Jr.
Zochowski Jr
I want search result only for
Johnson
My code is
var searchCriteria = searcher.CreateSearchCriteria();
IBooleanOperation filter = null;
var words = s.Split(' ');
var fields = new string[] { "lastName" }
foreach (var word in words)
{
if (filter == null)
{
filter = searchCriteria.GroupedOr(fields, word.MultipleCharacterWildcard());
}
else
{
filter = filter.And().GroupedOr(fields, word.MultipleCharacterWildcard());
}
}
foreach (string id in lawyersToExclude)
{
filter = filter.Not().Field("id", id);
}
return filter;
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.