Ability to search complex object with contain or prefix value via EPI Server Find Query

Vote:
 

Requirement : I created an IList<Object> and each “Object” in the list has a property "Name" . I want search and get results where the Name in the Experiences class  contain or start with Product.  

Please can you suggest.

Example:

query.Filter(x => x.Experiences.MatchContainedCaseInsensitive(y => y.Name,"Product:*")) where * Is any characters after

 Please suggest and help me.

#256657
Edited, Jun 15, 2021 17:27
Vote:
 

Googling with keywords "EPiServer Find wildcard search" then many results returned: Google search

  1. Episerver Find Wildcard Queries and Best Bets | Optimizely Develo
  2. Wildcard queries with EPiServer Find (joelabrahamsson.com)

My simple code for Unified search

var prefixFilter = Client.BuildFilter<ISearchContent>();
prefixFilter = prefixFilter.And(x =>
                x.SearchTitle.PrefixCaseInsensitive(searchTerm) |
                x.SearchTitle.AnyWordBeginsWith(searchTerm) |
                x.SearchText.PrefixCaseInsensitive(searchTerm) |
                x.SearchText.AnyWordBeginsWith(searchTerm));
#256984
Jun 23, 2021 7:41
Vote:
 

This might be helpful https://world.episerver.com/forum/developer-forum/Search/Thread-Container/2019/4/prefixcaseinsensitive-for-strings-collection/

#256985
Jun 23, 2021 7:53
Vote:
 

Thanks for the solution.

#257369
Jun 30, 2021 7:02
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.