Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SilverStripe Wellington Weetup - Searching for search solutions

155 views

Published on

SilverStripe developers, Charlie Bergthaler and Marco Hermo, present on the topic of Search at our May Meetup in Wellington.

Published in: Internet
  • Be the first to comment

  • Be the first to like this

SilverStripe Wellington Weetup - Searching for search solutions

  1. 1. SilverStripe Meetup: Wellington, May 2018
  2. 2. Searching SilverStripe Meetup • Charlie Bergthaler Charlie Bergthaler
  3. 3. SilverStripe Meetup • Charlie Bergthaler What’s out there Possible search solutions
  4. 4. API based indexing ★ Algolia ★ Solr ★ Elasticsearch ★ Lucidworks SilverStripe Meetup • Charlie Bergthaler Crawler based indexing Two different approaches How to index data ★ Google Site Search (discontinued) ★ Google Custom Search Engine ★ Swiftype ★ Cludo
  5. 5. SilverStripe Meetup • Charlie Bergthaler Crawler based solutions Crawl the website
  6. 6. SilverStripe Meetup • Charlie Bergthaler Advantages crawling approach Crawl the website ★ Easy to implement ★ Index data as people see it ★ Re-use robots.txt / sitemap.xml / RSS ★ Trigger re-crawl via API ★ Congruent SEO approach ★ Managing via admin UI
  7. 7. SilverStripe Meetup • Charlie Bergthaler Disadvantages crawling approach Crawl the website ★ Content must be accessible by the crawler ★ Trickier to secure non-public data ★ Additional load on server
  8. 8. SilverStripe Meetup • Charlie Bergthaler API based solutions Upload data to a server
  9. 9. SilverStripe Meetup • Charlie Bergthaler Advantages API based approach Push data via API ★ Do not expose all data ★ Easier to index sensitive data ★ Separate indexed content from presentation ★ Integrate search with other processes / systems ★ Highly customisable
  10. 10. SilverStripe Meetup • Charlie Bergthaler Disadvantages API based approach Push data via API ★ Takes more effort to implement ★ Additional effort for SEO ★ Tweaking fields & filters can be tricky ★ Not always an admin UI
  11. 11. SilverStripe Meetup • Charlie Bergthaler Third-party cloud services Search as a service ★ Take maintenance burden away ★ Pre-configured search engine ★ Usually offer an API ★ Usually offer admin user interface & analytics ★ Default client-side search & results box ★ Custom result ranking
  12. 12. SilverStripe Meetup • Charlie Bergthaler Example crawling approach Load Swiftype JavaScript
  13. 13. SilverStripe Meetup • Charlie Bergthaler Example crawling approach Add MetaTags in HTML head
  14. 14. SilverStripe Meetup • Charlie Bergthaler Example crawling approach Do not index parts of a page
  15. 15. SilverStripe Meetup • Charlie Bergthaler Example crawling approach Small robots.txt
  16. 16. SilverStripe Meetup • Charlie Bergthaler Example crawling approach Re-index on publish
  17. 17. SilverStripe Meetup • Charlie Bergthaler More things to read & see Useful information SilverStripe-Algolia module https://github.com/marczhermo/algolia-search SilverStripe-ElasticSearch module https://github.com/marczhermo/elastic-search Swiftype examples https://github.com/swiftype Cludo examples https://github.com/cludo SilverStripe-Swiftype module https://github.com/ichaber/silverstripe-swiftype
  18. 18. ConclusionFinding is a successful search Find me: @ichaber charlie@silverstripe.com
  19. 19. Search Module Demo Support Developer Marco Hermo
  20. 20. Concepts: 1. Familiarity with DataList/ArrayList, mimic the API 2. Abstractions, think about Flysystem and Omnipay 3. Queueable jobs for updating & deleting contents 4. Ease of use, provide an example code 5. End users have choices & can contribute 6. Stability and continue improvements
  21. 21. Sample Code: $properties = Property::get(); $properties = $properties->filter( ['Title:PartialMatch' => $request->getVar('Keywords')] ); $properties = $this->createSearch( $request->getVar('Keywords'), 'Properties', 'Swiftype' ); DataList Search
  22. 22. Sample Code: $properties = $properties->filter([ 'AvailableStart:LessThanOrEqual' => $startDate, 'AvailableEnd:GreaterThanOrEqual' => $endDate ]); $properties->filter([ 'AvailableStart:LessThanOrEqual' => $startDate, 'AvailableEnd:GreaterThanOrEqual' => $endDate ]); DataList Search
  23. 23. Sample Code: return ['Results' => $properties]; return ['Results' =>$properties->fetch()]; DataList Search // ArrayList Reference: https://github.com/marczhermo/ssfourdotone/commit/e806c https://github.com/silverstripe/silverstripe-lessons-v4/tree/master/Lesson-15-end
  24. 24. Supported Clients: 1. Swiftype Search 2. Algolia Search 3. Elasticsearch …………………………………... ... more to come … NoSQL
  25. 25. History: 1. Joined HackDays for upgrading Solr Search to SS4 2. Learned from fellow developers during HackDays 3. Demo Algolia Search on one HackDay 4. Learn Swiftype Search on another HackDay 5. Dive into Elasticsearch on some weekends 6. Will be more HackDays/Weekends about “Search”
  26. 26. Conclusion Find me: @mhermo marco@silverstripe.com

×