Presentation is loading. Please wait.

Presentation is loading. Please wait.

Paul Taylor, Solutions Architect October 29, 2014

Similar presentations


Presentation on theme: "Paul Taylor, Solutions Architect October 29, 2014"— Presentation transcript:

1 Paul Taylor, Solutions Architect October 29, 2014
SEARCH G2 Paul Taylor, Solutions Architect October 29, 2014

2      Search Agenda Resources What is Search G2? Your Feedback
How do we request it? DEMO: Implementing Search G2

3 What is Search G2?

4 SEARCH G2 - INTRODUCTION
WHAT IS SEARCH G2? Highly scalable, fault tolerant, industry standard indexing & query platform, built in the cloud…..oh, and it’s fast!!

5 WHAT IS CROWNPEAK SEARCH G2?
BENEFITS Highly available & scalable Higher crawl frequency Less obtrusive than Classic Customisable Site Crawling at Implementation Time Crawl website content Crawl custom data Supports Basic, NTLM & Digest Authentication Easy Adoption for Customers & Partners Industry Standard Lucene Query Language Search G2 SDK Supports UTF-8, double-byte & multi- byte character sets Enhanced End-User Search Experience Auto Language Detection (31 Languages) Stemming, Spell-Checking & Suggestion Capability

6 WHAT IS CROWNPEAK SEARCH G2?
LOGICAL ARCHITECTURE Customer Website / Browser Search G2 SDK Search G2 WS Endpoint Search G2 Crawler Search G2 Repository http(s)://searchg2.crownpeak.net/{collectionName}/select/?q=*:*

7 WHAT IS CROWNPEAK SEARCH G2?
SEARCH G2 SDK Makes implementation simple for Customers & Partners Wraps up standard Lucene features offered via Search G2 Provided in both JavaScript & .NET Flavours JavaScript – Available via CrownPeak CDN Minified version available at production-time .NET – Will be available in early 2015 Both versions will be maintained by CrownPeak, and will keep version numbers

8 WHAT IS CROWNPEAK SEARCH G2?
SEARCH G2 SDK - SHOWCASE Showcase provided within JavaScript SDK Highlights all features currently supported within the Search G2 platform Implementation examples on CrownPeak Connect KnockOutJS jQuery JavaScript (plain)

9 How Do We Request It?

10 SEARCH G2 - INTRODUCTION
HOW DO WE REQUEST IT? Part of the CrownPeak Subscription Enabled by CrownPeak Support Send support request Live URL (e.g. Dev, Authoring, Stage URLs (e.g. stage.crownpeak.com) Initial seed for each collection (e.g. Authentication information (for protected sites) Lead-time 5 days You will receive a custom Search G2 WS endpoint back! http(s)://searchg2.crownpeak.net/{collectionName}/select/?q=*:*

11 NOW WHAT? HOW DO WE REQUEST IT? Customise crawling rules
By default Search G2 will crawl all content within any pages found as children of the initial seed – all navigation will appear Search G2 uses CSS engine to allow you to pick what is indexed Submit to CrownPeak Support for implementation Build your search client Use one of the Search G2 SDK options JavaScript (examples available for KnockOutJS, jQuery & JavaScript (plain)) Handles cross-domain security issues ASP.NET Web Forms & ASP.NET MVC Cut your own in whatever language you choose Deploy through the CMS to your publishing target(s)

12 DEMO: IMPLEMENTING SEARCH G2 ON

13 DEMO: IMPLEMENTING SEARCH G2 ON www.crownpeak.com
Deploy a Search Page Use the Search G2 SDK (JavaScript) Use plain JavaScript implementation style 0. Let's start a new Web project, then create a new html page, and give it a nice title. 1. We can add a little initial UI to our page, just so we have something to use. 2. Next we'll need to add a reference to the Search G2 JS core. There are numbered versions available, plus an edge version that's unnumbered. //searchg2-assets.crownpeak.net/crownpeak.searchg2.js //searchg2-assets.crownpeak.net/crownpeak.searchg js You can do your initial work with the edge version if you want, but change to the latest numbered before go-live. All are available in minified form, with an accompanying source map. //searchg2-assets.crownpeak.net/crownpeak.searchg min.js It has no dependencies at all - apart from JavaScript. You can use your favourite templating or binding libraries. We provide a showcase that uses KnockoutJS which I'll show you later. 3. Before we can actually get the search to do its work, we need to configure it. CrownPeakSearch singleton object is available. Has a number of properties, implemented as methods due to no cross-browser property setters/getters. We will set the collection to be Usually the URL of your site, but you'll be advised of this. 4. Now that we're configured, we can go ahead and call the query method of the CrownPeakSearch object. Takes the query text, page number and array of filter queries to apply. Returns a promise (not Promises/A) which has .status property and .done(), .fail() and .always() methods. Here we're just interested in .done which will give us the JSON data back from the search. Let's just log it out to the console so that we can see what we're going to be working with. If we take a look at the log, we can see that the result contains three main classes: pager - nice easy-to-bind array of pages, including the current page and the total. you don't have to use this - you can roll your own, or decorate this. responseHeader - time the query took, parameters that were used, and status response - the important one - tells you how many results you got, and the first 10 you can change the number with CrownPeakSearch.rows(n) docs is array of matching documents key fields: title, content, url, contentLength, type, normalizedScore also date = modified date from header if set, otherwise crawl date 5. Let's add a div to contain our results, and we'll start with a small template to show the results. 6. Obviously it's not much of a template system if it can only contain hard-coded text, so we'll make a quick format function. Then we can update our template to include a place holder for the value, and pass it in. 7. Now we can make a new template for an individual result. For now, we'll just include space for the title. We'll loop through the results that we got, and build up some html. Then we can add another item to the results template, and put the html in there. 8. So that's working nicely with the title, but that's probably not enough for us. Let's add space for a precis, and then make the title into a link to the result. 9. That looks pretty good. The first result looks like it's missing its content, and the others are a bit big. We can do better there, so let's make a function to show a nicer precis, given a document. It's pretty simplistic, but it does the trick. It's worth noting here that because Search G2 does language detection for you, you get some benefits: The spell checking is in the language of the content. You get word stemming in the language too - so test vs testing vs tested, etc. 10. But Search G2 can do more to help us with this. One nice feature is hit highlighting. First we need to configure highlight(true). Then we can modify our precis function to show the highlights if they're present. Highlights are provided on all matching fields, so we can do the title/url as well if we wanted. 11. Obviously we're going to need a pager as well, otherwise we'll only ever see the first 10 results. We'll make a new template for our pager, and make room for it under the result count. It's time to refactor our query into its own function so we can call it more easily. We'll pick some nice defaults so that we don't have to pass everything in every time. 12. Search G2 also offers spelling corrections, giving us the ability to do something like "Did you mean". Configure spellcheck(true). Next we'll add a new template for our Did You Mean results, and include space for it in the results template. Now we'll make a quick helper function to produce the output for us. Each result has a .display and a .query property, so it's very easy to use. 13. Another common thing that you might like to do is faceting, so you can break down results into categories. First you need to configure facets(field) - we'll use the title, and Search G2 will pick words from it for us. We'll make a new template to show our facets, and put another placeholder into the results template. Again, we'll make a helper function. Facets look like data.facet_counts.facet_fields.fieldName then pair = facet, count. So we need to loop through and increment by 2 each time. That gives us links - when we click on one, we filter the results to those matching the facet selection. Small problem - currently if you click again, it resets the filter. So you'll need to store the current state of your filters, and append to it each time. Also how do you get rid of a filter once you've applied it. Your UI needs to do this too. 14. Finally I'll show you our AutoComplete offering. We have that in another JavaScript file. Again there's an edge version and numbered ones, plus minified versions. //searchg2-assets.crownpeak.net/crownpeak.searchg2.autocomplete js We'll add the script reference to our <head> element. Next we can add a call to CrownPeakAutocomplete.init() Takes the id of the element we want it to run on. Or the element itself. Works, but nothing happens when you click on an item. 15. Firstly we can make it look a little nicer. The UL tag is classed autocomplete-popup, so that's easy to reference. We'll turn off the list style, padding and margin of the UL. For handling the click, the CrownPeakAutocomplete.init() takes a second options argument. One property on that is a callback property, which takes a function(text) We'll just use that callback to fire off a new query. That was a quick run-through of the Search G2 JavaScript SDK. There are few more features available at the minute, and we have plans to add more as we go. There's documentation on Connect, and of course you can just go look at the source code. For exercising all of the features, we have a showcase page that we can supply. This uses KnockoutJS for easy data binding, and gives you examples of everything that we've thought of so far. If you have any questions:

14 Resources

15 SEARCH G2 - INTRODUCTION
RESOURCES Playbooks – Available on CrownPeak Connect JavaScript SDK – Available on CrownPeak CDN .NET SDK – Available in early 2015 SDK Showcase – Available on CrownPeak Connect

16 Before we go… Your Feedback

17 We are here to hear your ideas and requests.
PARTNER SUMMIT - FEEDBACK We want your feedback! We are here to hear your ideas and requests. You have our ear - here at the conference, through support, through Connect. We want to open a dialogue that starts here and continues well beyond So please share your feedback cos we are always looking for ways to improve our product. Product improvements come from 3 channels- Product Management Innovations from Customer Success team- And of course Feedback and contributions from Developers like you Through conversation at the conference or by posting on Connect Product Management Customer Success Community Feedback Developers

18 Forums on Connect - FEEDBACK Template development
PARTNER SUMMIT - FEEDBACK Twitter @CrownPeak #CrownPeakPartners For ongoing discussions with the CrownPeak community on Template development User & Developer Experience Solutions and Extensions Product features & roadmap Hosting & Publishing Integrations Forums on Connect Twitter hashtag and QR Code <a href=" class="twitter-hashtag-button" data-related="CrownPeakHelp,CrownPeak">Tweet #CrownPeakPartners</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^ 'script', 'twitter-wjs');</script> <img src=" d=https%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Fbutton_hashtag%3DCrownPeakPartners" alt="QRCode"/> Forums QR code <img src=" alt="QRCode"/>

19    Access to Customer Success and Product Teams - FEEDBACK
PARTNER SUMMIT - FEEDBACK Access to Customer Success and Product Teams You have access the Product and Customer Success teams to give direct feedback on features and best practices Meet the team during the presentations and Q&A sessions Make suggestions – we are capturing it. Team members are armed with Post-its! Ask questions – We want to start a conversation that last well beyond the summit Any Questions? MEET THE TEAM MAKE SUGGESTIONS ASK QUESTIONS Partners and Developers

20 Partners and Developers
PARTNER SUMMIT - FEEDBACK FEEDBACK? Partners and Developers

21 CrownPeak + Web Experience Management
CrownPeak + Web Experience Management


Download ppt "Paul Taylor, Solutions Architect October 29, 2014"

Similar presentations


Ads by Google