2. 2 patrickvankleef.com
TableOf Content 01 Index
02 Search
03 Filters
04 Facets
06 Statistics
What we’ll learn in this
presentation
Table of contents
07 Exercises
08 Influence search results
3. 3 patrickvankleef.com
0201
EPiServer Find
EPiServer Find
03
04 05 06
Elastic Search
EPiServer Find is build on top
of Elastic Search.
Facets
Facets are a way to aggregate
data for all documents in an
index or documents that match
a certain search query or set of
filtering criterias.
EPiServer Find UI
Manage your index, statistics
and influence search results.
Searching
Using different kind of
searching types.
Geo search
The service supports indexing
geographical coordinates and
later searching for them in a
number of ways.
Statistics
Use statistics to improve the
search functionality on the
website.
6. 6 patrickvankleef.com
Indexing
Indexing
Pages and blocks Sample
Custom objects
Use the Index method when you would like to index custom
objects. Bulk index is supported!
_client.Index(obj);
Pages and blocks are automatically indexed by EPiServer. This
includes when a page or block is created, updated and deleted.
_client.Index(list);
_client.Delete<Company>(“6b4b3f7f-d086-4176-bb0b-
e56eba210790”);
9. 9 patrickvankleef.com
Typed Search
Typed search
Searching on a specific type Sample
_client.Search<ArticlePage>().For(query)
.GetContentResult();
GetContentResult
Use the method GetContentResult when you search for IContent
types. Only the ContentReference is returned in the JSON.
GetResult
Use the GetResult method when searching on custom types. The
whole object is serialized and returned by Find as JSON.
_client.Search<Company>().For(query)
.GetResult();
10. 10 patrickvankleef.com
UnifiedSearch
Unified search
Searching on multiple types Sample
_client.UnifiedSearchFor(query)
.GetResult(hitSpecification);
ISearchContent
IUnifiedSearchRegistry
Add types that should be included when searching for ISearchContent.
Customize the default projection.
_client.Conventions.UnifiedSearchRegistry
.Add<Company>();
_client.Conventions.UnifiedSearchRegistry
.ForInstanceOf<User>()
.ProjectTitleFrom(x => x.Name);
SearchText, SearchTitle, SearchTypeName, SearchUpdateDate, etc.
Implement this interface or add a property or extension method to your
type with the same name as on of the below properties.
Returns a collection of UnifiedSearchHit.
18. 18 patrickvankleef.com Statistics
StatisticsinEPiServer Find
JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUSTUS
View the most frequent search queries by last
24 hours, week, month or year in a visual. This
statistic will also show a ranking of most search
queries.
Most frequent searches
View the search queries without hits by
last 24 hours, week, month or year in a
visual. This statistic will also show a
ranking of most search queries without
hits.
Searches without hits
View the search queries without relevant hits
by last 24 hours, week, month or year. The
number of click-through rate per search query
is shown.
Searches without relevant hits
20. 20 patrickvankleef.com
0201
Statistics
Statistics-Functionality
03Autocomplete
Get search queries from previous
visitors. Search queries can also be
added in the EPiServer Find
interface.
Did you mean Spellcheck
Use the spellcheck
functionality to give
suggestions based on current
search query.
Use the did you mean functionality
to help users find relevant search
queries based on current search
query.
21. 21
Statistics-Autocomplete
Statistics
Gr
Groups
Gro
Grou
Group
Search
Use .NETClient API
Use the .NET client API for receiving results.
_client.Statistics().GetAutocomplete(query);
Use Javascript
It’s also possible to use Javascript to get results.
/find_v2/_autocomplete?prefix=' + query + '&size=5
Configure in EPiServer Find UI
Use the EPiServer Find UI to insert possible search phrases.
Added in UI
patrickvankleef.com
22. 22 patrickvankleef.com
Statistics–Did you mean
Statistics
Group
Collection
Company
Search
Use .NETClient API
Use the .NET client API for receiving results.
_client.Statistics().GetDidYouMean(query);
Use Javascript
It’s also possible to use Javascript to get results.
/find_v2/_didyoumean?prefix=' + query + '&size=5
Configure in EPiServer Find UI
Configure related queries in the CMS. Pair a phrase with
possible suggestions.
Added in UI
26. 26 patrickvankleef.com
Exercises
Exercises
1. Filter on price get all hotels that have price between 100 and 200
2. Filter on rating/review find all hotels that have a star rating of either 4 or 5, OR
review rate of either 9 or 10 with more than 50 reviews
3. Filter on location get all hotels within 5 km of the cosmopolitan hotel, order by
distance from cosmopolitan hotel (closest first)
27. 27 patrickvankleef.com
Exercises
Exercises
4. Advanced filtering Show hotels with more than 2 stars within 10 km of the
cosmopolitan hotel that offer room service, have air condition
5. Range facets Create range facets for price ranges 20-50, 51-100 and 101-150
USD
6. Facet for Country List name of all countries that have hotels
7. Basic text search, query entered by user, in fields Name and Description