This presentation is introduction to search world and deep-dive to Azure Search. Building well functioning search for web site is never easy. It needs planning of search indexes, analysis for technical solution and good knowledge about how users interact with search. Azure Search is simple search service to search-enable web sites and other systems. This presentation uses simple example site to make deep-dive to Azure Search and show audience how to build scalable and powerful search solution on it.
4. Two types of people
1. Navigation people
2. Search people
Q: What do navigation people with search?
A: They type in their favorite link catalog URL, search for it and then
start navigating again
5. Search over time
• Simple search scripts
• Database search
• Search engines
• NoSQL
• Search services
6. Components of search systems
• Crawler – in web systems finds resources to index
• Indexer – adds found resources to search index
• Analyzis – performs analyzis of on indexed content
• Query – performs search and returns results
12. Tips’n’tricks
• Search index must contain only two types of data:
• Data to search
• Data to display results
• Analyze what data is minimally needed for search
• Often search index is flat presentation of some domain classes
• If needed use more than one index
• Don’t allow users to come out with requirement „search for
everything“ – visualize them what everything means
14. Creating search index
• Join Microsoft Azure
• Create free or paid Azure Search service
• Use one of these to create search indices:
• Use Azure Preview Portal
• Use Azure Search library (full .NET only)
• Use plain JSON requests (full .NET and CoreCLR)
• Configure indices
16. Managing index
• Update index after insert, update and delete
• Update index after related data is changed
• Support indexing from data sources
• Make it easy to refresh all items in index
• Keep users away from Azure portal and JSON
I want indexing to be easy
and automated process
17. Managing search index
Single product scenario:
1. Product changed
2. Detect change type
3. Update index
This flow can be implemented behind inser, update and delete
operations.
18. Managing search index
Multiple product scenario:
1. Query for products to index
2. Save changes to index with up to 16K batches
Do this when:
1. Product category name changes
2. Products in category have some new attribute
3. Products for query are changed
19. Managing search index
All products scenario:
1. Create query to retrieve all products
2. Use paging to keep load normal
3. Send changes for page to index
4. You may want to write console application or service for this
Do this when:
1. You need to re-create search index
2. Big number of products have changed and there’s no query for detecting
changed products
23. Paging scenario
• Support different search providers:
• Azure Search
• Search from SQL Server
• SharePoint Search
• Custom NoSQL database
• Search clients should know nothing
about current search provider
• We need one query and one
response class to keep clients away
from details
24. Paging
• Azure Search supports paging
• PagedResult<T> - my construct for all pagings
• Base class – carries data also to pagers in UI
• Generic class – carries typed results to callers
• Query class and PagedResult classes are the only data
transfer mechanism between layers
26. Scoring profiles
• Scoring profiles help search to rank results
• Scoring types:
• Weights – how importamt is match for fields
• Freshness – how new or old item is
• Magnitude – how high or low numeric value is
• Distance – proximity and geographic location
• Function aggregation:
• Sum
• Average
• Minimum
• Maximum
• One scoring profile per search request!
I want to get acurate
results when searching
products
28. Faceted navigation
• Facets are those blocks on listings where
visitors can set additional filters
• Example: price range, manufacturers, flight
companies etc
I want simple filters to
narrow down search
results
30. Suggesters
• Suggester is „lightweight search“
• Used to look up results from search index
• Works well for auto-complete search boxes
Sometimes I want
suggestions when typing
phrase to search box
32. Tag boosting
• Add groups of tags to products
• Each group can boost up search results rank
for given products
• Example: based on customer preferences
boost up the rank of specific brands
I always want to see my
favorite products first in
listings
34. Indexers
• Automated index updates
• Build queries
• Define data sources
• Define indexers
• If needed run on schedulers
Can I skip coding and
import fresh data to index
from data source?