Opticon Stockholm is on Tuesday September 10th, hope to see you there!
AI OnAI Off
Opticon Stockholm is on Tuesday September 10th, hope to see you there!
If you put the full property value in the search term are your results returned
i.e. Search for "Tag1, Tag2, Tag3"
Another thing to try is wrapping the Search Term in Asterix
searchContext = searchContext.For(WrapInAsterisks(query.SearchTerm))
.InField(x => x.PageName)
.InField(x => x.ExternalTitle)
.InField(x => x.RoleLabel)
.InField(x => x.JobDescription)
.UsingSynonyms()
.ApplyBestBets();
public static string WrapInAsterisks(string input)
{
return string.IsNullOrWhiteSpace(input) ? "*" : $"{input.Trim().Trim('*')}*";
}
I have a property named Tags which is a list of strings on my ImageData. When in CMS editor mode (in the Media tab), searching for Image with a name, the result comes up as expected. I want to be able to search for the images based on Tags.
I tried creating an Initializable module and added a property for Find where in I am converting the list of strings to delimeterd string so it can be indexed.
var findClient = context.Locate.Advanced.GetInstance<IClient>();
findClient.Conventions.ForInstancesOf<ImageMediaData>()
.IncludeField(f => f.TagsAsString())
And in the function TagsAsString() am converting the list of strings to delimetered string. I can also see this property available in the Find index but when searching with the tag , it doesn't pull up anything.
Any inputs on how I can achieve this.