378 8 9MB
English Pages 517 Year 2011
488
THE EXPERT’S VOICE ® IN SHAREPOINT 2010
Pro
SharePoint 2010 Search Move your company ahead with SharePoint 2010 search
Josh Noble, Robert Piddocke, and Dan Bakmand-Mikalski
488
For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to access them.
Contents at a Glance AbouttheAuthors....................................................................................................xvi AbouttheTechnicalReviewer................................................................................xvii Acknowledgments.................................................................................................xviii Introduction..............................................................................................................xx ■Chapter1:OverviewofSharePoint2010Search...................................................1 ■Chapter2:PlanningYourSearchDeployment.......................................................23 ■Chapter3:SettingUptheCrawler.........................................................................61 ■Chapter4:DeployingtheSearchCenter..............................................................109 ■Chapter5:TheSearchUserInterface..................................................................121 ■Chapter6:ConfiguringSearchSettingsandtheUserInterface.........................179 ■Chapter7:WorkingwithSearchPageLayouts..................................................239 ■Chapter8:SearchingThroughtheAPI................................................................273 ■Chapter9:BusinessConnectivityServices.........................................................297 ■Chapter10:RelevancyandReporting.................................................................359 ■Chapter11:SearchExtensions............................................................................415 Index.......................................................................................................................459
iii
Introduction WhyIsThisBookUseful? Thisbookhasbeenwrittentoaddresswhatnoothersingleresourcehasbeendedicatedtotackle,search inSharePoint2010(SPS2010).Whilethereareotherbooksthatspendabriefchaptertotouchonsearch inSharePoint2010,scatteredinformationinMicrosoftdocumentationandonblogs,andSharePoint searchbooksthatactuallyfocusmoreonFASTSearchServer2010forSharePointthanSharePoint’sown searchcapabilities,atthetimeofthisbook’spublication,therearenootherbooksdevotedexplicitlyto thesearchofferingincludedinSharePoint2010.GeneralSharePointresourcesmayspend50pages summarizingtheMicrosoftdocumentationonsearch,buttheycannotdomorethanscratchthesurface insuchanabbreviatedspace.Othersearch-focusedbooksexplainthetheoreticalconceptsofenterprise search,orjumpheavilyintoMicrosoft’snewproduct,FASTSearchServer2010forSharePoint.This book,bycontrast,isbeneficialtoalldeploymentsofSharePoint2010.Theinformationpresented throughoutisapplicabletostandardandenterpriseeditionsoftheplatform.Duetothegreatamountof overlap,itisalsowidelyusefulfordeploymentsofSearchServer2010andSearchServer2010Express. WhiletherearemanytechnicalresourcesaboutSharePoint2010availablethatwereproducedwith Microsoftoversight,thisisnotoneofthem.Asaresult,thisbookisabletodiveintothehard-to-find detailsaboutsearchinSharePoint2010thatarenotwidelyexposed.Wehopethisbookwillhelpteach youhowtodowhatconsultantschargeafortunetodo,andhelpyouunderstandthebestwaytodoit. WeshareouryearsofexperiencemaximizingSharePointandotherenterprisesearchengines.Wenot onlytakealookinsidethemachineandshowyouthegears,butalsoexplainhowtheywork,teachyou howtofixtheproblemcogs,andhelpyouaddefficiencyupgrades. Thisbookisanend-to-endguidecoveringthebreadthoftopicsfromplanningtocustom developmentonSPS2010.Itisusefulforreadersofallskillsetsthatwanttolearnmoreaboutthesearch engineincludedinSharePoint2010.Afterreadingthisbook,youwillbeabletodesign,deploy,and customizeaSharePoint2010Searchdeploymentandmaximizetheplatform’spotentialforyour organization.
WhoIsThisBookWrittenfor? QuiteabitofenergywasputintoinsuringthisbookisusefulforeveryonewithaninterestinSharePoint 2010Search.ItwaspurposefullywrittenbyaSharePointdeveloper,aSharePointadministrator,anda businessconsultantsothateachcouldcontributeinhisrespectiveareasofexpertise.Thechaptershave beendesignedtoevenlycatertothreeprimaryreaders:users,administrators,anddevelopers. Werecognizethatmostreaderswillnotutilizethisbookcovertocover.Tomakeitmoreusefulfor thevaryingareasofinterestforreadergroups,insteadofmeshingtopicsforvariousgroupsintoeach chapter,wehavedesignedthechapterstoprimarilytouchontopicsforonereadergroup.Forexample, Chapter5waswrittentoteachusersaboutusingthesearchuserinterface,Chapter10stickstothe administratortopicofutilizingfarmanalyticstoimprovesearchrelevancy,andChapter9teaches
xx
■ INTRODUCTION
developershowtobuildcustomconnectorsfortheBCS.Nomatteryourlevelofexpertise,thereare topicsinthisbookforanyonewithaninterestingettingthemostoutofsearchinSharePoint2010. Thefollowingaresomeofthekeytopicsthroughoutthebookthatwillbeusefulforreaderswith variousneeds.
TopicsforUsers •
Componentsofthesearchinterface:Chapter5providesathoroughwalkthroughof thevariouscomponentsofthesearchinterface,includingthelocationsoffeatures andhowtheywork.
•
Settingalerts:Chapter5explainsalertsandprovidesaguideonhowtouseandset them.
•
Querysyntax:Chapter5providesafullguidetothesearchsyntax,whichcanbe usedinqueryboxesthroughoutSharePointtoexpandorrefinesearches.
•
UsingtheAdvancedSearchpage:Chapter5outlinestheAdvancedSearchpage andhowitcanbeusedtoexpandandscopequeries.
•
Usingpeoplesearch:Chapter5teachesthecomponentsofthepeoplesearch centerandhowtousethepeoplesearchcenter.
•
UsingthePreferencespage:Chapter5explainswhenthePreferencespageshould beusedandhowtouseit.
TopicsforAdministrators •
Managingtheindexengine:Chapter3goesintodetailonsettingupthecrawlerfor variouscontentsources,troubleshootingcrawlerrors,andusingiFilters.
•
Deployingsearchcenters:Chapter4explainsthetechniquesandconsiderationsfor deployingsearchcenters.
•
Configuringthesearchuserinterface:Chapter6buildsonChapter5byprovidinga detailedwalkthroughonconfiguringsearchWebParts,searchcenters,and search-relatedfeatures.
•
Settingupanalyticsandmakinguseofanalyticaldata:Chapter10focusesonthe setupofSharePointreportingandusingthedatatoimprovebusinessprocesses andrelevancy.
•
Tuningsearchresultrelevancy:Chapter10providesdetailedinstructionregarding howtoimprovesearchresultrelevancybyusingfeaturessuchasauthoritive pages,synonyms,stopwords,thethesaurus,customdictionaries,ratings, keywords,andbestbets.
•
Managingmetadata:Chapter10divesintotheusesofmetadatainSPS2010 Search,howtosetupmetadata,andhowtouseittoimproverelevancyofsearch results.
xxi
■ INTRODUCTION
•
Creatingcustomrankingmodels:Chapter10endsbycoveringtheadvancedtopic ofutilizingPowerShelltocreateanddeploycustomrelevancyrankingmodels.
•
Enhancingsearchwiththird-partytools:Chapter11discussescommercialthirdpartytoolsthatenhancesearchbeyondfunctionalityavailablewithlightcustom development.
TopicsforDevelopers •
AddingcustomcategoriestotherefinementpanelWebPart:Chapter6discusses themostessentialsearchWebPartcustomizations,includinghowtoaddnew refinementcategoriestotherefinementpanelWebPart.
•
Designingcustomsearchlayouts:Chapter7coverssubjectsnecessarytodesigna searchinterfacewithacustomlookandfeel.Topicsnecessaryforthisinclude manipulationofmasterpages,CSS,andXSLTs.
•
Modifyingthesearchresultpresentation:Chapter7providesinstructionfor changingresultclickactionsandeditingtheinformationreturnedforeachsearch resultwithXSLmodifications.
•
Improvingnavigationinsearchcenters:Chapter7givesdetailedinstructionfor addingsitenavigationtothesearchinterface,whichisdisabledbydefault.
•
AdvancedcustomizationoftherefinementpanelWebPart:Chapter7provides instructionforadvancedcustomizationoftherefinementpanelWebPart.
•
Creatingcustomsearch-enabledapplications:Chapter8coverstopicssuchasthe searchAPIandbuildingcustomWebPartswithVisualStudio2010.
•
CreatingBusinessConnectivityServicescomponents:Chapter9exclusivelycovers end-to-endtopicsonconnectingtoexternalcontentsourcesthroughtheBusiness ConnectivityServices(BCS).
WhatTopicsAreDiscussed? Thisbookcoverstheend-to-endsubjectofsearchinSharePoint2010.Westartwithabriefbackground ontheavailableMicrosoftsearchproductsandfollowwithkeytermsandabasicoverviewofSPS2010 Search.ThebookthenguidesreadersthroughthefullrangeoftopicssurroundingSharePointsearch. Westartwitharchitectureplanningandmovethroughback-endsetupanddeploymentofthesearch center.Wethenjumpintoanoverviewofthekeyuser-sidefeaturesofsearch,followedbyhowto configurethem.Moreadvancedtopicsarethenintroduced,suchascustomdevelopmentontheuser interface,leveragingtheBCStoconnecttoadditionalcontentsources,andhowtousesearchanalytics toimproverelevancy.Thebookiscappedoffwithachapteronhowimprovesearchbeyondthe limitationsofthebaseplatform. Whilethisprovidesageneraloverviewofthepathofthebook,eachchaptercontainsseveralkey topicsthatwehavefoundtobeimportanttofullyunderstandSharePoint2010Searchfromtheindexto theuserexperience.Thesearethekeyconceptslearnedineachchapter.
xxii
■ INTRODUCTION
Chapter1:OverviewofSharePoint2010Search ThischapterintroducesreaderstosearchinSharePoint2010.Itprovidesanoverviewofthevarious Microsoftsearchproductscurrentlyofferedandtheirrelationtoeachotheraswellasthisbook.Abrief historyofSharePointisgiventoexplaindevelopmentsoverthelastdecade.Thechapterlaysthe groundworkofkeytermsthatarevitaltounderstandingsearchinbothSharePointandothersearch engines.Itexplainsthehigh-levelarchitectureandkeycomponentsofsearchinSPS2010.Italso providesaguidefortopicsthroughoutthebookthatwillbeusefulforvariousreaders.
Chapter2:PlanningYourSearchDeployment ThischapterprovidesfurtherdetailsofthecorecomponentsofSharePoint2010Search,andissuesthat shouldbetakenintoaccountwhenplanningadeployment.Eachcomponentofsearchanditsunique roleareexplainedatfurtherlength.Thefunctionofsearchcomponentsasindependentunitsanda collectivesuiteisaddressed.Hardwareandsoftwarerequirementsareoutlined,andkeysuggestions fromtheauthors’experiencearegiven.Scalingbestpracticesareprovidedtohelpestimatestorage requirements,identifyfactorsthatwillaffectqueryandcrawltimes,andimproveoverallsearch performance.Redundancybestpracticesarealsodiscussedtoassistinplanningforavailabilityand avoidingdowntime.
Chapter3:SettingUptheCrawler Thischapterdivesintosetupoftheindexengineandcontentsources.Itprovidesstep-by-step instructionsonaddingorremovingcontentsourcestobecrawledaswellassettingsspecificforthose sources.ItcovershowtoimportuserprofilesfromActiveDirectoryandLDAPserversandindexthose profilesintothesearchdatabase.Crawlingandcrawlrulesareaddressed,andguidanceoncommon problems,includingtroubleshootingsuggestions,isgiven.Thechapteralsoexplainshowcrawlrulescan beappliedtomodifytheconnectioncredentialswithcontentsources.Finally,thechapterexplainsthe setupofiFilterstoindexfiletypesnotsupportedoutoftheboxbySharePoint2010.
Chapter4:DeployingtheSearchCenter Thisbriefchapterprovidesstep-by-stepinstructionsondeployingSharePointsearchcenters.Itexplains searchsitetemplatesandthedifferencebetweenthetwooptionsavailableinbasicSPS2010.Aguideon redirectingthesearchboxtoasearchcenterisgiven,aswellasnotesonhowtointegratesearchWeb Partsintositesotherthanthesearchcentertemplates.
Chapter5:TheSearchUserInterface Thischapterisanend-to-endwalkthroughofthesearchuserinterfaceinSPS2010.Awiderangeof topicsisdiscussedtoprovideacomprehensiveuserguidetosearch.Itexplainshowtousethequerybox andsearchcentertofinditemsinSharePoint.ItexplainsthedifferentfeaturesofSharePointsearchthat areaccessibletousersbydefault,suchastherefinementpanel,alerts,andscopes.Afullguideonsearch syntaxisgivenforadvancedusers,andaguideofthepeoplesearchcenterisprovidedfordeployments utilizingthefunctionality.
xxiii
■ INTRODUCTION
Chapter6:ConfiguringSearchSettingsandtheUserInterface ThischapterexpandsonChapter5bydivingintoconfigurationofthesearchuserinterface.Itprovides adviceonhowtoaccomplishtypicaltasksforconfiguringthesearchuserexperienceinSPS2010.The firstpartofthechapterexplainsthecommonsearchWebPartsandtheirmostnoteworthysettings.The followingpartsofthechapterfocusonunderstandingconceptssuchasstemmers,wordbreakers,and phoneticsearch.Thechapterprovidesdetailsonconfiguringgeneralsearch-relatedsettingssuchas scopes,keywords,searchsuggestions,refiners,andfederatedlocations.Informationonadministrative topicsrelatedtousersettings,suchassearchalertsanduserpreferences,isalsodescribedindetail.
Chapter7:WorkingwithSearchPageLayouts Thischapteristhefirstoftwothatfocusonadvanceddevelopertopicsrelatedtosearch.Itexplainsbest practicesfordesignandapplicationofcustombrandedlayoutstothesearchexperience.Topicssuchas manipulationoftheCSS,XSLTs,andmasterpagesareallspecificallyaddressed.Adetaileddiscussionof improvingnavigationwithinthesearchcenterisalsoprovided.Thechaptercontinueswithguidanceon manipulatingthepresentationofpropertiesandclickactionofsearchresults.Itendswithinstruction foradvancedcustomizationoftherefinementpanelWebPart.
Chapter8:SearchingthroughtheAPI Thisisthesecondoftwochaptersthatfocusonadvanceddevelopertopicsrelatedtosearch.Itdelivers thefundamentalsofthesearchapplicationprogramminginterfaces(APIs)inSharePoint2010.A thoroughre-introductiontothequeryexpressionispresentedfromadevelopmentperspective,and guidanceisprovidedonhowtoorganizethequeryexpressiontogetthedesiredresults.Thechapter alsocontainsanexampleofhowtocreateacustomsearch-enabledapplicationpageusingVisual Studio2010.
Chapter9:BusinessConnectivityServices Thischapterisanend-to-endguidefordevelopersontheSharePoint2010BusinessConnectivity Services(BCS)withaspecialfocusonthesearch-relatedtopics.Itexplainsthearchitectureofthis serviceandhowitintegratesbothwithinandoutsideSharePoint2010.Aguideisgivenonhowtocreate BCSsolutionsandprotocolhandlers,includingafullstep-by-stepexample.Specificexamplesarealso providedofhowtouseSharePointDesigner2010tocreatedeclarativesolutionsandVisualStudio2010 tocreatecustomcontenttypesusingC#.
Chapter10:RelevancyandReporting ThischapterisaguidefortheuserofSharePointanalyticsandapplicationstoimprovesearchrelevancy. ItteachesreadershowtoviewandunderstandSharePointsearchreportingandapplywhatitexposesto enhancethesearchexperience.Aguidetothebasicsofsearchrankingandrelevancyisprovided.The keysettingsthatcanbeappliedtomanipulateitemstoriseorfallinsearchresultsareexplained. Reportinganditsabilitytoexposethesuccessesandfailuresofthesearchengineareexplained,along withtechniquesthatcanbeappliedtomodifythewaythesearchenginebehaves.Aguidetoutilizing theSharePointthesaurustocreatesynonymsforsearchtermsisalsoprovided.Thechapterendswith advancedinstructionsforutilizingPowerShelltocreateanddeploycustomrankingmodels.
xxiv
■ INTRODUCTION
Chapter11:SearchExtensions ThischapterexplainsthelimitationsofSharePoint2010andvariousoptionsforaddingfunctionalityto theplatformbeyondcustomdevelopment.Itistheonlychapterthatexplorestopicsbeyondthe capabilitiesofthebaseplatform.Itexploresthebusinessneedsthatmayrequireadd-onsoftware,and reviewsvendorswithcommercialsoftwaresolutions.Ittakesalookintofreeadd-onsolutionsthrough opensourceprojectcommunities,andprovidesgeneraloutlinesofwhenreplacementstothe SharePoint2010Searchengine,suchasFASTSearchServerforSharePoint2010(FAST)orGoogleSearch Appliance,shouldbeconsidered.
ThisIsNotMOSS2007 WhileskillspickedupduringtimespentwithMOSS2007arebeneficialinSPS2010,relyingonthat expertisealonewillcauseyoutomissalot.TherehavebeensignificantchangesbetweenMOSS2007 andSharePoint2010.Searchnotonlyreceivedimprovement,butalsounderwentcompleteparadigm shifts.TheoldSharedServicesProviderarchitecturehasbeenreplacedwiththeSharePoint2010service applicationarchitecture,creatinguniquedesignconsiderations.TheMOSS2007BusinessDataCatalog (BDC)hasbeenreplacedwiththeBusinessConnectivityServices(BCS),unlockingnewwaystoreadand writebetweenSharePointandexternalcontentsources.Indexspeed,capacity,andredundancyoptions haveallbeenimprovedtocatertoexpandingenterprisesearchdemands.Eventhequerylanguagehas beencompletelyrevampedtoallowforBooleanoperatorsandpartialwordsearch. Throughoutthisbook,wehavetakenspecialcaretonoteimprovementsanddeviationsfromMOSS 2007toassistwithlearningthenewplatform.Captionspointingoutchangeswillhelpyoutoefficiently pickupthenuancesofSharePoint2010.Directfeaturecomparisonsarealsoprovidedtoassistwith recognizingnewpotentialopportunitiesforimprovingsearch.
TheImportanceofQualityFindability Ifyouarereadingthisbook,thenmostlikelyyourorganizationhasdecidedtotaketheleapinto SharePoint2010.Unfortunately,moreoftenthannottheplatformisselectedbeforeanyonedetermines howitwillbeused.Thisleavesalargegapbetweenwhattheplatformiscapableofachievingandwhatis actuallydeliveredtousers.ThegoalofthisbookistobridgethegapbetweenwhatSharePointcandoto connectuserswithinformation,andwhatitdoesdoforyouruserstoconnectthemwiththeir information. Bydefault,mostoftheworld’scomputerownershaveabrowserhomepagesettoasearchengine. Searchisthefirsttoolwerelyontofindtheneedleweneedinacontinuouslyexpandinghaystackof information.Peopleexpectsearchtoquicklyreturnwhattheyarelookingforwithhighrelevancyand minimaleffort.ImprovementscateringtoeffectiveInternetsearchhaveraiseduserexpectations,which shouldbeseenasacalltoactionforimprovedwebsiteandportaldesign,notanopportunitytomanage expectations.Ifthiscalltoactionisnotmet,however,businesswillbelosttocompletionforwebsites, andintranetuserswillfindshortcutstothedesiredcontentmanagementpractices. Consideryourownexperiencesonyourfavoriteglobalsearchengine.Ifthewebsiteyouarelooking fordoesnotappearwithinthefirst(ormaximum,second)pageofsearchresults,thenyoumostlikely changeyourquery,utilizeadifferentsearchengine,orsimplygiveup.UsersonSharePointportals exhibitthesamebehavior.Afterafewattemptstofindanitem,userswillabandonsearchinfavorof manualnavigationtodocumentlibrariesortheshareddrivesthatSharePointwasdesignedtoreplace. Userseventuallybegintoassumethatonceitemsfindtheirwayintothechasmoftheintranet,theonly chanceofretrievingthemagainistoknowexactlywheretheywereplaced.Itisforthesereasonsthat
xxv
■ INTRODUCTION
implementinganeffectivesearchexperienceinSharePoint2010isoneofthemostimportantdesign considerationsinSharePoint.IfuserscannoteasilyfindinformationwithinyourSharePoint deployment,thentheycannotfullyleveragetheotherbenefitsoftheplatform.
TheValueofEfficientSearch Itisobviousthatintoday’seconomyitismoreimportantthanevertomakeeverydollarcount. Organizationscannotsitbackandignoreoneofthelargestwastesofman-hoursinmanycompanies. Accordingtoa2007IDCstudy,anaverageemployeespends9.5work-hoursaweekjustsearchingfor pre-existinginformation.What’sworseisthatsixhoursaweekarespentrecreatingdocumentsthatexist butcannotbefound.Withthisinformation,combinedwiththestatisticthatusersaretypically successfulwiththeirsearchesonlyabout40%ofthetime,thecostofapoorsearchsolutioncanquickly compoundtoquitealargeburdenonacompanyofanysize. Let’ssaythatanemployeeispaid$75,000ayearfora40-hourworkweekand50weeksayear(2,000 hours).Basedonthis,theemployeeearns$37.50/hourbeforebenefits.Applyingthestatisticsjustcited, youcanseethatthecostperweektofindinformationis$337.50/week($16,875annual),andthecostto recreateinformationis$225.00/week($11,250annual).Thisbeingsaid,thecostperemployeeatthis ratewouldbe$28,125/yearforapoorfindabilityandsearchsolution.Inadifferentdeployment scenario,assume500employeesearning$20perhour,withjustonehourlossperuser/month.Injust threemonths,thewasteduetopoorsearchis$30,000inwastedwages.Thatisanextraemployeein manycompanies. Fromthesestatistics,itisclearthatwell-designedsearchisakeydriverofefficiencywithin companies.Thisbookhelpsyoutoachievethisefficiencywithsearch.Itprovidesafullrangeoftopicsto helpyoudesignaSharePointsearchportalthatquicklyconnectsuserswiththeirinformation.Wepull fromourexperienceworkingwithSharePointsearcheverydaytoprovideexpertadviceonthetopics thatmatterwhenbuildingaSharePointsearchcenterthatreallyworks.Althoughdesigningand implementingaqualitysearchexperiencedoestaketime,thisbookplacestheabilitywithinthegraspof everySharePoint2010deployment.
NotefromtheAuthors OurgoalisnotonlytoteachyouthefactsaboutsearchinSharePoint2010,butalsotogiveyouthebasic toolstocontinueyourlearning.CreativeapplicationsforSharePointsearcharealwaysevolving.Usethe knowledgegainedinthisresourcetoexplorethecontinuingevolutionofknowledgethroughoutyour company,peers,andtheWeb.AsyoubuildyourSharePointsearchenvironments,makesuretoalways keeptheusers’experiencesinmind.Solicitfeedback,andcontinuetoaskyourselfifthesearchtoolyou arecreatingwillhelpuserschangesearchintofind. Thisbookistheproductofcountlesshoursofplanning,research,andtesting.Itisthecombined effortsofmanypeople,includingApresseditors,Microsoft,SharePointconsultants,bloggers,clients, andourcolleaguesatSurfRay.Withthesepeople’ssupport,wehavedesignedthisbook’scontentand structuretoteachyoualltheessentialsofsearchinSharePoint2010.AsyoucontinueontoChapter1, wehopethatyouenjoyreadingthisbooktothesameextentwehaveenjoyedwritingitforyou.
xxvi
CHAPTER 1
■■■
Overview of SharePoint 2010 Search Aftercompletingthischapter,youwillbeableto •
DistinguishbetweenthevariousMicrosoftSearchproducts
•
UnderstandthesearcharchitectureinSharePoint2010
•
Translateintegraltermsusedthroughouttherestofthebook
•
Knowhowtoeffectivelyusethisbook
Beforetakingthejourneyintothisbook,itisvitaltogainafirmunderstandingoftheground-level conceptsthatwillbebuiltuponthroughout.Thischapterisdesignedtobringtogetherseveralofthe coreconceptsnecessarytounderstandtheinnerworkingsofSharePoint2010.Manyoftheseare universaltoallsearchengines,butsomemaybeforeigntothosereadersnewtoSharePoint. Itisimportanttokeepinmindthatafewofthetermsusedthroughoutthisresourcemaybe differentthanthoseusedonpublicblogsandforums.Theterminologypresentedinthischapterwill assistthereaderinunderstandingtherestofthisbook.However,itismoreimportanttounderstandthe coreconceptsinthischapterastheywillprovemorehelpfulinyouroutsideresearch.Asdiscussedin theintroduction,thisbookwillnotaddresseverypossibletopiconsearchinSharePoint2010.Themost importantsubjectsarepresentedbasedontheexperiencesoftheauthors.ThedynamicsofSharePoint, however,createapotentiallyunendingnetworkofbeneficialtopics,customizations,anddevelopments. Whilethisbookdoesnotcovereverything,itwillprovideallofthebasicknowledgeneededtoeffectively utilizeadditionaloutsideknowledge. Microsofthasawiderangeofenterprisesearchproductofferings.Withnewproductsbeing released,andexistingproductschangingeveryfewyears,itcanbecomequitecumbersometokeeptrack ofnewdevelopments.Tolaythefoundationsofthebook,thechapterstartswithabriefreviewofthis productcatalog.Eachsolutionisexplainedfromahighlevelwithspecificnotesonthekeybenefitsof theproduct,technologicalrestrictions,andhowitfitsintothisbook.Whileitisassumedthatevery readerisusingSharePoint2010,alargeamountofthetopicsdiscussedwillberelevanttootherproducts intheMicrosoftcatalog. Thesecondhalfofthechapterfirstfocusesonafewofthemostimportantsoftcomponentsof search.Theseincludecomponentssuchasthesearchcenter,thedocumentpropertiesthataffect search,andtheinteractivecomponentsforusers.Thesecondhalfofthechapterthenoutlinesthebasic architectureofSharePoint2010Search.Whilethistopicisdiscussedatlengthinthefollowingchapter,
1
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
thedepthofdetailprovidedhereissufficientforreadersnotinvolvedwiththeinfrastructuresetup. Finally,thechapteriscappedwithaguidetoafewofthemostimportanttopicsinthisbookforvarious readergroups.
MicrosoftEnterpriseSearchProducts:ChoosingtheRight Version Asmentionedintheintroduction,Microsofthasbeeninthesearchspaceforoveradecade.Inthattime, theyhavedevelopedanumberofsearchproductsandtechnologies.Theserangefromglobalsearchon Bing.com,desktopsearchonWindows7,searchwithinOffice14,andawiderangeof“enterprise” searchsolutions.Eachoftheseproductsisdesignedtohandlespecifictypesofqueries,searchagainst variouscontentsources,andreturnresultsusingvariousrankingalgorithms.Notwosearch technologiesarethesame,andauserbeingfluentinonedoesnottranslatetoeffectiveuseor deploymentofanother.Forthepurposeofthisbook,wewillbefocusingonMicrosoftSharePoint2010, andastheweightofthisbookindicates,thissubjectismorethanenoughinformationforoneresource. DuetotheoverlapbetweenmanyofMicrosoft’senterprisesearchtechnologies,wewillmakeside notesthroughoutthisbookindicatingwheretheinformationisapplicabletosolutionsotherthan SharePoint2010.Throughoutthebooktherewillalsobenotesontechnologylimitations,wheretheuse ofanadditionalMicrosofttechnologyorthird-partyprogrammaybenecessarytomeetprojectgoals. Thesesidenotesshouldnotbeconsideredthedefinitiveauthorityonfunctionalityoutsidethescopeof thisbook,buttheyareusefulinrecognizingkeysimilaritiesanddifferencesbetweenproducts.
MicrosoftSharePointServer2010 SharePointServer2010isMicrosoft’spremierenterprisecontentmanagementandcollaboration platform.Itisabundledcollectionofworkflows,WebParts,templates,services,andsolutionsbuilton topofMicrosoft’sbasicplatform,SharePointFoundation,whichisdiscussedfurtherinthefollowing section.SharePoint2010canbeusedtohostawidevarietyofbusinesssolutionssuchaswebsites, portals,extranets,intranets,webcontentmanagementsystems,searchengines,socialnetworks,blogs, andbusinessintelligencedatabases. SharePoint2010deploymentscanbefoundinorganizationswithamassivedifferenceinscaleand requirements.Usercountsinimplementationsassmallassingledigitsareseeninsmallintranetsand expandintothemillionswithlargeextranetsandpublic-facingsites.Thebeautyofthesolutioncomesin itsabilitytobedeployedrelativelyquicklyandeasily,anditsabilitytobecustomizedtocatertoawide rangeofneedswithvariousworkflows,WebParts,templates,andservices.Theout-of-the-box functionalitycancatertogenericneedsoforganizations,butthepowerofthetoolcomesinthebuilding blocksthatareabletobeinserted,combined,andcustomizedtomeetavarietyofusagescenarios. WhilethemostobvioususeofSharePoint2010isintranetportals,theplatformisnowseeingagreater pushtothepublicdomainwithwider-rangeWeb2.0–focusedtools. SharePoint2010isavailablebothon-premise,off-site,andinthecloudthroughMicrosoftaswellas severalthird-partyhostingfirms.On-premisereferstodeploymentsofsoftwarethatrunlocallyoninhousehardware,asopposedtothosethatarehostedinaremotefacility,suchasaserverfarmoronthe internet.Historically,mostsoftwarehasbeenmanagedthroughacentralizedon-premiseapproach,but inrecentyears,advancesincloudcomputing,theriseofnetbooks,andtheavailabilityofinexpensive broadbandhavegrownthepopularityofdecentralizedoff-premisedeployments.Whileboth approachescanproducethesameexperienceforusers,eachpresentsitsownsetofITchallenges.Onpremisedeploymentsrequiretheprocurement,maintenance,upgradecosts,andpotentialdowntime
2
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
associatedwithserverhardware.Off-premisedeploymentsathostingcentersallowcompaniestoavoid thesechallengesforafee,butpresenttheirownchallengesinthewayofbandwidth,security,andmore limitedfunctionalitydependingonthehostingcenter.Off-premiseoptionsforSharePoint2010are availablethroughvarioushostingcenters.Manyofthesehostssimplymaintainreliableoff-site deploymentofthesamesoftwareavailableinternallyandprovideremoteaccesstofullconfigurability options.Otherhostedversions,suchasSharePointOnlineofferedbyMicrosoft,mayprovideonlya subsetofthefeaturesavailablethroughon-premisedeployments.Duetothevariablefeaturesavailable intheoff-premiseofferings,thisbookwilltargettheon-premiseversionofSPS2010. UnlikeSharePointFoundation2010,whichwillbediscussedinthenextsection,SharePointServer 2010requiresadditionalsoftwarelicensing.Licensingcostsmaydeviatedependingonaparticular client’slicensingagreementandprocurementchannel.Microsoftmayalsodeemitnecessarytochange licensingstructuresorcostsfromtimetotime.Asaresult,thisbookwillnotdiscusslicensingcosts, althoughthisshouldbetakenintoconsiderationduringtheplanningstagesdiscussedinChapter2. BeforelearningaboutthecurrentversionofSharePoint,itmaybehelpfultoknowthebackground ofproductsithasbeenderivedfrom.SharePoint2010stemsfromadecadeandahalfofdevelopment history.Duringthistime,Microsofthastakennoteoftheplatform’spitfallsandsuccessesto continuouslyproduceimprovedplatformseveryfewyears.Fueledbytheneedtobeabletocentrally sharecontentandmanagewebsitesandapplications,theearliestversionofSharePoint,calledSite Server,wasoriginallydesignedforinternalreplacementofsharedfolders.SiteServerwasmadeavailable forpurchasewithalimitedsplashin1996withcapabilitiesaroundsearch,orderprocessing,and personalization. MicrosofteventuallyproductizedSharePointin2001withthereleaseoftwosolutions,SharePoint TeamServices(STS)andSharePointPortalServices(SPS2001).SharePointTeamServicesallowedteams tobuildsitesandorganizedocuments.SharePointPortalServiceswasfocusedprimarilyonthe administratorandallowedforstructuredaggregationofcorporateinformation.SPSalsoallowedfor searchandnavigationthroughstructureddata.Unfortunately,thegapsbetweenthesetwosolutions createdadisconnectbetweentheendusersusingSharePointTeamServicestocreatesitesand administratorsusingSharePointPortalServicestomanageback-endcontent. In2003,Microsoftreleasedthefirstcomprehensivesuitethatcombinedthecapabilitiesof SharePointTeamServicesandSharePointPortalServices.Muchliketoday,the2003versionof SharePointcameintwodifferentflavors,WindowsSharePointServices2.0(WSS2.0),whichwas licensedwithWindowsServer,andSharePointPortalServer2003(SPS2003).Duetotheinclusionof WSS2.0inWindowsServer,andthelargeimprovementsoverthe2001solutions,adoptionofSharePoint asaplatformbegantoskyrocket.SharePoint2003includeddashboardsforeachuserinterface,removed muchofthetediouscodingrequiredinpreviousversions,andstreamlinedtheprocessforuploading, retrieving,andeditingdocuments. In2006,MicrosoftreleasedMicrosoftOfficeServer2007(MOSS2007)andWindowsSharePoint Services3.0(WSS3.0),followingthesamefunctionalityandlicensingconceptsoftheir2003 counterparts.Byleveragingimprovementsintheunderlyingframework,SharePoint2007usheredinthe maturityoftheplatformbyintroducingrichfunctionalitysuchasmasterpages,workflows,and collaborativeapplications.MOSS2007’swiderangeofimprovementsfromadministrativetoolstouser interfacespositionedSharePointasthefastestgrowingbusinesssegmentinMicrosoft. InMay2010,MicrosoftreleasedSharePointServer2010(SPS2010)andSharePointFoundation 2010,thesuccessorstoMOSS2007andWSS3.0.SharePoint2010buildsonMOSS2007byimproving functionssuchasworkflows,taxonomy,socialnetworking,recordsmanagement,andbusiness intelligence.ItisalsonoteworthytopointoutMicrosoft’snoticeableimprovementstofeaturescatering topublic-facingsitesandcloudcomputing. Inregardstosearch,improvementsinSharePoint2010canbefoundacrosstheboardinareassuch asimprovedmetadatamanagement,theribbon,inclusionoftheBusinessConnectivityServices(BCS)in non-enterpriseversions,asignificantlymorescalableindex,expandedsearchsyntax,andsearch refiners(facets).Withtheexceptionofmetadatamanagement,thesearethetypesofsubjectsthatwillbe
3
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
addressedthroughoutthisbook.Althoughthroughoutthisbooktherewillbesidenotestouchingon comparisonsbetweenMOSS2007andSharePoint2010Searchcomponents,itwillbegenerallyassumed thatreadersarenewtoSharePointin2010.ForacomparisonoftheimportantchangesbetweenMOSS 2007andSharePoint2010,pleaseseeTable1-1.
SharePointFoundation2010 SharePointFoundation2010(SPF2010)isthesuccessortoWindowsSharePointServices3.0(WSS3.0).It istheweb-basedcollaborationplatformfromwhichSharePointServer2010expands.SharePoint FoundationprovidesmanyofthecoreservicesofthefullSP2010,suchasdocumentmanagement,team workspaces,blogs,andwikis.Itisagoodstartingpointforsmallerorganizationslookingforacosteffectivealternativetoinefficientfileshares,andbestofall,accesstoSharePointFoundation2010is includedfreeofchargewithWindowsServer2008orlater. Inadditiontobeingacollaborationplatformforeasilyreplacinganoutdatedfileshare,SharePoint Foundationcanalsobeusedasapowerfulapplicationdevelopmentplatform.Theprerequisite infrastructure,price,andextensibilitycreateanidealbackboneforawiderangeofapplications. DeveloperscanleverageSharePoint’srichapplicationprogramminginterfaces(APIs),whichactas buildingblockstoexpeditedevelopment.TheseAPIsprovideaccesstothousandsofclasses,whichcan communicatebetweenapplicationsbuiltontopoftheplatform.TheattractivenessofSharePoint Foundation2010asadevelopmentplatformiscompoundedbyitswideaccessibility,whichlowers barrierstoaccessbynon-professionaldevelopers.Thisincreasedaccessibilityconsequentlyexpands informationsharingabouttheplatformandhasfacilitatedarapidlygrowingdevelopmentcommunity. SharePointFoundationdoeshavesupportforverybasicindexingandsearching.Althoughnotas powerfulasthesearchcapabilitiesmadeavailableinSharePointServer2010orSearchServer2010,it willallowforfull-textquerieswithinsites.Withoutanyadditions,SPF2010allowsaccesstoline-ofbusiness(LOB)datasystemsthroughasubsetoftheBCSfeaturesavailableinfullSPS2010.Itcanalso collectfarm-wideanalyticsforenvironmentusageandhealthreporting.Formoreextensivesearch functionality,theupgradetoSharePoint2010,FASTforSharePoint2010,SearchServer2010,orthe additionofthefreeSearchServerExpress2010maybenecessary.Withouttherecommendedadditionof thefreeSearchServerExpressproductorSharePoint2010,functionalitysuchasscopes,custom propertymanagement,queryfederation,andresultrefinersisnotavailable.Afullchartofthemajor differencesinsearchfunctionalitybetweentheseproductscanbefoundinTable1-1. WhileSPF2010willnotbethefocusofthisbook,someoftheinformationpresentedinlater chaptersoverlaps.MajordifferencesbetweenSharePointFoundationandSharePoint2010includethe availableWebParts,scalability,availability,flexibility,andadministrativeoptions.Inaddition,the peoplesearchcenterisnotavailableinSharePointFoundation.Tables1-1and1-2provideamore detailedcomparisonofmajorfeaturesandscalabilityconsiderationsforSPF2010.Forafulllistofthe availablesearchWebPartsinSharePoint2010,pleaseseeTable1-3. AnimportantnoteifupgradingWSS3.0,whichallowedforboth32-and64-bitcompatibility,isthat SharePointFoundation2010requiresa64-bitversionofbothWindowsServer2008andSQLServer. WhileSPF2010isoutsideofthescopeofthisbook,afewimportantnotesoninfrastructureand prerequisitescanbefoundinChapter2.SinceSharePointFoundationisanunderlyingcoreof SharePointServer2010,itstandstoreasonthatifyouhavethehardwareandsoftwareprerequisites requiredforSPS2010,youwillalsomeettheneedsofSharePointFoundation.
4
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
MicrosoftSearchServer2010Express MicrosoftSearchServer2010Express(MSSX2010)isthesuccessortoSearchServer2008Express.Itisan entry-levelenterprisesearchsolutionthatprovidescrawlingandindexingcapabilitiesnearlyidenticalto SharePointServer2010.ThisfreesearchserverisavailableforanyoneusingWindowsServer2008or later,anditshouldbethefirstadditionconsideredwhensearchfunctionalitybeyondthatavailablein SharePointFoundationisnecessary. AlthoughfrequentlydeployedontopofSharePointFoundation,SearchServer2010Expressisable toisolatetheinfrastructurefromotherMicrosoftSharePointtechnologies.Thisallowsforanenterprise searchsolutionwithouttheneedforSharePointFoundationorSharePointServer2010. SearchfunctionalityofSearchServer2010ExpressthatisnotincludedinSharePointFoundation rangesfromthetypesofcontentthatcanbecrawledtohowtheuserinteractswithsearchresultsand refinesqueries.Afullchartofthemajordifferencesinsearchfunctionalitybetweenthesesolutionscan befoundinTable1-1.BecauseMSSX2010isbuiltfromasubsetofSPS2010searchfunctionality,there aresomelimitations,mostnotablyaroundsearchingonpeopleduetothelackoftheunderlying “people”elementinFoundation.OtherlimitationsresolvedbymovingtothepurchasableSearchServer 2010areaddressedinthenextsection.
SearchServer2010 MicrosoftSearchServer2010(MSS2010)isthemorerobustandscalableversionofSearchServer2010 Express.MSS2010’sfeaturesetisnearlyidenticaltothatofitsfreecounterpart.Itcanfunction independentlyofSharePoint,indexfederatedcontentthroughtheBCS,andprovidearobustend-user searchinterface. ThemajordifferencesandthepricejustificationtomovefromthefreeversiontothefullSearch Server2010arethescalabilityforenterprises.MicrosofthasplacedlimitationsontheSearchServer2010 Expressindexcapacity.Themaximumcapacityoffull-textindexinMSSX2010isapproximately300,000 itemswithMicrosoftSQLServer2008Express,or10millionitemswithSQLServer.Toindexcontent abovethislimitation,SearchServer2010isnecessary,whichcanmanageabout100millionitems. Inadditiontothesignificantdifferenceinindexcapacity,scalabilityisdrasticallydifferent.The topologycomponentofanyparticularSearchserviceapplication(SSA)mustbeononeserverwith SearchServer2010Express.AsseeninMOSS2007andSearchServer2008,thisrestrictioncanbecomea significantlimitationforlargerormorefrequentlyaccessedsearchenvironments.Alternatively,thefull SearchServer2010iscapableofspreadingitstopologycomponentsacrossmultipleservers,which allowsfordistributionofworkload.Distributionofworkloadcanleadtodecreasedindexingand crawlingtimes,increasedsearchspeed,increasedstoragecapacity,andgreateraccessibility.These topicswillbeaddressedinmoredetailinChapter2. Serviceapplicationsareanewconceptbroughtaboutbytheserviceapplicationmodelin SharePoint2010.SimilartothewaytheBCSinSharePoint2010replacedtheBusinessDataCatalog (BDC)fromMOSS2007,serviceapplicationsreplacedtheSharedServicesProviders(SSPs).SSPsin MOSS2007wereacollectionofcomponentsthatprovidecommonservicestoseveralInternet InformationServices(IIS)webapplicationsinasingleSharePointserverfarm.Unfortunately,whileSSPs wereacceptableforfarmswithsimpletopologiesinMOSS2007,theypresentedalargebarriertogrowth forlargerdeployments.SharedServicesProvidersgroupedallservices,suchasExcelServices,MySites, andSearch,togetherintooneSSPunit,althoughservicefunctionswereallradicallydifferent.This presentedsignificantchallengestoscalingandflexibility.
5
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
■NoteInSharePoint2010,serviceapplicationsallowservicestobeseparatedoutintodifferentunits.Unlike SSPs,whichrestrictedawebapplicationtobetiedtoasingleprovider,webapplicationscannowusetheservices availableonanyoftheserviceapplications.Serviceapplicationscanalsobespreadacrossmultiplefarmsto furtherdistributeservices,andmultipleinstancesofthesameserviceapplicationcanbedeployed. InadditiontoredesigningtheexistingservicemodelinSharePoint2010,Microsoftaddedanumberofnew services.Out-of-the-boxservicesincludetheBCS,PerformancePoint,Excel,Visio,Word,Access,OfficeWeb Apps,ProjectServer,Search,People,andWebAnalytics.Themostimportantserviceforthepurposeofthisbook, ofcourse,istheSearchServiceApplication,formallyknownastheSearchServiceProvider(SSP).Whileseveralof theotherserviceapplicationsarenecessarytounlockthefullrangeofcapabilitiesaroundsearchinSharePoint 2010,atleastoneSSAisrequiredforsearchtofunction.FurtherdetailsontheSearchserviceapplicationwillbe foundinthenextchapter.
SearchServer2010andtheExpressversionwillnotbethefocusofthisbook,butmostofthe informationnecessarytoplan,deploy,configure,andcustomizethesesolutionsisidenticalto SharePointServer2010.Throughoutthisbook,therewillbenoteswhenthereisasignificantdifference betweenthefunctionalityofSearchServer2010andSharePoint2010.
FASTSearchServer2010forSharePoint FASTSearchServer2010forSharePointisMicrosoft’senterprisesearchadd-onthatreplacesthesearch functionalityofSharePoint.Fortheenduser,itprovidesawiderangeofadditionalfeatures,suchas improvedsearchresultsnavigation,expandedlanguagesupport,andpreviewsofOfficedocuments.On thebackend,itcanindexcontentsourcesandline-of-businessapplicationsnotaccessiblebybasic SharePoint2010andscalesuptobillionsofitems.Italsogivesdevelopersthepowertomanually manipulaterelevancyattheindexleveltoforcedesireditemstothetopofresultsets. FASTshouldbeconsideredwhenmorethan100millionitemsneedtobeindexed,thesearchuser interfacecannotbecustomizedorconfiguredtomeettheneedsofendusers,orthereisaneedtoindex line-of-businessapplicationsnotaccessibletoSharePoint2010.Theitemlimitof100millionis noteworthyasthisistheupperlimitforSPS2010.Oncethislimitisapproachedorbreachedbythe index,amorepowerfulsearchsolutionisnecessary,whichleadstothepracticalityofFASTasanoption. ItisimportanttonotethatFASTrequiresitsownserversandcannotbeinstalledonthesameserveras SharePoint2010.Inaddition,atthetimeofwritingthisbook,theFASTSearchServer2010for SharePointadditionisavailableonlyforMicrosoftSharePointEnterpriseclients(ECAL).
6
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
Asstatedpreviously,thescopeofthisbookistoguideSharePointadministratorsthroughthe successfulplanning,deployment,andcustomizationofSharePoint2010Search.Whilethepreviously mentionedMicrosoftsearchtechnologieshaveawideamountofoverlapwiththesubjectofthisbook, FASTSearchServer2010forSharePointreplacestheSharePoint2010Searchpipeline,andasaresultthis bookwillnotbehighlyrelevanttothatplatform.Whiletherearenotesthroughoutthisbookstating whenanupgradetoFASTSearchServer2010forSharePointmaybenecessary,themostconsolidated informationonthesubjectcanbefoundinChapter11. Table1-1.SharePointSearchProductFeatureMatrix
Feature
SharePoint Foundation 2010
Basicsearch
XXXXX
Scopes
XXXX
Searchenhancements basedonusercontext
Customproperties
XXXX
Propertyextraction
LimitedLim
Querysuggestions
XXXX
Similarresults
X
VisualBestBets
X
Relevancytuningby documentorsite promotions
LimitedLim
Sortresultsonmanaged propertiesorrankprofiles
Shallowresults refinement
XXXX
Search Server 2010 Express
Search Server 2010
SharePoint Server 2010
FAST Search Server 2010 for SharePoint
X
itedLim
itedX
itedLim
itedX
X
7
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
Continued
Feature
SharePoint Foundation 2010
Deepresultsrefinement
X
Documentpreview
X
Queryfederation
XXXX
Windows7federation
XXXX
Peoplesearch
X
X
Socialsearch
X
X
Taxonomyintegration
X
X
Multi-tenanthosting
X
Richwebindexing support
SupportforMySites, Profilespages,social tagging,andothersocial computingfeatures
X
Accesstoline-of-business (LOB)datasystems
XXXXX
8
Search Server 2010 Express
Search Server 2010
SharePoint Server 2010
FAST Search Server 2010 for SharePoint
X X
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
Table1-2.SharePointSearchProductLicenseandScalability
SharePoint Foundation 2010
Search Server 2010 Express
Search Server 2010
SharePoint Server 2010
FAST Search Server 2010 for SharePoint
Allowable serversper Searchservice application
One
One
Multiple
Multiple
Multiple
Approximate Maximum IndexCapacity (items)
10M300K
w/SQL Server2008 Express; 10Mw/ SQLserver
100M100M
ProductKey Required
Includedin Windows Server2008 orlater
Free download from Microsoft
YesYes
500M
Yes,requires enterpriseeditionof SPS2010
GettingtoKnowSearchinSharePoint2010 Sofar,thischapterhasexplainedwhatthisbookwillandwillnotcover.Ithasexplainedtherangeof search-relatedtechnologiesandproductsintheMicrosoftportfolio,andithasprovidedscenarioswhere eachmaybenecessary.Therestofthischapterwillserveasanintroductiontothetermsandconcepts usedthroughoutthebook.Thiswillhelpbuildunderstandingoftheintegralbackgroundnecessaryfor understandingSharePoint2010architecture,services,andsites.
TheSearchCenter Forendusers,thesearchcenteristhemostimportantcomponentofsearch.Thisiswhereusersexecute queries,viewresults,interactwithsearchresultsets,andmakedecisionsondocumentselection.While theback-endcomponentsofsearchareequallyimportantfromanITperspective,thisistheuser’s front-endconnectiontoallofthecomplexprocessesmakingsearchwork,andwithoutit,userscould notsearch. Thesearchcentercanbeaccessedthroughtwoprocesses.Themostdirectisbynavigatingtothe searchtabinaSharePointportal.Inastandardout-of-the-box(OOTB)SharePointenvironment, manuallynavigatingtothesearchcenterthroughthesearchtabtakesuserstothequeryinterfaceshown inFigure1-1.
9
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
Figure1-1.SharePoint2010searchcenter Theotheroptionfornavigatingtothesearchcenterisbyexecutingaquerythroughthesearchbox. InanOOTBSharePointenvironment,thesearchboxcanbefoundintheupperright-handquadrantof sitesandlists,asshowninFigure1-2.
Figure1-2.SharePoint2010homepage Whenaqueryisexecutedthrougheitheroftheseinterfaces,itispassedtothesearchresultspage andexecuted.Unlessspecificallydesignedtoworkdifferently,bothsearchinterfaceswilltakeusersto thesamesearchresultspage.Iftheexecutedsearchquerymatchestoresults,theresultspagewill displayresultsandallowinteractionwiththem,asshowninFigure1-3.Ifnoresultsarefoundtomatch thequery,thentheuserwillstillbedirectedtotheresultspage,butanotificationtothiseffectwillbe displayedalongwithasetofsuggestionsforalteringthequery.
10
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
Figure1-3.SharePoint2010searchresultspagewithresults Deployment,use,andconfigurationofthesearchcenterarediscussedindetailinChapters4,5,and 6,respectively.
Metadata Putmostsimply,metadataisdataaboutdata.Itisthesetofdefiningpropertiesforalibrary,list,web site,oranyotherdatafile.IfthewritingwithinaMicrosoftWorddocumentistheunstructuredcontent, metadataisthestructuredcontentattachedtothedocumentthatdefinesit.ForaMicrosoftWord document,thisinformationtypicallyincludesthemodifieddate,author,title,andsize,butmayalso includecommentsandtags.InSharePoint,metadatamayalsoincludepropertiessuchasthelocationof thedocument,teamresponsibleforit,orthedateanitemwaslastcheckedout.Thisistheinformation thatdefinesthedocument,anditisvitalforsearchwithinSharePoint. Allsearchenginesutilizemetadatatocatalogitemsmuchlikealibrary.TheSharePointsearchindex storesawidevarietyofmetadataassociatedwitheachitemandutilizesthisinformationwhenreturning searchresults.Typically,sinceitisgenerallymorereliableandstructured,metadataisthefirst componentanalyzedbythesearchenginetodetermineanitem’srelevancy.Forexample,sayauseris searchingforaMicrosoftWorddocumentauthoredbyaparticularcolleagueandentersthekeyword “energy”intothesearchfield.Thesearchenginewillfirstconsideronlydocumentsthathavemetadata designatingthemtobeWordfilesandauthoredbythedesignatedcolleague.Itwillthenlookthroughout
11
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
themetadataandunstructuredcontentofthedocumentstoreturnonlythosethatcontaintheterm “energy.”InSharePoint,documentsthatcontaintheterm“energy”inthetitlearemostlikelymore relevantthanthosethatincludeitwithinthebodyofthewriting.Consequently,thosedocumentswith “energy”inthetitlewillappearbydefaulthigherintheresultsetthanthosethatcontainitinthebody. Thetitleofadocumentisapieceofmetadataassociatedwiththefile. Asusersmaturepastthemostbasicconceptsofsearch,metadatabecomesincreasinglyvital.Itis whatallowsuserstorefinesearchesbasedonpropertyrestrictions.Metadatatagsarewhatenabletag cloudsandhitmappingforglobalsearchengines.Thelanguageofitemsandwebpagesisdesignatedby metadata,andsoisthefiletype.Withoutmetadata,searchengineswouldnotbeabletodifferentiate betweenthetitleofadocumentandthebody.TheywouldbeunabletotellifaresultisaMicrosoftWord documentoranAutoCADrendering. WhenusersuploaditemstoSharePoint,theyarebydefaultgiventheoptiontoaddavarietyof standardmetadatatodocumentssuchastheauthorandtitle.DependingonthedesignofaSPS2010 deployment,differentmetadatamaybesetuptoberequestedorrequiredfromusersbeforefinishingan upload.Thismetadataisthenstoredinadatabaseforusebythesearchindex.Aswillbeseenin Chapters3and10,themanagementofmetadatagreatlyaffectsrelevancy,ranking,andthegeneral abilitytofinditemsusingsearch.
WebParts WebPartsareASP.NETservercontrolsandactasthebuildingblocksofSharePoint.Theyallowusersto modifytheappearance,content,andbehaviorofSharePointdirectlyfromthebrowser.WebPartsallow forinteractionwithpagesandcontrolthedesignofapage.ForusersunfamiliarwithSharePoint,Web Partsarealsoknownasportletsandwebwidgets.Thesebuildingblocksprovidealltheindividualbitsof functionalityusersmayexperiencewithinaSharePointenvironment. ExamplesofWebPartsincludethosesuchastherefinementpanelWebPart,whichallowsusersto drillintosearchresults,andtheBestBetsWebPart,whichsuggestsoneormoreitemsfromwithina searchresultsetbasedontheenteredkeyword.InSharePoint2010,thereareover75WebPartsthat comewiththeplatform,17ofwhicharededicatedtosearch.TheoptionsforavailableWebPartsare increasingdailyasadditionalcustomWebPartscanbecreatedin-house,purchasedfromthird-party vendors,orsharedfreelyonsitessuchasCodePlex.Eachcanbeenabledordisabledtochangethe availablefunctionality,movedaroundthepagetochangelayout,andreconfiguredtochangebehavior. ThedesignandplacementofWebPartscanbecontrolledbyadministrators.MostWebPartshavea numberofsettingsthatcontroltheirappearanceandavailableuserinteractions.Administratorscan alsouseWebPartstocontrolthelayoutofapage.Forexample,iftheadministratorwantsthesearch refinerstoappearontherightofthesearchresultspageinsteadoftheleft,heorshecanmovethe refinementpanelWebParttotherightzone.Iftheadministratorwantstodosomethingmoreextreme, likeaddingtheadvancedsearchpageoptionstothesearchresultspage,heorshecanaddtheadvanced searchboxWebParttothesearchresultspage. ThedesignandplacementofWebPartsaroundapageiscontrolledbyzones.Pagesarebrokeninto eightzones.AdministratorscanmoveWebPartsaroundthepagebydraggingthemintodifferentzones orplacingthemaboveorbeloweachotherwithinzones.Figure1-4showsthezoneswithinapagethat canbeutilizedforcustompagelayouts.
12
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
Figure1-4.SharePoint2010WebPartzones TheavailableWebPartsareoneofthemajorunderlyingdifferencesbetweenSharePoint2010and SharePointFoundations2010.SinceWebPartsstrictlycontroltheavailablefeatureswithinSharePoint, limitingthefreeSharePointFoundationstoonlythebasicWebPartsprovidesthefunctionalitygap. Table1-3showsalistofalltheout-of-the-boxWebPartsavailableinbothSharePoint2010and SharePointFoundations2010.
13
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
Table1-3.SharePointWebPartsList BusinessData
MediaandContent
BusinessDataActionsWebPart.dwpM
edia.webpart
BusinessDataAssociationWebPart.webpartM
SContentEditor.dwp
BusinessDataDetailsWebPart.webpartM
SImage.dwp
BusinessDataFilter.dwpMSPageViewer.dwp BusinessDataItemBuilder.dwpMSPi
ctureLibrarySlideshow.webpart
BusinessDataListWebPart.webpartSilverlight.web IndicatorWebPart.dwp KpiListWebPart.dwp Microsoft.Office.Excel.WebUI.dwpowa
part
OutlookWebApp .dwp
MossChartWebPart.webparto
wacalendar.dwp
VisioWebAccess.dwpo
wacontacts.dwp
ContentRollup CategoryResultsWebPart.webpart CategoryWebPart.webpart ContentQuery.webpartAdva
owainbox.dwp owatasks.dwp Search ncedSearchBox.dwp
MSUserDocs.dwpDualChineseSearch.dwp MSXml.dwpPeopleRefine
ment.webpart
RssViewer.webpartPeo
pleSearchBox.dwp
siteFramer.dwpPeo
pleSearchCoreResults.webpart
SummaryLink.webpartQuer TableOfContents.webpartRefinement.w WhatsPopularWebPart.dwpSearch WSRPConsumerWebPart.dwpSea
14
ySuggestions.webpart ebpart ActionLinks.webpart rchBestBets.webpart SearchBox.dwp
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
Filters
SearchCoreResults.webpart
AuthoredListFilter.webpartsear
chpaging.dwp
DateFilter.dwpsear
chstats.dwp
FilterActions.dwpsear
chsummary.dwp
OlapFilter.dwpSumma
ryResults.webpart
PageContextFilter.webpartTopAns
wer.webpart
QueryStringFilter.webpartVisualBest SpListFilter.dwp TextFilter.dwp
Bet.dwp SQLServerReporting
UserContextFilter.webpartReportViewer.dwp SocialCollaboration
Forms
contactwp.dwpMicrosoft.Office.Info
Path.Server.BrowserForm.webpart
MSMembers.dwpMSSimpleForm.dwp MSUserTasks.dwp ProfileBrowser.dwp SocialComment.dwp TagCloud.dwp
SharePoint2010SearchArchitecture ThearchitectureofsearchinSharePointcanbesomewhatcomplextounderstand,specificallybecause thesegmentationoffunctionsbetweenhardwareandthewaythefunctionsaremanipulatedfroma softwareperspectivearequitedifferent.Ineverysearchengine,therearefourmaincomponentsto search,althoughtheymaybenameddifferentlyineachsolution.Thesecomponentsincludethe crawler,indexer,queryprocessor,anddatabases.Eachoftheseplaysavitalroleingathering,storing, structuring,andreturningtheitemswithinasearchenvironment.Ineverysearchengine,thesemajor componentsholdthesamerole,butthedifferencesinsearchenginesarefoundinthewaythese componentsinteractwitheachotherandexecutetheirownfunction.Understandingthedifferences betweenthesefunctionalunitswillbehelpfulwhenhavingconversationsonthissubject,tyingtogether researchfromothersources,andgraduatingtotopicsbeyondthescopeofthisbook. ThesearcharchitectureinSharePoint2010hasbeenredesignedfromMOSS2007toallowfor significantlygreaterscaling.Thecomponentsofsearchcanmostsimplybegroupedintothree functionalcomponents.Theseincludequerycomponents,crawlcomponents,anddatabase components.Eachcanbescaledseparatelytomeetthedemandsofaparticulardeployment.Before understandinghowtoplan,setup,configure,andcustomizesearchinSPS2010,itisimportantto understandwhatthesecomponentsdo.Figure1-5providesahigh-leveloverviewofthecomponentsof searchwithinSPS2010andhowtheyinteractwitheachother.Furtherdetailsontheseserviceswillbe
15
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
foundthroughoutthisbook,butthefollowingfigureprovidesaninitialconceptualdrawingtoassist withunderstandinghoweachfunctionconnects.
Figure1-5.SharePoint2010searchservicearchitecture
TheCrawler Crawlingistheprocessofgatheringdatafromcontentsourcesandstoringitindatabasesforusebythe queryserver.Thisprocessistheunderlyingplumbingofthesearcharchitectureandislocatedonthe crawlserverinSPS2010.Thecrawlerisresponsibleforgatheringstructuredandunstructuredcontentto beindexed.Itisnecessaryforcollectingallinformationintoasearchableindex,includingcontentin SharePoint,contentonshareddrives,fromwebservices,Exchangepublicfolders,databases,andnonSharePointhostedapplications.Withoutacrawler,SharePointwouldnotbeabletogatherdatafrom contentsources,theWeb,federatedfarms,othercontentmanagementsystems,ordatabases.
16
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
SharePoint’scrawlercangathercontentfromavarietyofcontentsources.Ithasbuilt-incapabilities toindexitsowndocumentsaswellaswebcontentandcontentfromdirectories.Itcanalsoindexalmost anyothertypeofcontent.Itdoesthisthroughconnectorsandprotocolhandlersthatessentiallyunlock acontentsourcetoindexingbytranslatingthedataintosomethingthattheSharePointcrawlercan understandandstore.ConnectorsinSharePoint2010aremanagedthroughtheBusinessConnectivity Services(BCS).ForthosefamiliarwiththeBusinessDataCatalog(BDC)inMOSS2007,theBCSisits replacement.TheBCSprovidesread/writeaccesstoline-of-business(LOB)systems,soitnotonly managesthegatheringofcontentbutcanalsobeusedtomanipulateorchangecontent.Bydefault, SharePoint2010’spre-installedconnectorscanmanageawiderangeofcontentsources,suchasLotus Notes,Exchange,andDocumentum.Connectorssupportingaccesstodatabases,webservices,and WindowsCommunicationFoundation(WCF)canbecreatedthroughtheBCSwithouttheneedforcode. Inadditiontothepre-installedandeasilybuiltconnectors,externalcontentsourcescanbeaccessedby writingacustomconnectorthroughtheBCS.TheBCSissuchanimportantpartofsearchingonexternal contentsourcesthatanentirechapterhasbeendedicatedtoit.PleaseseeChapter9forfulldetailson usingtheBCStocrawlandindexcontentsources.Ifcrawlingandindexingrequirementsarebeyondthe capabilitiesofconnectorcreationthroughtheBCS,protocolhandlerscanbecodedwithC#or purchasedthroughthird-partyvendors.PurchasableprotocolhandlerswillbediscussedinChapter11, butC#codingisbeyondthescopeofthisbookandwillnotbediscussed. SharePoint2010cancrawl,index,andsearchmorethanjustdocumentcontentsources;itcanalso dothisforpeople.ThiscanallbedoneonuserprofileswithconnectionstoActiveDirectory(AD)and MySiteswhilebeingsecuritytrimmedthroughLightweightDirectoryAccessProtocol(LDAP).These integrationsallowsearchingforpeoplewithspecialskills,departments,teams,oranyotherdatathat maybeassociatedwithanemployee.TheLDAPsecurityalsoinsuresthatonlyuserswiththe appropriatepermissionscanreturnsensitiveinformationsuchasaddresses,phonenumbers,andsocial securitynumbers.Moreinformationaboutcrawlingandindexingthistypeofinformationcanbefound inChapter3.
TheIndexer Indexingistheprocessofturningdatagatheredbythecrawlerintologicalstructureddatathatisusable byasearchengine.Thisprocessisthesecondkeycomponenttoanysearchengine.Theindexeris responsibleformakingsenseofcrawleddata.Theindexeralsocollectscustommetadata,manages accesscontroltocontainers,andtrimstheresultsfortheuserwheninterfacingwiththesearchengine. Unlikemanyotherenterprisesearchtools,SharePoint2010allowsonlylimitedaccesstotheindexing capabilities.*MoredetailonthecapabilitiesoftheSharePoint2010indexwillbefoundinthenext chapter.
■Note*ThisisoneofthemajordifferencesbetweenFASTSearchServerforSharePoint2010andSharePoint 2010.
Dependingonthecontentbeingindexed,iFiltersmaybenecessary.AniFilterisaplug-inforthe Windowsoperatingsystemthatextractsthetextfromcertaindocumenttypesandmakesasearchable copyofthefilesinatemporaryfolder,whichallowstheSharePointcrawler(andWindowsdesktop search)toindexthecontent.WithoutiFilters,contentcouldbegatheredintoSharePoint,butitcould
17
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
notbetranslatedintodatathesearchengineunderstands.Chapter3addressespre-installedandthirdpartyiFiltersinmoredetail. Inmostsearchsolutions,especiallyenterprisesearchtools,thecrawlerandindexerareseparate controllableprocesses.InSharePoint,Microsofthasconsolidatedthesetwoprocessesintoonelogical componentcalledtheindexengine.Thisdoesbecomecomplicated,however,whenlearningthe physicalserverarchitectureofwherethesefeaturesreside.Thecrawlerandindexeraremashedtogether tocreateaneasier-to-manageandstreamlinedprocessinSPS2010.Asmentionedinthelastsection,the crawlerishousedonthecrawlserver.Theindexerfunctionalsooccursonthissameserverandis essentiallytiedtothecrawler.Thesetwocomponentstogetherarecommonlyreferredtoastheindex engine.Theindexpartitionscreatedbytheindexenginearepropagatedouttoallqueryserversinthe farms.Thesequeryserversarehometotheindexpartitionsandthequeryprocessordiscussedinthe nextsection.Understandingwherethesedifferentfunctionsresideisnotoverlyimportantoncesearch issetup,butitisextremelyimportantwhenplanningforaninitialimplementationandmakingchanges toafarmtoimproveperformance.Toreview,thecrawlerandindexerfunctionsresideonthecrawl servers.Thecrawlergathersdatafromcontentsources;theindexerthenprocessesandtranslatesthe dataforusebySharePoint.Theindexerfunctiononthecrawlserverthenpusheslogicalsectionsofthe indexouttoindexpartitionsonqueryservers.Thesequeryserverscanthenprocessqueriesagainsttheir partitionoftheindex,asdiscussedinthenextsection. Thetopicofplanningserverarchitectureandamoredetailedwalkthroughofsearcharchitecture willbefoundinthenextchapter.Althoughthedifferencebetweentheserverlocationofacomponent andthewaythecomponentsinteractwitheachothermaybedifficulttounderstandthisearlyintothe book,theseconceptswillbecomeclearerasyoulearnmoreinlaterchapters.
TheQueryProcessor Thequeryprocessoristhethirdmajorcomponentofthesearcharchitecture.Thequeryprocessoristhe portionofthesearcharchitecturethatusersdirectlyinterfacewith.Itiswhatacceptsqueriesentered intothesearchbox,translatesthemintoprogrammaticlogic,deliversrequeststotheindexengine,and returnsresults. Usersinterfacewiththequeryprocessoreachtimetheyenteraquerytothesearchboxorsearch center.Theuserprovidesthequeryprocessorwithaninstructioneachtimeasearchqueryisentered. Thequeryprocessoracceptsthatqueryandappliesprogrammaticlogictotranslateitintologicthe indexwillunderstand.Thesearchenginethenliaiseswiththesearchindextopullalistofsearchresults thatcorrespondtotheuser’senteredquery.Usingarelevancyalgorithm,thesearchengineprioritizes searchresultsandpresentsthembacktotheuser. Everyqueryprocessorworksinthismanner,buteachusesadifferentalgorithmforliaisingwiththe searchindexandprioritizingresults.ThisiswhySharePoint2010,GoogleSearchAppliance(GSA),and FASTforSharePoint2010cansearchagainstthesamecontentsourcesbutreturndifferentresultsor resultsinadifferentorder.InSharePoint2010,therearewaystomanipulatethepriorityofsearch results,orrelevancy,throughdocumentpopularity,improvedmetadata,andnoindexclasses.Thistopic isdiscussedindetailthroughoutthelatterportionofChapter3. Asjustmentioned,thequeryprocessorappliesalayerofprogrammaticlogictoqueriestocreatea syntaxthatotherportionsofthesearcharchitecturewillunderstand.InSharePoint,thesetechniques includewordbreaking,Booleanoperators,wildcards,andstemmers.Wordbreakingistheprocessof breakingcompoundwordsintoseparatecomponents.Booleanoperatorsareuser-enteredsyntax,such asANDaswellasOR,whichmanipulatethewaymultipletermsinaqueryarehandled.Thewildcard operator,denotedbythecharacter*,allowsforthetailofasearchtermtobeunfixed.Anexampleofthe useofawildcardisthatenteringShar*wouldreturnresultsforSharePoint,Sharon,orShark.Stemmers aresimilartowildcardsbutareusedtorecognizevariationsonaword.Anexampleofthisvariationis
18
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
returningplanningfortheenteredwordplan.Fulldetailsonquerysyntax,includingachartofavailable syntax,canbefoundinChapter5. IntheSharePoint2010architecture,thequeryprocessorislocatedonthequeryserver.Sinceuserenteredqueriesarehandeddirectlytotheindex,thisisthelogicallocationforboththeindexerand searchenginetoreside.Bylocatingbothwithinthesamearchitecturalunit,SharePoint2010decreases thetimeittakesforaquerytopasstotheindexandfortheindextohandresultsbacktothesearch engine.InteractionswiththequeryprocessoroccurthroughuserinterfacescalledWebParts,locatedon thewebserver.Thespecificsofthisarchitecturearediscussedindetailinthenextchapter.
■NoteAlthoughthequeryprocessorisakeycomponentofsearch,andmustexistforsearchtofunction,thereis verylittleifanyofficialMicrosoftliteratureaboutthecomponent.Thisisbecause,unlikesomesearchtools,the SPS2010searchengineisfixedandunabletobedirectlymanipulatedbydeveloperswithoutadvanced knowledgeoftheinteriorworkingsofSharePoint.Asaresult,aformaltitleforthiscomponentisnotwell established.Inotherliterature,blogs,andpublicforums,thiscomponentmaybereferredtobydifferentnames suchasqueryengineorsearchengine.Throughoutthisbook,wewillremainconsistentbyusingthetermquery processor.
TheDatabases Thefourthandfinalcomponentsofthesearchinfrastructurearedatabases.Almostalldatain SharePointisstoredinSQLdatabaseinstances.Inregardstosearch,databasesareusedtostoreawide rangeofinformation,suchascrawledandindexedcontent,properties,userpermissions,analysis reports,favoritedocuments,andadministrativesettings.Whenthecrawleraccessesacontentsource andbringsdataintoSharePoint,itplacesthatcontentintooneormoredatabases.Inaddition,allofthe datathatadministratorsandusersaddtoSharePointthroughactiveactions,suchasaddingmetadata, orpassiveactions,suchaslogscreatedfromportalusage,isalsostoredinSQLdatabases.Thereare threeprimarySQLdatabasesnecessarytorunthesearchserviceinSPS2010. Crawldatabasesmanagecrawloperationsandstorethecrawlhistory.Each crawldatabasecanhaveoneormorecrawlersfeedingit,inwhichcaseeach crawlercanattendtodifferentcontent.Thedatabasebothdrivesthecrawland storesthereturnedcontent.Forthosefamiliarwiththedatabasearchitectureof MOSS2007,thisdatabasereplacestheSearchdatabase. Propertydatabasesstoretheproperties(metadata)forcrawleddata.This structuredinformationisusedbytheindextoorganizefiles,indicatenecessary permissions,andcontrolrelevancy. TheSearchAdmindatabasestoresthesearchconfigurationdataandaccess controllist(ACL)forcrawledcontent.Unlikeotherdatabases,onlyoneSearch AdmindatabaseisallowedornecessaryperSearchserviceapplication.For thosefamiliarwithMOSS2007,thisisthereplacementfortheSharedServices Provider(SSP)database.
19
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
ForanySharePointenvironment,therewillbeanumberofvariousdatabases,dependingonfactors suchashowcontentisstructured,thenumberofcrawlerspullingfromcontentsources,thetypesof analyticsstoredforbusinessintelligence,andsecuritytrimming.Otherdatabasesthatmaybe encounteredincludeStagingandReportingdatabasesforanalyticsorLoggingdatabasesfordiagnostics. Chapter2willdiscussplanningfordatabasesinsignificantlymoredetail.
MultilingualSupport SharePoint2010supportsover40languagestocatertotheglobalusageofMicrosoftSharePointproduct lines.Thefullextentsofsupportedlanguagesarenot,however,automaticallyinstalledwhenSharePoint 2010isdeployed.Foradditionallanguagesupport,languagepacksaremadeavailablethroughMicrosoft andareavailableforfreedownload.SharePointServer2010,SearchServer2010,SearchServerExpress 2010,andFASTSearchServerforSPS2010allusethesamelanguagepackstoprovideconsistency betweensolutions.Multiplelanguagepackscanalsobeinstalledonthesameserverwithoutchanging theunderlyinglanguageoftheMicrosoftServerproduct.Thisallowsmultinationaldeploymentstouse onefarmtohostalargegeography. Languagepackscontainlanguage-specificsitetemplates.Thesetemplatesallowadministratorsto createsitesbasedonaspecificlanguage.Withouttheselanguagepacks,sitesinlanguagesotherthan thoseallowedintheinstalledproductwouldbeimproperlydisplayed.Itisalsoimportanttonotethat languagepacksdonottranslateanexistingsiteorsitecollection;theysimplyallowadministratorsto buildnewsitesorsitecollectionsinadifferentlanguage. Forsearch,theselanguagepacksarevitalforwordbreakingandstemmingtooperatecorrectly.By applyingalanguagepack,onesearchinterfacecanbeusedtosearchagainstmultilingualcontent,while simultaneouslyrecognizingthelanguagebeingenteredinthesearchbox.Withoutlanguagepacks,word breakswouldnotbeinsertedinlogicalpositions,acorrelationwouldnotbeabletobemadebetweena searchedtermanditsvariousstems,andtheSharePointsearchenginewouldbeunabletoproperly translateaqueryintoastructuredpresentationfortheindex. Microsoftiscontinuingtosupportadditionallanguagestoincreasetheabilityforglobalcompanies toadoptSharePoint.Thelistofsupportedlanguagesatthetimethisbookispublishedandtheir LanguageIDscanbefoundinTable1-4.LanguagepacksareavailablethroughMicrosoftfordownload. Table1-4.SharePoint2010SupportedLanguages
Language Arabic1
Language ID 025
Language ID
Italian
1040
Japanese
1041
Basque106
9
Bulgarian1
026
Kazakh
1087
Catalan1
027
Korean
1042
2052
Latvian
1062
Lithuanian
1063
Chinese(Simplified)
Chinese(Traditional) 1028
20
Language
CHAPTER1■ OVERVIEWOFSHAREPOINT2010SEARCH
Language
Language ID
Language
Language ID
Croatian1
050
Norwegian(Bokmål)
1044
Czech1
029
Polish
1045
Portuguese(Brazil)
1046
Danish1030 Dutch104
3
Portuguese(Portugal) 2070
English1
033
Romanian
1048
Estonian1
061
Russian
1049
Finnish1
035
Serbian(Latin)
2074
French1
036
Slovak
1051
Galician1
110
Slovenian
1060
German1
031
Spanish
3082
Swedish
1053
Greek1032 Hebrew1
037
Thai
1054
Hindi1
081
Turkish
1055
Hungarian1
038
Ukrainian
1058
Scaling Thequeryserver,crawlserver,anddatabaseserverfunctionsinSharePoint2010areextremelyscalable. Thesefunctionscanallbegroupedontoasinglephysicalserverinsmalldeployments,orspreadacross severaldifferentphysicalserversasnecessarytocatertoperformance,availability,bandwidth,and securityneeds.Therearetwokeyconceptsofscalingthatneedtobeunderstoodbeforeconsideringthe implicationsofphysicalserverconfigurations.Theseconceptsarescalingupandscalingout,eachof whichhasdistincteffectsonasearchdeployment. Scalingoutistheconceptofaddingmorehardwareandsoftwareresourcestoincrease performance,availability,andredundancy.Scalingoutisdonetohandlemoreservices,sites, applications,andqueries.Itisalsodonetoachieveredundancy,whichresultsinincreasedavailability. Availabilityreferstotheabilityorinabilityofasystemtorespondpredictablytorequests.Theresultof failuresinavailabilityisdowntime,which,dependingontheseverity,meanstheinabilityforusersto properlyleverageaSharePointdeployment.Byscalingout,therearegreaterinsurancesagainst downtime,butincreasedlicensecostsandhardwarecostswillbeincurred.
21
CHAPTER1■OVERVIEWOFSHAREPOINT2010SEARCH
Scalingupistheconceptofimprovingeachserverbyaddingmoreprocessors,memory,storage, andfasterdiskstohandlealargerworkload.Scalingupallowsforeachservertoperformagiventask faster.Addingafasterqueryserver,forexample,allowsforeachqueryenteredbyausertobeaccepted andresultsreturnedfaster.Addingafastercrawlserverimprovescrawlspeed,andaddingmorestorage spacetoadatabaseserverallowsforretentionofmorecontentandmetadatafromcrawledcontent sources. SearchinSharePoint2010issignificantlymorescalablethaninpreviousversionsofSharePoint. UnlikeMOSS2007,whichallowedonlyonecrawlserverperfarm,youcannowdeploymultiplecrawl serverstoincreaseindexingspeed.Inadditiontoredundantcrawlservers,multiplequeryserversand databaseserverscanalsobedeployedinonefarm.Greaterflexibilityinbothscalingupandscalingout iswhatdrivesSharePoint2010’sabilitytocrawlmorecontent,storemoredata,andexecutequeries fasterthanMOSS2007. BeforedeployingSharePoint2010,thephysicalserverarchitectureshouldbecarefullyconsidered. Theresultsofthisdecisionwillgreatlyaffecttheperformanceofasearchdeployment,butitwillalso drasticallyswayhardwarecosts,licensingcosts,deploymenttime,andmaintenancecosts.Plansfor futuregrowthofaSharePointdeploymentaswellaslimitationsofthesoftwareshouldalsobetakeninto accountwhenplanningtheappropriatearchitecture.Afullreviewoftheconsiderationsthatshouldgo intoplanningsearcharchitecturecanbefoundinChapter2.
Extensibility SharePoint2010isnotlimitedtothefeaturesandfunctionsavailableoutofthebox.Withtheright skillset,thereisagreatdealofflexibilitythatrangesfrombasiccustomization,suchasdifferentsite templates,toadvancedconcepts,suchascustomworkflows,searchnavigation,andcrawler connectivity.Thefactthatfunctionalityisnotimmediatelyapparentdoesn’tmeanitcannotbeaddedto aSharePointfarm. ThebulkofthisbookfocusesonwhatcanbedonewithSharePointoutoftheboxwithout additionaldevelopmentorthird-partyresources.Itis,however,importanttounderstandthat SharePointisjustthebackboneplatformandbuildingblocks.SPS2010isjusttheChristmastreewithout lightsordecorations.TogettheleverageofthefullpotentialofSharePoint,itmaybenecessarytodive intomoreadvancedfunctionalitybydoingcustomdevelopment,implementingfreewareWebParts,or purchasingavendedsolution. Thelatterportionsofthisbookwilldiscussmoreadvancedtopicsofextensibility.Chapter7 providesthebasicsforcustomizingthelookandfeelofthesearchinterfacethroughmasterpages,CSS, XSLTs,andWebPartXMLcustomization.Chapter9focusesonhowtousetheBusinessConnectivity Services(BCS),whichisincludedwithallSharePoint2010products,toindexcustomcontentandbuild customconnectors.Finally,Chapter11providesanoverviewofvendedproducts,suchascustomWeb PartsandiFilters,whichextendthesearchcapabilitiesofSharePoint2010.
Summary Thefirsthalfofthischapteroutlinedthefocusofthisbook,exploredthebackgroundhistoryof MicrosoftSharePointServer2010,andprovidedabriefoverviewoftheotherproductsintheSharePoint searchcatalog.Thesecondhalfofthischapterprovidedanintroductiontothekeyconceptsand architecturalcomponentsthatwillbefocusedonthroughoutthisbook.Thesesectionsarevitalfor buildingthebasicsforthemoreadvancedsubjectsdiscussedthroughoutthereadings.Therestofthis bookwilltakeanin-depthdiveintothekeytopicsnecessarytoplan,setup,configure,customize,and extendsearchwithinMicrosoftSharePoint2010.
22
CHAPTER 2
■■■
Planning Your Search Deployment Aftercompletingthischapter,youwillbeableto •
Estimatecontentsizeandidentifyfactorsthatwillinfluencecrawltimes
•
Determinehowmuchstoragespaceyouwillneedtoallocatetosearch
•
PlanforaninitialdeploymentofSharePoint2010Search
•
Anticipateperformanceissues
•
Scaleforsearchperformance
•
Understandavailabilityandplantoavoiddowntime
•
ProvisionsearchwithWindowsPowerShell
MicrosoftSharePointServer2010issignificantlymoreadvancedthanpreviousversionsofthe SharePointplatform.Fewareasweregivenmoreattentionthanthestructureofthesearchcomponents. Thisre-structuringhasmadethesearchpieceofSharePointvastlymorescalableandrobustforlarge- andsmall-scaledeploymentsalike.Withthesechanges,however,comeaddedcomplexityandtheneed formorethoughtfulconsiderationwhenplanningaSharePointSearchdeployment. WhendeterminingplanningstrategiesfordeployingSharePointSearch,itiswisetoconsiderthe architecturalandbusinessenvironmentaswellastheavailablebudgetandavailabilityofhardwareand requiredsoftware.Whatshouldbeindexedandwhatshouldbedeliveredtotheusersareessentialareas toconsiderbeforestartingadeployment. Thesimplestmodel,andthemostcommonfordevelopmentandtestingpurposes,istoinstallall thesearchcomponents,includingthedatabasecomponents,onasingleserver.Butmostcompanies willwanttoconsiderseparatingsearch(atleastinpart)fromtheirbaseSharePointdeployment.Most implementationswillnaturallystartwithasingleserverwithcombinedcrawlandqueryroles,in additiontothewebserversanddatabaseserversalreadyinthefarm,andthenconsiderscalingoutas searchperformanceisidentifiedasproblematic. Theadministratorshouldalwaysbewaryofthefactthatperformanceissues,althoughnotobvious, cancausefrustrationandstalledadoptionoftheplatform.Thereforeitiswisetothinkaheadandplan forhighavailabilitywhenatallpossible.Someorganizationscantolerateslowerresponsetimesas searchmaynotbeconsideredacriticalbusinesstool.However,itisabestpracticethatthetimeittakes fromenteringasearchtermtothemomenttheresultpageisfinishedrenderingshouldbenomorethan onesecond.Ofcourse,therearemanyfactorsthatmaydeterminetheresultpagerenderingtime, includingcustomWebPartsanddesignelementsthatarenotdirectlyrelatedtosearch.However,ifatall possible,careshouldbetakentolimittheamountoftimeforanySharePointpagetobereturned.
23
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Administratorsshouldoptimallytargetalllatencytosub-secondlevels.Poorlyperformingsearchin SharePointoftengivesrisetoquestionssuchas,“Whydoesittakefivesecondstosearchinourown systemswhenIcangetresultsfromtheInternetinlessthanasecond?” OutlinedinthischapterarethecorecomponentsofSharePoint2010Searchandconsiderationsthat shouldbetakenintoaccountwhenplanningadeployment.Eachcomponentanditsuniqueroleare described,andhowtheycanworkindependentlyortogetherisaddressed.Hardwareandsoftware requirementsarebrieflyoutlinedandreferencestomoreinformationgiven.Finally,scalingand redundancybestpracticesarediscussed.
SharePoint2010Components SharePoint2010hasanumberofperformanceandredundancyfeatures.Thesearchcapabilitieshave beenredesignedtoallowforabroaderabilitytoscaleandmorepointsforredundancy. ThenewarchitectureforSharePoint2010providesamorecompartmentalizedapproachtosearch bydividingthetasksthatthesearchmechanismperformsintodifferentrolesthatcanalsobespreadout acrossphysicalorvirtualservers,aswellasfurtherdivisionswithintheseroles.Thefourserverrolesfor searchareasfollows: •
Webserverrole
•
Queryserverrole
•
Crawlserverrole
•
Databaseserverrole
Thequeryserverandcrawlserverrolesareuniquetothesearchcomponent,whereastheweb serveranddatabaseserverrolescanbeutilizedbyandarenecessaryforothercomponentsof SharePoint2010.
WebServerRole ServershostingthewebserverrolehostthewebcomponentsofSharePoint2010thatprovidetheuser interfaceforsearching.Thesecomponents,suchassearchcentersites,WebParts,andwebpagesthat hostqueryboxesandresultpages,aredeliveredfromserverswiththewebserverroletotheendusers. Thesecomponentssendrequeststoservershostingthequeryserverroleandreceiveanddisplaythe resultset.Moredetailsoncustomizingthesearchcomponentsthatresideonthepageshostedbythe webserverrolearediscussedinChapters6and7. ThewebserverrolemaynotbenecessaryinSharePointfarmsthatarededicatedforsearch,asother farmsthatareutilizingthesearchfarmwillhandlethisroleandcommunicatewiththesearchfarm directlyfromtheirwebservers.Thewebserverroleisoftencombinedinsmallerdeploymentswithweb serversservingcontentorwithothersearchserverroles.
QueryServerRole Thequeryserverroleservesresultstowebservers.Queryserversreceiverequestsfromserverswiththe webserverroleandforwardtheserequeststoallserversinafarmwiththequeryserverrole.Theythen processthequeryagainstallindexpartitionsandreturntheirresultstotherequestingserver,which thenforwardstheresultstotherequestingwebserver.
24
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Oneachqueryserver,thereisaqueryprocessor,whichtrimstheresultsetforsecurity,detects duplicates,andassignstheappropriateassociatedpropertiestoeachresultfromthepropertystore.Any SharePointfarmprovidingsearchmusthaveatleastoneserverhostingthequeryserverrole.However,a farmmaycallsearchfromanotherfarmandthereforenotneedthequeryserverrole. Thequeryserverrole,likeotherapplicationrolesinSharePoint,canbehostedonaserverwith otherapplicationserverroles.ThismakesSharePoint2010veryversatilebutmaycauseconfusionwhen planningresourceusage.Havingallserversprovideallrolesisnotoptimalresourceusage,assome demandingrolesmaycauseotherrolestoperformpoorly.Cautionandconsiderationregardingtherole anddemandofeachserverandeachtaskarethereforeadvised. Thequeryserverholdstheindexonitsfilestructureorafilestructurerelativetoit.Aqueryserver canhosteithertheentireindexorindexpartitions—sectionsoftheindexthatcanbeassignedto differentqueryserversbytheadministratorforload,performance,andredundancy.Indexpartitions maybeduplicatedonanumberofserverswiththequeryserverroletoprovideredundancy.Adding queryserverswiththeindexpartitionedacrossthosequeryserverswillalsoincreasesearchquery performanceandreduceresultlatency.
IndexPartitions Anindexpartitionisaportionoftheentiresearchindex.Microsofthasdesignedtheindextobebroken intologicalsectionsthatcanbedistributedandmirroredacrossqueryservers.Generally,index partitionsarespreadacrossserversandrepresentanequalamountofcrawleddata.Indexesmayalsobe partitionedonasingleserver.Theycanalsobemirroredonanotherserverorsetofserverstoprovide redundancy. Imagine,forexample,thataSharePointfarmhas300GBofcrawleddataandthreequeryservers. Eachqueryservercanholdasingleindexpartitionrepresenting100GBofcrawleddata.Queryspeedis increasedbecausetheloadofsearchingtheindexisdistributedoverserversanddividedbythree.The queryserverstaketimetolookintotheindexforanygivenquery,andthereforesearchinginsmaller partitionsacrossmultipleserversissubstantiallymoreperformant.Anadditionalmirrorofeach partitioncanalsobeaddedtoeachqueryservertoinsureredundancy.Shouldanyonequeryserverfail, theremainingqueryserversstillhaveallportionsoftheindexandcancontinuetoserveresults.See Figure2-1.
Figure2-1.Threequeryserverswithmirroredpartitions
25
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
CrawlServerRole Thecrawlserverroleisresponsibleforcrawlingcontent.Thiscrawlingmechanismissimilartoother webcrawlingtechnologies,exceptthatitisspecificallydesignedtocrawlandindexSharePointcontent, includinguserprofilesfromadirectory,associateddocumentmetadata,customproperties,fileshares, Exchangepublicfolders,webcontent,anddatabaseandcustomcontentthroughtheBSC(aswellas contentviaiFiltersandprotocolhandlers). Thecrawlservershostthecrawlercomponents,and,likethequeryserverrole,atleastoneserverin aSharePoint2010farmprovidingsearchmusthostthecrawlserverrole.Crawlersonthecrawlservers areassociatedwithcrawldatabases.Eachcrawlerisassociatedwithonecrawldatabase. ItisrecommendedthattheSearchAdministrationcomponentalsobehostedontheserverwiththe crawlserverrole.However,itcanbehostedonanyserverinthefarm.SharePoint2010hostsonlya singleSearchAdministrationcomponentperSearchserviceapplication.
■NoteUntilsometimeinthemiddleof2010,thecrawlserverinSharePoint2010wasknownastheindexserver. InNovember2010,MicrosoftupdatedSharePoint2010documentation,changingthenametocrawlserver. However,manyblogpostsandreferencestoSharePoint2010usethetermindexservertorefertowhatwecall thecrawlserverinthisbook.We,assearchengineprofessionals,believethetermcrawlserverismuchmore appropriateforwhattheserver’sroleactuallyis,andobviouslyMicrosoftcametothinksoaswell.Administrators shouldjustbeawarethatthecrawlserverandindexserverarethesameinSharePoint2010,andtheactualindex livesonthequeryserver.
SearchServiceApplication(SSA) SharePoint2010hasitscoreservicesbrokenintoserviceapplications.Theseapplications,whichdeliver muchofthefunctionalityofSharePoint2010,areseparatedtoprovidegranularityandscalabilitywhen managingmanyofthedifferentfeaturesavailableinSharePoint2010.Theseservicesincludebutarenot limitedtotheUserProfileservice,theBusinessDataConnectivityservice,theManagedMetadata service,andtheSearchservice,amongothers.Additionally,third-partyvendorsorsolutionproviders couldprovidecustomserviceapplicationsthatplugintoSharePoint2010,althoughatthetimeof writing,therewerenotanygoodexamplesofathird-partyserviceapplication. TheSearchserviceapplicationistheserviceapplicationthatisresponsibleforthesearchengine.It managesthecrawlerandtheindexesaswellasanymodificationstotopologyorsearchfunctionalityat theindexlevel.
DatabaseServerRole InaSharePoint2010Searchdeployment,thesearchdatabasesarehostedonaserverwiththedatabase serverrole.ItisalsopossibletohostotherSharePoint2010databasesonthesameserverorseparate searchandcontentdatabaseroles.Serverswiththedatabaseserverrolecanbemirroredorclusteredto provideredundancy. TherearethreetypesofdatabasesutilizedbyaSharePoint2010farmprovidingsearch:property databases,crawldatabases,andSearchAdministrationdatabases.
26
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Asidefromdisksizeandperformancelimitations,therearenootherconsiderationsthatlimit hostingotherdatabases,suchasSharePointcontentdatabases,onaSharePoint2010serverwiththe databaseserverrole. •
Propertydatabases:Propertydatabasesholdpropertymetadataforcrawleditems. Thesepropertiescanbecrawleddocumentmetadataorassociatedcustom propertiesfromSharePoint2010.
•
Crawldatabases:Crawldatabasesstoreahistoryofthecrawl.Theyalsomanage thecrawloperationsbyindicatingstartandstoppoints.Asinglecrawldatabase canhaveoneormorecrawlersassociatedwithit.However,asinglecrawlercanbe associatedwithonlyonecrawldatabase.
•
SearchAdministrationdatabases:SearchAdministrationdatabasesstoresearch configurationdatasuchasscopesandrefinersandsecurityinformationforthe crawledcontent.OnlyoneSearchAdministrationdatabaseispermittedper Searchserviceapplication.
EnvironmentPlanningandMetrics WhenpreparingtodeploySharePoint2010Search,thereareseveralareasofconsiderationthatneedto beaddressed.Howmanyserverswillbeused,whichrolesthoseserverstake,andhowservicesare spreadacrossthemaredependentonhowmuchcontentthereistoindexandwhattheperformance expectationsare.Anotherconsideration,whichoftenbecomesthemostcritical,ishowmuchofa budgettheorganizationhastomeetthoserequirements. ThissectionintendstogiveanideaofthefactorstoconsiderwhenplanningaSharePointSearch deployment.Manyadministratorswillnothavemanychoiceswhenitcomestoinfrastructure,sothey mustplanthebestandmostperformantsolutionwiththehardwaretheyhave. Thekeyconsiderationsforplanningadeploymentareasfollows: •
Performance:Therearetwomainfactorsforperformancewhenitcomesto search—crawlperformanceandqueryperformance.Crawlperformancerefersto howfastthesearchcrawlingcomponentscancollecttextandmetadatafrom documentsandstoretheminthedatabases.Queryperformancereferstothe speedatwhichresultscanbereturnedtoendusersperformingsearchesandhow thatperformancemaybeaffectedbyquerycomplexityandvolume.SharePoint hasseveralareaswhereperformancecanbeimprovedbyadjustingoradding searchorcrawlcomponents.
•
Scalability:Organizationsgrowandshrinkasdotheirknowledgemanagement requirements.Mostoften,weenvisiongrowthandprosperity,andthiswould correspondwithincreasingcontentinSharePointandanincreasingloadonthe servicesitprovides.Searchisaservicethatisgenerallyseenasincreasingin popularityandadoption,andthereforeusuallyscalinguporouttohandle demandisnecessary.However,theoppositemaysometimesalsobea consideration.Scalingcanberequiredtoimproveperformancebyadding additionalhardwareand/orsoftwarecomponentsaswellasimprovingavailability byprovidingredundantservicesacrosshardware.Anyenvironmentshouldbe plannedsothatonecanscaletoimprovethesefactors.
27
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
•
Security:Oneofthemostkeyconcernsoforganizationsistheprotectionofdata. Securityisofparamountconcern.Securityisabroadtopicandworthyofcareful consideration.Securitycanbecontrollingaccesstoserversfromoutside intruders,butitcanalsobecontrollingwhichauthenticatedusersareallowedto seepreciselywhatcontent.
•
Availability:Criticalbusinesssystemsneedtobeavailableforuse.Downtimeofa keySharePointsiteoritsrelatedservicescanresultinhundredsorthousandsof employeesbeingunabletoperformtheirjobs.Thiskindofdowntimecanquickly costmillionsofdollarsinlostproductivityandundeliveredgoodsorservices. Makingserversredundantandhavingfailoverstrategiescanhelpmitigate hardwareandsoftwareproblemsthatcouldcausedowntime.
•
Budget:Budgetisalwaysakeyconsideration.Organizationsneedtomakecareful calculationsaboutwhatriskstheyarewillingtotaketoreducecosts.Somerisks arereasonablewhileothersarenot.Forexample,saving$10,000bynotmaking crawlserversredundantcouldbeafeasiblesavingsifcompanybusinessisnot adverselyaffectedbynothavinganup-to-dateindexforseveraldaysshouldthe crawlserversfail.However,having10,000employeesnotabletoaccess informationforevenadaycaneasilyoutweighthesavings.
Theseconsiderationswillbediscussedinmoredetailinthefollowingsections.First,itwillbeuseful togetanideaoftheminimumhardwareandsoftwarerequirementsthatMicrosoftsetsforthaswellas calculaterequireddisksizeforthedatabasesandunderstandtheinitialdeploymentoptions.
HardwareandSoftwareRequirements SharePoint2010’ssearchcomponentstaketheirrequirementsfromthebaseSharePoint2010server requirements,withtheexceptionthatqueryserversshouldhaveenoughRAMtoholdonethirdofthe activeindexpartitioninmemoryatanygiventime.Therefore,careshouldbetakenwhenplanning queryserversandthespreadofindexpartitionstoensurethereissufficientRAMfortheindex.
HardwareRequirements ThecorerecommendationsforhardwarehostingSharePointsearchareasfollows: •
•
28
Alldevelopmentandtestingservers: •
4coreCPU
•
4GBRAM
•
80GBsystemdrive
Allapplicationservers: •
4coreCPU
•
8GBRAM
•
80GBsystemdrive
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
•
Databaseservers: •
•
Smallproductiondeployments(lessthan10milliondocuments) •
4coreCPU
•
8GBRAM
•
80GBsystemdrive
•
Sufficientstoragespaceforsearchdatabases
Mediumtolargedeployments(morethan10milliondocuments) •
8coreCPU
•
16GBRAM
•
80GBsystemdrive
•
Sufficientstoragespaceforsearchdatabases
■NoteMicrosoftOfficeSharePointServer2007couldberunon32-bitservers.SharePoint2010requires64-bit servers.Becarefulthatalltheserversare64-bitifupgradingfromapreviousversionofSharePointandall associatedsoftware(e.g.,third-partyadd-ins)isalso64-bitcompatible.
SoftwareRequirements MicrosofthasmademajoradvancementsintheinstallprocessofSharePoint.SharePoint2010hasa surprisinglyfriendlyinstallerthatcancheckthesystemforprerequisitesandinstallanymissingrequired components.ThismakesinstallationofSharePoint2010forSearchinstallationsextremelyeasy. Therearesomeimportantthingstonote,however.SharePoint2010isavailableonlyfor64-bit systems.Thiswillmeanthatallhardwaresupportingtheoperatingsystemmustbe64-bit. SharePoint2010searchapplicationserversrequireoneofthefollowingWindowsoperatingsystems: •
64-bitWindowsServer2008R2(Standard,Enterprise,Datacenter,orWebServer version)
•
64-biteditionofWindowsServer2008withServicePack2(Standard,Enterprise, Datacenter,orWebServerversion)
IfServicePack2isnotinstalled,SharePoint2010’sinstallerwillinstallit(cool!). SharePoint2010searchdatabaseservers(non-stand-alone)requireoneofthefollowingversionsof SQLServer: •
64-biteditionofSQLServer2008R2
•
64-biteditionofSQLServer2008withServicePack1andCumulativeUpdate2
•
64-biteditionofSQLServer2005withServicePack3
29
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Wheneverpossible,itisrecommendedtousetheR2releases. ThereareanumberofotherrequiredsoftwarepackagesthattheSharePoint2010installer’s preparationtoolwillinstallaswell. •
Webserver(IIS)role
•
Applicationserverrole
•
Microsoft.NETFrameworkversion3.5SP1
•
SQLServer2008ExpresswithSP1
•
MicrosoftSyncFrameworkRuntimev1.0(x64)
•
MicrosoftFilterPack2.0
•
MicrosoftChartControlsfortheMicrosoft.NETFramework3.5
•
WindowsPowerShell2.0
•
SQLServer2008NativeClient
•
MicrosoftSQLServer2008AnalysisServicesADOMD.NET
•
ADO.NETDataServicesUpdatefor.NETFramework3.5SP1
•
Ahotfixforthe.NETFramework3.5SP1thatprovidesamethodtosupporttoken authenticationwithouttransportsecurityormessageencryptioninWCF
•
WindowsIdentityFoundation(WIF)
■NoteFormoreup-to-dateinformationandmoredetails,visitMicrosoftTechNet’shardwareandsoftware requirementspage:http://technet.microsoft.com/en-us/library/cc262485.aspx.
DatabaseConsiderations:DeterminingDatabaseSize Whendetermininghowmuchdatabasetoallotforsearch,itisimportanttoconsidereachdatabaseand itspurposeseparately.Mostsearchenginevendors’databasestakebetween15%and20%ofthetotal repositorysizeforallsearchdatabases.Althoughasafeguidelineistoalwaysallow20%ofcontentsize spaceforsearchdatabases,SharePoint’sarchitectureismorecomplexandrequiresalittlecloser consideration.Microsoftgivessomeformulaetocalculatethesearchdatabasesize.Althoughtestswill probablynotmatchthesecalculations,theyareagoodplacetostart. Also,rememberthatindexpartitionsdonotresideinSQLonthedatabaseserver.Theyresideonthe filestructureonorrelativetothequeryservers.TheirlocationcanbesetintheCentralAdministration underManageServiceApplications➤SearchServiceApplication➤SearchAdministration➤Search ApplicationTopology➤Modify.Thesedatabasescouldreasonablybeonahigh-performancediskarray orstorageareanetwork.SeeFigure2-2.
30
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Figure2-2.TheEditQueryComponentpagewithindexpartitionpath TherearethreedatabasetypesonthedatabaseserverheldinSQL:anAdministrationdatabase, crawldatabases,andpropertydatabases.Theservermaycontainmanycrawlandpropertydatabases dependingonthesizeandcomplexityofthedeployment.Itisessentialtoaccountforeachone. Microsoftgivesthefollowingcalculationstodeterminetheirsizes. TheSearchAdministrationdatabasestoresonlysecurityinformationandsearchsetting informationanddoesnotneedmorethan10GBofstoragespace.Itwilllikelynottakemorethan1GBin anyscenario,butitisallocatedextraforgoodmeasure. Crawldatabasesizeisrelativetothesizeofthecontentdatabaseitiscrawling.Contentdatabase size,ifoneisnotalreadyavailabletocheck,canbedeterminedwiththefollowingcalculationfrom Microsoft:
Databasesize=((Numberof documents×Numberof non-currentversions)×Average sizeofdocuments)+(10KB×(Listitems +(Numberofnon-currentversions×Number ofdocuments)))
■TipFormoredetails,seehttp://technet.microsoft.com/en-us/library/cc298801.aspx.
Thecrawldatabasessizesarethendeterminedbymultiplyingthesizeofthecontentdatabaseby 4.6%. Thepropertydatabasessizesaredeterminedbymultiplyingthesizeofthecontentdatabaseby 1.5%.
31
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Totaldatabaseserversizerequirementsforsearcharethereforeasfollows: •
Admindatabase=10GB
•
Crawldatabases=Contentdatabasesize.046
•
Propertydatabases=Contentdatabasesize.015
AsimpleexampleofaSharePointfarmwitha100GBcontentdatabasewouldrequirethefollowing: •
Admindatabase=10GB
•
Crawldatabases=100.046=4.6GB
•
Propertydatabases=1TB.015=1.5GB
•
Totalspacerequired=16.1GB
Additionally,theinput/outputpersecond(IOPS)requirementsonSQLforsearchareof importance.Searchisextremelydependentongoodseekperformance. •
Forthecrawldatabase,searchrequiresfrom3,500to7,000IOPS.
•
Forthepropertydatabase,searchrequires2,000IOPS.
QueryServerSpaceCalculations Indexpartitionsareheldonthequeryserversandnotinthedatabaseserver(unlesstheserverwiththe databaseserverrolealsohasthequeryserverrole).Thecrawldatabase,SearchAdministrationdatabase, andpropertydatabasesareheldinSQL.Indexpartitionsareheldonthefilestructure.Microsoft suggestscalculatingspacefortheindexpartitionsat3.5%ofthecontentdatabases.Thisspaceneedsto beonthedriveonwhichthequeryserverisstoringtheindexpartitions.Spaceshouldbealsoallocated fortheactivesearchindexandthedatacomingduringacrawlaswellasthetotalspacerequiredduring mastermerge.Therefore,thequeryserversshouldprovideatleastthreetimesthenecessaryspacefor theindex.
■NoteWhenconsideringredundancyorifthereismorethanoneindexpartition,additionalspaceforeach additionalpartitionwillbeneeded.
So,forexample,ifthereis100GBofcontentintheSharePointcontentdatabase,itcanbeexpected thatasingleindexpartitionwillrequire3.5GBofspace.Iftherearetwoqueryservers,eachholdinga singleactiveindexpartitionandoneindexpartitionmirror,oneshouldexpect7GB(3.5%2)ofspace or3.5GBperserverrequiredtoholdtheindexpartitions.
32
•
Contentdatabasesize=100GB
•
Indexpartition=100.035=3.5GB
•
Indexpartitionmirror=100.035=3.5GB
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
•
Spaceformastermerge=Allindexpartitions3
•
Total=21GB
InitialDeploymentGuidelines Itcanbeadifficultprocesstodecidehowlargeofadeploymentandhowmanyresourcestodedicateto aninitialsearchdeployment.Generallyspeaking,ifSharePoint2010isbeinginstalledasthefirst documentmanagementandcollaborationtool,thesearchcomponentscanstartoutintheirsimplest formandscaleoutasdocumentsareaddedandtheadoptionofSharePoint2010grows.However,this scenarioisbecomingrare,andmostorganizationswillfindthemselveseitherupgradingtoSharePoint 2010fromapreviousversionormigratingcontentfromanothersystemorfromanadhocsystem,such asafileshare.Inthesecases,initialdeploymentarchitecturesandbestpracticescanbeuseful. Luckily,Microsoftgivessomeguidelinesforwhatkindsofarchitecturescansupportdifferent scenarios.Theseguidelinesarebasedonthenumberofitemsthatareindexedandsearchableregardless ofwhethertheycomefrominsideoroutsideSharePoint2010.Theentiretyofthesedocumentsisknown asthecorpus. •
1milliondocumentsorless:Allrolesonasingleserveroroneapplicationserver andonedatabaseserver
•
1to10milliondocuments:Webserverandqueryserverrolescombinedononeto twoservers,onededicatedcrawlserver,andadedicateddatabaseserver
•
10–20milliondocuments:Samearchitectureas1to10milliondocumentsmodel butwithanadditionalcrawlserverandredundancyonthequeryservers—thatis, usetwoqueryservers,eachwithtwoindexpartitionsbrokenintohalfoftheindex partitiononeachandamirroroftheotherserver’shalfoneach.
•
20–40milliondocuments:Formorethan20milliondocuments,adedicated searchfarmisrecommended.Onadedicatedsearchfarm,serverswiththeweb serverrolearenotnecessaryaslongasthefarmwheresearchesareinitiatedhas serverswiththisroleandthoseserversareconfiguredtodirectqueriestothe dedicatedfarm.Thefarmshouldhaveaminimumoffourqueryservers,eachwith aquarteroftheindexinanindexpartition.Eachqueryservershouldalsohosta mirrorofanotherserver’spartitionforredundancy.Inaddition,twocrawlservers, eachwithtwocrawlers,andtwocrawldatabases,eachwithtwocrawlers associatedwithit,arerecommended.Inaddition,itisrecommendedthattwo additionaldatabaseserversbeutilizedtoholdpropertydatabasesandtheSearch Admindatabase.
•
40–100milliondocuments:Anyorganizationwithmorethan40million documentswillrequireacompletelydedicatedsearchfarmwithahighlevelof redundancy.Thewebserverroleshouldprobablybehandledbythecontentfarm exceptifadedicatedwebserverisallocatedforindexing(recommended).The farmshouldhavesixtotenqueryservers,eachholdinganequalportionofthe indexinanindexpartition,aswellasamirrorofoneoftheotherindexpartitions fromanotherserver.Thereshouldalsobefourcrawlserversandfourdatabase clusterswherethefourcrawlserverswritetotwocrawldatabases.
Usethefollowingflowchart(Figure2-3)toeasilyseehowmanyserverswillberequiredfora deployment.
33
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Figure2-3.Deploymentsizingdecisionflowchart
34
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
TypicalServerConfigurations Microsoftoftenreferstothewaythatitorganizesserversworkingtogetherasatopology,andthe administratorcanmodifythesearchapplicationtopologyfromwithinSharePoint’sCentral Administration.Topologyreferstotheoveralllayoutoftheserversandthesoftwarecomponentson thoseservers.Weusethetermsserverconfigurationsandtopologyinterchangeablyinthisbook. Thedifferentwaysinwhichserverscanbeconfiguredtoprovidescalability,performance,and redundancyforSharePoint2010arevastandlargelydependentontheparticularenvironmentofeach business.Wewillnotattempttogiveanexhaustiveexampleofeachpossibleconfigurationbutwill attempttooutlinethebasicmodelsandthepointswherethesemaybesafelyandmosteffectively modifiedtosuitparticularbusinessneeds. Asmentionedearlier,themostcommonandfirsttypeofdeploymentanySharePointadministrator willencounterwillbethesingleserverdeployment,simplybecausethisisthemodelwherealltesting anddevelopmentwillstart.However,feworganizationswithseriousdocumentmanagementand collaborationneedswillutilizeasingleserverinaproductionenvironment.Evensmall,departmental deploymentswillusuallyhaveatleastaseparatedatabaseserver. Whichtopologyfitsaparticularorganizationisdependentonseveralfactors,whichwediscusslater inthischapter.However,manyconsiderationsoutsidesearch,whicharenotcoveredinthisbook,are keyindecidingtheoveralltopologyofaSharePointdeployment,soweencourageadministratorsto investigatethistopicseparately.
SingleServer AsingleserverimplementationforverysmallcorporacanbeeitherpartofanexistingSharePointfarm orastand-alonesearchserverwithcrawlandquerycomponentsonit.Itmayormaynothavedatabase componentsontheserver.Mostorganizationswillhaveanexistingdatabaseclusterthattheywillutilize forperformanceandredundancy.Figure2-4showsasimplebuttypicalsinglesearchserver implementationwithorwithoutadatabase.
Figure2-4.Asingleserverdeployment
35
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
SmallFarm Manyorganizationswilldemandmoreperformanceandutilizeasmallsearchfarm.Thisfarm participatesinoverallSharePointtasksaswellasdedicatedsearchtasks.Oneofthewebserversmaybe outsideofNetworkLoadBalancing(NLB)toprovideperformanceforindexingormayparticipatein contentdelivery.Bothwebserversalsoperformthequeryserverrole.Thecontentservingportionofthe farmwillcertainlyhaveadditionalwebservers.Thereisasinglecrawlserver.SeeFigure2-5.
Figure2-5.Asmallfarminstallation
MediumFarm Inamedium-sizedfarm,thereshouldbeatleasttwoserverswithasharedqueryserverrolethatcan hostthewebserverrole.OneofthesemayormaynotbeexcludedfromNLBforindexingperformance. Therearetwocrawlserverstoprovideredundancyforcrawling.Thereisasinglededicateddatabase clusterforstoringthecrawldatabase,propertydatabase,andAdministrationdatabase.SeeFigure2-6.
36
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Figure2-6.Amediumsearchfarm
MediumDedicatedSearchFarm Atacertainpoint,thesearchcomponentswillneedtobeseparatedfromperforminganycontent deliverytasksanddedicatedtosearch.Inadedicatedsearchfarm,therecanbewebserversfor deliveringsearchrequestsandprovidingcontenttothecrawlserver;however,theyshouldbeexcluded fromparticipatingincontentdelivery.Othercomponentsshouldbeisolatedtotheirownserversand dedicatedtotheirownroles.Combiningrolesisstillpossible,butasthefarmgrows,dedicatingthe serverstoindividualroleswillbethewisestuseofresources.SeeFigure2-7.
37
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Figure2-7.Amediumdedicatedsearchfarm
LargeDedicatedSearchFarm Forthelargestdeployments,allrolesshouldbehostedonmultiplededicatedservers.Dedicatedweb serversforindexingarestillpossible,butthefocusshouldbeonprovidinghigh-performancequery componentstohandlequeriesfromalargeSharePointfarm.Alargefarmmayhavetenormorequery servers,fourormorecrawlservers,andatleasttwodatabaseclustersdedicatedtoholdingthesearch databases.AswesawintheSharePoint2010componentssection,indexpartitionscanbeseparated acrossqueryserversandmirroredevenly.SeeFigure2-8.
38
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Figure2-8.Alargededicatedsearchfarm
Performance Althoughperformanceisusuallynotamajorconsiderationduringinitialsoftwareimplementations,itis acriticalaspecttoconsider.Mostoften,performanceisinthebackoftheadministrator’smind,and assumptionsabouthowfasttheresponseswillbearemadewithoutconsiderationofenvironmental variablesandinfrastructurelimitations.Administratorsareoftensurprisedwhenpagesloadslowly, documentstakeseeminglyforevertodownload,orsearchesarereturnedonlyafterseveralseconds. Searchperformanceisadditionallydependentondifferentfactorsthancontentdisplay,andits requirementstoperformcanoftenbeoverlooked.Thereareuniqueareasthatneedtobeconsideredto makesearchperform,andgivingthemproperconsiderationpriortodeployingSharePointSearch implementationmayhelpavoiduserdissatisfactionatalaterstage. Inmostcases,thetargetforgoodsearchperformanceisthatsearchresultpages,underpeaksearch load,arefinishedrenderinginlessthanonesecond.Searchshouldtakenolongertocompleteandbe actionedthananyregularpage.Also,asuserswillbecomeaccustomedtousingtheresultpagetosome extentasaninformationsourceoraninformationtargetfromwheretheycancheckout,edit,orshare documentsinandofitself,searchshouldbeseenasacorecontentdisplaycomponent.
39
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Therearetwomainareasofperformanceforasearchengine: Querylatency:Querylatencyisthetimeittakesthequeryserverstoreceivea searchrequestfromthewebserver,checktheindexpartitionsforthegiven queryterms,gathertheresultdatafromthesearchdatabasesintoaresultset, andreturnittothewebserver.Additionally,thewebservermustrenderthis resultsetintheresultpageanddisplayitwithanyspecialformatting,custom design,orcustomWebParts.Althoughtherenderinganddisplaymechanismis notstrictlypartofthequeryservers’performance,userswillnotdifferentiate whentheirresultsetisreturnedslowerthanexpected. Thereareanumberoffactorsthatcanattributetohighquerylatency.These includeslowhardware,ormoreoftenhardwarewithinsufficientresources,a slownetworkconnection,largeindexes,andahighvolumeofqueries. Monitoringthesefactorsandpinpointingthebottleneckscanhelpdetermine andremedythesourceofpoorquerytimes. Indexingspeed:Howfastthecrawlservercangatherdocumentsdetermines howfreshthecontentreturnedinsearchqueriesis.Italsowilldetermineif securityvaluesareupdatedintheresultlist.Usersmaymaketheassumption thatsearchisarepresentationofthedocumentsatanypointandexpectthat thelatestversionofdocumentsissearchable.Luckily,SharePoint2010hasan excellentincrementalcrawlmechanismthatwillkeeprefreshingthe documentsonschedulewithoutsearchdowntime.However,poorperformance onsearchindexingcouldmeanthatinitialcrawlstakedaystoweeksto complete.PoorSharePointperformanceingeneralcouldmeanthat incrementalindexingduringbusinesshourscouldbeundesirable.Itisalways desirabletoscalethedeploymenttoallowforbetterperformanceand availabilityasopposedtodisablingorlimitingindexingfrequency.Ofcourse, infrastructureandbudgetlimitationsmustbebalancedwithbusinessneeds.
PerformanceReports MeasuringperformanceinSharePoint2010hasbeenmademucheasierwiththeadditionofSharePoint healthreports.ThereportsareintheAdministrativeReportLibrary,whichcanbefoundintheCentral AdministrationunderManageServiceApplications➤SearchServiceApplication➤Search Administration➤AdministrativeReports.Thereareseveralreportstohelpdiagnoseperformance issues.Thestartingpointforinvestigatingperformanceissuesandthekeyperformancereportsavailable areasfollows: QueryLatency:Querylatencyisthetotaltimeittakesforqueriestobeprocessedandreturnedtothe webservers.TheQueryLatencyreportshowshowlongqueriestaketobereturned.Allqueriesarenot equal,andqueriesformorecommontermswithlargerresultsetswillgenerallytakelongertoprocess, assembleresultsets,andreturn.TheQueryLatencyreportshowsthedifferentareasandhowlongit takesforthequerytobeprocessedineacharea:theserverrendering,attheobjectmodel,andonthe backend(databases).Moreinformationcanbefoundinthereportingsection.SeeFigure2-9.
40
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Figure2-9.QueryLatencyreport QueryLatencyTrend:Latencyisnotastaticconsideration,soseeingtheprogressionofperformance andanyincreaseordeclineinperformanceovertimecanbeuseful.Also,itiswisetoassociatethegiven performancedeclinewithotherfactorsthatmaybeaffectingit,suchasindexsizeorcrawlingbehavior, aswellasotherdemandsonkeycomponents,suchasshareddatabaseservers.TheQueryLatency Trendreportwillshowquerylatencyoveragiventimeperiodanddisplaythelatencyforscaling proportionsofthequeries.So,theadministratorcanseethelatencyofallqueriesinthe95thpercentile ofallqueriesandinthe90th,80th,70th,50th,and5thpercentiles.Thisgivestheadministratorthe abilitytoseehowquicklythequeriesarereturnedandhowthisscales.Thecrawlratecanalsobeseenin comparisonforsimultaneousperiods.Thiswillallowtheadministratortodetermineifsub-second resultsarebeingachievedforthemajorityofqueries.Abestpracticeistokeepthe90thpercentileof searchesbelow1,000milliseconds(1second),andthecrawlershouldreturnbetween200and400items persecond. CrawlRateperContentSource:Thecrawlratescanbeseeninthisreportandwillgiveanindication ofhowfastthecrawleriscollectingcontent.Althoughitwillprobablycollectinformationfastenoughfor mostorganizations,thecrawlercanhaveissueswithparticulardocumentsoratparticulartimes,and thisdatacanbeseenhere.SeeFigure2-10.
41
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Figure2-10.CrawlRateperContentSourcereport CrawlRateperType:SomeareastakemoreresourcestocrawlandtheCrawlRateperTypereport canshowthisinformation.Thisinformationmaybeuniquetoanorganizationwithalotofdocument modificationoraheavycheck-in/check-outrate.SeeFigure2-11.
42
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Figure2-11.CrawlRateperTypereport
ActingonPerformanceIssues Actingonperformanceissuesisasimportantasidentifyingthem.Thereareafewkeyareaswhere performancecanbeimprovedbasedondatafromthehealthreports. Highquerylatency 1.
Separatequeryserverrole,webserverrole,andcrawlserverroledependingon wherethebottleneckisorifanotherserviceistakinguptoomanyresources.
2.
ScaleupbyaddingindexpartitionsandifnecessaryRAMtohandlethe33%of theindexpartitionsbeingstoredinmemory.
3.
Addqueryservers,andplaceadditionalindexpartitionsonthenewquery serverstobalancethequeryload.
43
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Querylatencygrowingovertime 1.
Addindexpartitionstospreadloadandchecktheperformancetrend.
2.
Separaterolesontoseparateservers.
3.
Addserverstohandlequeryloadasdemandgrows.
Scaling ScalingistheprocessofaddingresourcestoITsystemstoimproveperformanceorhandleadditional load.Scalingisanimportanttopicformitigatingpoorperformanceandeventualend-user dissatisfaction.Scalingcanpreventdowntimeandallowforreactivemanagementofresourcesaswellas controlbudgetoverrunsbyallowingforprogressiveadditionofinfrastructureasdemandandcorpus sizegrow. AswesawinChapter1,therearetwobasicmethodsforscalingsearch: •
Scalingup:Addingmoreresourcestoaphysicalmachinethatisunderheavyload
•
Scalingout:Addingadditionalmachinesorsegmentingtaskstobetterutilize existingresources
SharePoint2010isespeciallygoodatmanagingexistingresourcesandscalingouttohandle demandandalleviatebottlenecks.
WhyandWhentoScale Themostcriticalpointtoconsiderscalingiswhenusersbegintocomplainaboutmissingcontentand slowresponsetimesfromsearch.Missingcontentcanindicateaproblemwithcrawlingthatmaybethe resultofalackofresources(eitherinthecrawlerorinthetargetsystem).Slowresponsetimesusually indicatetooheavyofaloadonthequeryservers. Basicscalingcanbeassimpleasaddingserverstoeffectivelymovefromonelevelofdeploymentas contentgrows(aswasoutlinedintheprevioussection)oramorereactiveapproachofaddressing specificperformanceorcapacityissuesastheyarise.Inordertoimplementthelattertechnique,one shouldbeawareofthetriggersforidentifyinganissueandthestepstoaddressit. Thefollowingaresometypicalscalingtriggerscenariosandtheirresolutions:
44
•
Scenario1—Missingorstalecontent:Contentismissingfromtherepository,and thecrawlerrateislessthan15documentspersecondfromtheCrawlRateper ContentSourcehealthreport.ThishealthreportcanbefoundinCentral Administration➤AdministrativeReportLibrary➤SearchAdministrationReports ➤CrawlRateperContentSource.
•
Scenario2—Slowsearchresponses:Userscomplainofslowresponsetimeson search.EitherSharePoint2010isperformingwellonbasicpageloadsandsearch isnotreturningfastenough,ortheentiresearchandresultpagesloadslowly.First checkthattherearen’tanypoorlyperformingcustomdesignelementsorWeb Partsthatmaybeexperiencingproblemsonthesearchresultpage.Checkthe Searchhealthreportstoidentifyslowqueryresponsetimesandlatency,and considerscalingoutthequeryserversbyeitherpartitioningtheindexand/or addingqueryserverstoholdindexpartitions.
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
•
Scenario3—Nodiskspaceondatabaseserver:ThegoodSharePointadminalways keepshisorhereyeontheCentralAdministrationandneverignoreswarning messagesfromSharePoint2010.SharePoint2010isespeciallygoodatnotifying theadministratorofanyissues.Thisincludesdatabasesizeissues.Shouldthe databaseserverrunoutofspace,SharePoint2010willalerttheadministrator.This scenariomostoftenhappensduringcrawlingwhenthedatabaseserverhasbeen settoautomaticallygrow.Thenaturalfixfordatabasediskspaceissuesistoadd diskstothearrayorincreasethesizeofdisksonaserverifthesolutionisnotusing RAIDorsomeotherredundantstoragesolution.
DiskRecommendations Searchisaninput/output–intenseprocess.Basically,asearchengineindexesallthecontentfroma particularsource(e.g.,SharePointsite,website,database,fileshare,etc.)andbuildsdatabaseswiththe wordsindexed,thelinkstothedocuments,metadatafoundonthedocuments,metadataassociated withthedocuments,time,size,type,etc.Thecrawlingprocesswritesallthisinformationtodatabases. SharePointstoressomeofthesedatabasesinSQLandsomeonthefilestructureinindexpartitions.The querycomponentsthenaccessthesedatabases,lookforthetermsthatweresearchedfor(thesemaybe freetextorproperty-based),andmatchthetermswiththedocumentsandtheirproperties.Todothis requiresalotofwritingandreadingtoharddrives.Thereforehavinghardwarethatperformswellisan importantaspectofimprovingsearchperformance. Generallyspeaking,tosupportsearchwell,databaseswillneedtobeinsomekindofdiskarray.For write-intensivedatabases,suchasacrawldatabase,RAID10isrecommended.Foraddedperformance, thetempdatabaseshouldbeseparatedtoaRAID10array.(Seemoreinthefollowingsections,and consultexternalresourcesformoreinformationonRAID.)Inaddition,thereshouldbearedundant arraytoavoiddowntime.Moreredundantarrayswillslowperformancebutimproveredundancy,so findingtherightbalancefortherequirementsiskey. RAIDstandsforredundantarrayofindependentdisksandisthetechnologyofcombiningseveral disksintoanarray,whereifonefails,theotherwilltaketheloadandprovideamirrorofalldata.More complicatedRAIDconfigurationshavemoreredundancy.Theyalsoimproveperformance. Searchqueriesrequirealotofthroughput,sohavingwell-performingdatabasescanhelp.Onthe databaseservers,itisrecommendedthattheinput/outputpersecond(IOPS)capabilitiesbe3,500to 7,000IOPSandatleast2,000onthepropertydatabase.Therefore,atminimum,diskspeedsof7,200 RPMorbetterarerequiredinaRAIDconfiguration.Highlyperformantsearchimplementationsalso makeuseofstorageareanetworksandsometimessolidstatedrives(whichmaysupportupto1,000,000 IOPSinastoragearrayvs.90IOPSforasingle7,200RPMSATAdrive).
■TipSeemoreinformationfromMicrosoftonsearchdatabaserequirementsandinformationaboutRAID architectureforSQLathttp://technet.microsoft.com/en-us/library/cc298801.aspx.
Availability AvailabilityinITsystemsisthemeasureofhowoftenserversandtheirservicesareavailableforusersto access.Ofcourse,allorganizationswouldliketohave100%availability.Thislevelofavailabilityiseither notpossible,notpractical,ortooexpensiveformostorganizations.Therefore,mostorganizations
45
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
endeavortoachievethehighestavailabilitypossibleforareasonablecost.Generally,availabilityis measuredbyanumberofnines.Thisisareferencetotheclosenessto100%availabilityachievableby incrementsofadditionalninesfrom90%to99.999…%.Acommonexpressionis“5ninesofuptime”or 99.999%.Thisrepresents5minutesand35secondsofallowabledowntimeperyear. ThemainmethodtoachievehighavailabilityinITsystemsisbymakingthemredundant—thatis, addingcopies(ormirrors)ofthesystemsthatwilltakeoverthetasksshouldhardwareorsoftwarefail (whichitinevitablydoes).RedundancyinSharePointdeploymentscaninsureuninterruptedservicefor endusers.RedundancyinaSharePointdeploymentcanbedeployedasasolutionforfailoverscenarios (aserverdies)butcanalsobedeployedtoeasemaintenancetasksandallowforperformanceandserver managementwithoutadverselyaffectingtheuptimeofthesolution. SharePoint2010handlesredundancyinanumberofwaysbyallowingformirroredservicesover multiplemachines.ThefarmarchitectureofSharePointalsoallowsforoneservertocompensatefor anotherifoneoftheserversinthefarmfailsoristakendownformaintenance. EachcomponentinSharePoint2010Searchrepresentsapossiblefailurepoint.Therefore,the componentsaremadecapableofbeingmirrored.Themostcommonareastomirrorareasfollows: •
Webservers:Althoughnotstrictlypartofthesearchengine,webserversdeliverthe contentthatSharePoint2010Searchisindexing.Iftheseserversfailandthereis noredundancy,thentheindexwillnotrefresh.However,ifthewebserversfail, therewillbenosite,souserswillprobablynotbeprimarilyconcernedwiththe lackofsearch.
•
Queryservers:Multiplequeryserverscanimproveperformancebutalsoprovide forredundancybyprovidinganalternativesourceforthequeriestobeprocessed. Mirroringindexpartitionsacrossqueryserversinsuresthatallportionsofthe indexareavailableifoneservershouldfail.
•
Crawlservers:Ifconstantindexfreshnessisacriticalbusinessneed,mirroring crawlserverscanhelpthedatabaseandindexesstayuptodateshouldonefail.
•
Databaseservers:Oneofthemostcriticalareastoprovideredundancyinisthe databaseservers.Databaseserversprovidethedataforthequerycomponentsand therepositoryfortheindexingcomponentstowriteto.Databasefailurewillcause searchtofailcompletely,soitisessentialtohavedatabasesconstantlyavailable.
WhyandWhentoConsiderMakingServicesRedundant Anyservicethatisconsideredcriticalshouldhaveafailovercomponent.Beingabletosearchand receiveresultsisacriticalfeatureofSharePoint.Therefore,theservicesthatallowuserstoquerythe indexandreceiveresultsshouldhaveredundancy.Thisincludesqueryserversandanyindexpartitions onthosequeryservers. Allserverswiththequeryroleshouldhavesomelevelofredundancy.Ideally,allindexpartitions shouldhavearedundantinstance.So,ifthereisoneserverwiththequeryroleandtwoindexpartitions onthatserver,aredundantqueryserverwithasecondinstanceofbothindexpartitionswillbe necessary. ThisisconsideredminimumredundancyforSharePointSearchasitinsuresthatgivenahardware failureforaqueryserver,searchwillnotfailwithanerrorforusers. Additionally,databaseserversshouldhavearedundancyelementastheyholdthecrawland propertydatabasesessentialtosearchingaswellastheAdministrationdatabase,withoutwhichsearch cannotbeperformed.Mostorganizationsalreadyhaveredundantdatabaseimplementations,suchas
46
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
databaseclusters.Eitherthesearchdatabasesshouldbeinstalledintheseexistingdatabaseclusters,ora similarmodelshouldbeemployedtoinsureredundancy. Iffreshnessofcontentisconsideredcritical,makingcrawlserversredundantisrequired.If freshnessofcontentisnotacriticalfactor,havingalessstrictredundancymodelforindexingcanbe acceptable.However,shouldafailurehappen,thecrawlcomponentsmustbere-provisionedonnewor existingservers.
ServerDowntimeImpactChart Althoughnoonelikesdowntime,avoidinganydowntimewithfullredundancymaybeeithertoocostly, toocumbersome,ortoomaintenance-intensiveforsomeorganizations.Therefore,itisvaluableto understandtheimpactofdowntimefortheindividualcomponentsofSharePoint2010Searchand determinewhichmaybeacceptabletotheorganization.SeeTable2-1.
■NoteAdedicatedsearchfarmneednothavethewebserverroleifthisroleisprovidedbyacontentfarm, whichconnectstothesearchfarm.
Table2-1.ServerDowntimeImpactChart
Server Role
Severity
Impact of Downtime
Webserver role
Critical
Userscannotseethesearchpage(andpossiblynotSharePointcontentifthe webserverroleisshared).
Queryserver role
High
Userswillnotbeabletosearchforcontent.Thesearchpagemaystillwork butreturnanerror.
Crawlserver role
Medium Thesearchwillstillworkandresultswillbereturned,butthecontentwillnot beuptodateandindexesnotrefreshed.
Database serverrole
Critical
Userswillnotbeabletosearchforcontent.Thesearchpagemaystillwork butwillreturnanerror(SharePointcontentmayalsonotbereturnedifthe databaseserverroleisshared).
LimitationsandHard-CodedBoundaries Allsoftwarehaslimitationsandhard-codedchecksandmeasurestoavoidunforeseeableoruntested behavior.SharePointisnoexceptiontothisandhasseveralhard-codedlimitationsaswellassuggested boundariesforsearchinSharePoint2010.Theselimitationsaregenerallysettoavoidpooror unsupportablebehavior.Luckily,MicrosofthasbeensokindastotestSharePointextensivelyandreveal someoftheboundariesthatexistfortheproduct.Microsoftgivesthreetypesoflimits:
47
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
•
Boundaries:Hard-codedlimitsthatarenotpossibletoexceed—thisshouldbe interpretedasthesoftwarewillceasetocontinueifthislimitisreached.Itdoes notmeanitwillceasetofunctionbutmaystopcontinuingtogroworperformif thislimitisreached.
•
Thresholds:Thisisaconfigurableitemthatcouldpossiblybeexceededif necessary,butitisnotgenerallyrecommendedtodoso.
•
Supportedlimits:Togowherenoonehasgonebefore!Generally,thismeansthat ifoneexceedsthislimitandSharePointbreaks,oneshouldnotexpectMicrosoft tofixit(withoutafee).Microsofthastestedthesoftwaretothislimitandcan supportittoworkatthislevel.Thesearedefaultsset.
Tables2-2through2-6showtheknownlimitationsandboundaries. Table2-2.DatabaseLimitations
Topic
Limit
Support
Crawl databases
10perSSA
Threshold EachSSAcanhavetenseparatecrawldatabasesto recordcrawldata.Itisunlikelythatmorewouldbe necessary,butitispossible.
Crawl database items
25million items/database
Threshold Crawldatabasesholdinformationaboutthecrawl,not thecrawledcontent,sohavingtoomanyitemswill makeseekandrecordtimeslowforthisinformation.
Property databases
10perSSA
Threshold Propertydatabasesareboundtoindexpartitionsand thereforehavethesamelimitations.
Property databases
128maximum perfarm
Threshold Themaximumnumberofpropertydatabasesmatches themaximumforindexpartitions.
Index partitions
10perSSA
Threshold Choppinguptheindexpartitionintosmallerchunks mayseemlikeaninfinitelygoodidea,buttoomany chunkswillmaketheSSAworktoohardlooking throughtheindividualpartitionsandnotintoeachone. KeepthislimitatamaximumoftenperSSA.
Index partitions
128maximum perfarm
Boundary
48
Notes
Eachsearchfarmcanholdonly128indexpartitions. ThisisthemaximumtheSSAscanquery.
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Table2-3.TopologyLimitations
Topic
Limit
Support
Notes
Searchservice applications(SSA)
20Supported limit
Itisrecommendedtohaveamaximumof20SSAsper farm.Moreispossiblebutwillpossiblyhamper performance.
Crawl components
16per SSA
Threshold
Twocrawlcomponentspercrawldatabaseandtwoper serverarerecommended.SoasingleSSAwouldrequire eightserverswiththislimitation.
Query components
128per SSA
Threshold
Crawlcomponentsmustcopyfilestotheindex partitionsonthequeryservers.Thesemaximums matchtheothermaximumsoftheindexpartitions.
Query components
64per server
Threshold
Thisthresholdisbasedontheserver’scapacityto receivedatafromthecrawler.
Table2-4.CrawlerLimitations
Topic
Limit
Support
Notes
Indexed items
10million perindex partition
Supported limit
Microsoftrecommendslimitingthenumberofitemsina singlepartitionto10million.Inmostcases,thisshould probablybemuchlessforperformancereasons.
Indexed items
100million perSSA
Supported limit
AlthoughSharePointcanprobablyindexmorethan100 milliondocumentsandsuccessfullysearchthem,Microsoft hassetthesupportedlimitat100million.Formore,they recommendyoubuyFASTforSharePoint.
Concurrent crawls
20perSSA
Threshold
Severalcrawlerscanrunsimultaneously,buteachtakes resources,andhavingtoomanywillreducetheoverall performanceofeach.Fewercrawlerswilloftenindexfaster thantoomany.Wealwayswanttoavoidmaxingoutour servercapacityasWindowswillcompensatebyusingless performantmemory(pagefile),tothedetrimentofthe wholesystem.
49
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Table2-5.AdministrationLimitations
50
Topic
Limit
Support
Notes
Crawllog entries
100million perSSA
Supported Eachindexeditemwillhavealogentry,sothislimitisin limit accordancewiththeindexeditemslimit.
Scoperules
100perscope
Threshold
Eachscoperulemustbemappedinthedatabaseanddata allocatedtoit.Havingmanyruleswillinhibittheindex’s abilitytomaintainfreshness.
Scoperules
600perSSA
Threshold
Thislimitisalsotomaintainfreshnessinthecrawleddata.
Scopes
200persite
Threshold
Scopestaketimeandefforttoassembleintheresultlist. Toomanyscoperuleswillinhibitperformance.
Display groups
25persite
Threshold
ThisisalimitforareasonablelistlimitintheSearch Administrationuserinterface.
URL removals
100removals peroperation
Supported URLssupportedforeachremovaloperation limit
Authoritative Onetoplevel; fewsecond pages andthirdlevel perSSA
Threshold
Authoritativepagesadjustrankingvalues.Addingtoo manycanmaketherankingverycomplicatedand probablywon’tmeetexpectations.Theboundaryfor authoritativepagesis200perSSA.Aniterativeapproachis recommended.Tryaddingsomeandcheckingthe outcomeoneachadjustment.
Keywords
200persite collection
Supported Keywordsmanagesynonymsandbestbets.Ifyouuse5 limit bestbetsperkeyword,theboundaryis5,000,whichis imposedbyASP.NET.Thisboundarycanbeincreasedby editingtheweb.config andclient.configfiles.
Alerts
1,000,000per SSA
Supported ThisistheouterlimitofalertsthatMicrosofthastested. limit Moreiscertainlyfeasible.
Content sources
50perSSA
Threshold
Morestartingpointscancausemoretroublesforthe crawlerandamoredifficultdiagnosticexperience. Although500istheactualboundary,keepingthestarting pointsforthecrawlerlowwillaidincrawlingandavoid problems.
Start addresses
100per content source
Threshold
Again,havingmorestartingpointswillbogdownthe crawler.MicrosoftrecommendsusinganHTMLlinklist (webpageoflinks)andsettingitasastartingpointinstead ofaddingmanystartingpoints.Theboundaryisagain500.
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Topic
Limit
Support
Notes
Crawlimpact rules
100
Threshold
Crawlimpactrulesincreaseordecreasethenumberof threadsthatthecrawlerusestocrawlaspecificsite.You canincreasethenumberofrulesover100,butyoushould becarefultoconsidertheactualimpactoftherules.The thresholdisbasedonhowmanyrulescanbedisplayedon thepagewithoutitbecomingunresponsive.Thetested limitis2,000.
Crawlrules
100perSSA
Threshold
SharePoint2010canacceptmanymorecrawlrulesbutwill havetroubledisplayingalltherulesiftoomanymoreare added.Ifyoucan’tseetherules,workingwiththemor modifyingthemcouldbedifficult.
Table2-6.PropertyLimitations
Topic
Limit
Support
Notes
Managed properties
100,000per SSA
Threshold
Metadatacrawledfromdocuments,lists,webpages,orany othersourcecanbemappedtomanagedproperties.They mustbemappedtoamanagedpropertytomakethem searchable.Thesuggestedlimitforthesemappingsis 100,000.
Metadata properties
10,000per item
Boundary
Absolutemaximumnumberofcrawlablepropertiesper document
Managed property mappings
100per managed property
Threshold
Manycrawledpropertiescanbemappedtoasingle managedproperty.Thishelpscombinesimilarmetadata intoasinglesearchableproperty.Toomanymappingscan causeaslowercrawlandslowerqueriesasthemappings mustbemadeatthecrawlandeachsearchmustcallthe diversevaluesfromtheproperties.
Crawled properties
500,000per SSA
Supported limit
SharePoint’scrawlercanpickupmanydifferentpiecesof metadata,andbeingabletocrawlpropertiesfrom metadataisanespeciallypowerfulfeature.These propertiescanbelaterusedforsearchandfiltering. Microsoftsetsasupportedlimitof500,000forthese properties,butinmanycases,manymorecouldbe expected.
51
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
■NoteFormoreinformationontheselimitsandacompletelistofsoftwarelimitsforSharePoint2010,see http://technet.microsoft.com/en-us/library/cc262787.aspx.
PowerShell ThosealreadyfamiliarwithSharePoint2010willcertainlybefamiliarwithWindowsPowerShell. PowerShellisacommandlineshellbuiltonthe.NETFrameworkthatallowscommands(calledcmdlets) tobemadedirectlytotheobjectmodelofSharePoint2010.Althoughusingthegraphicaluserinterface (GUI)ofSharePointisarguablyeasierandmoreuser-friendly,repeatedtasksandautomationcanbe achievedusingPowerShellscripts. PowerShellhasalargenumberofavailablecmdletsincludedwithSharePoint2010thatcan provisionthesearchservice,adjusttopology,createindexpartitions,managecrawlrules(seeChapter 3),andevenchangerelevancymodels(seeChapter9).AdministratorswhoneedPowerShellwillneedto understanditonalargerscaleforunattendedinstallationsandprovisioningofSharePoint. Wewillnotgointoorlistalltheavailablecommandsordescribehowtheyarecalled.Insteadwewill outlineafewusefulcmdletsandprovidereferencestomoreinformationonthevastworldof PowerShell. ThecmdletsmostusefulfordeployingsearchinSharePointandcoveredinthischapterare asfollows:
52
•
Get-SPEnterpriseSearchServiceInstance
•
Start-SPEnterpriseSearchServiceInstance
•
New-SPServiceApplicationPool
•
New-SPEnterpriseSearchServiceApplication
•
Get-SPEnterpriseSearchServiceApplication
•
New-SPEnterpriseSearchServiceApplicationProxy
•
Set-SPenterpriseSearchAdministrationComponent
•
New-SPEnterpriseSearchCrawlTopology
•
New-SPEnterpriseSearchCrawlDatabase
•
New-SPEnterpriseSearchCrawlComponent
•
Set-SPEnterpriseSearchCrawlTopology
•
New-SPEnterpriseSearchQueryTopology
•
Get-SPEnterpriseSearchIndexPartition
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
•
New-SPEnterpriseSearchQueryComponent
•
New-SPEnterpriseSearchPropertyDatabase
•
Set-SPEnterpriseSearchIndexPartition
•
Set-SPEnterpriseSearchQueryTopology
ProvisioningSearchwithPowerShell Provisioninganyserviceapplicationcanbeacomplicatedtask.Thereareseveralprerequisitesthatneed tobemetbeforeanyserviceapplicationcanbeprovisionedinaSharePointfarmandalsoanumberof additionalparametersthatneedtobeidentifiedinordertoallowthecmdletstosuccessfullyand appropriatelyrun.Ifthevariablesarenotsetproperly,thecmdletscouldfail.Luckily,PowerShellwill promptwithanymissingrequiredparametersandsteppingthroughthematthecommandpromptin PowerShellcanhelptheadministratorbuildascriptwiththevariablestodeploythesearch.Beaware thatPowerShellrequiresamanagedaccounttoruntheSharePointcmdlets.ThiscanbesetwithSetSPManagedAccount.Forthepurposeoftheseexamples,wewillusetheAdministratoraccount. Thefollowingisastep-by-stepguideshowinghowtoprovisionsearchusingPowerShellandan examplescriptbasedonthesesteps.UsethefollowingstepstoprovisiontheSearchserviceapplication: 1.
StarttheSearchservice(SharePointServerSearch14).TheSearchservicewillalreadybe installedonthemachine,soitisjustamatterofstartingtheservice.Itwillneedtobe runningtoperformtheprovisioning,soit’sthefirstplacetostart.Inordertostartit, however,itisnecessarytoknowwhatitiscalled.
2.
Getthelocalinstancename: Get-SPEnterpriseSearchServiceInstance -local
3.
Theidentity,inthiscase,willbetheGloballyUniqueIdentifier(GUID)inthe IDfield,sothiscanbecopied,andStart-SPEnterpriseSearchServiceInstance -Identity(GUIDhere)canbecalledorplacedinavariableforlateruse: $SearchServiceInstance = get-spenterprisesearchserviceinstance –local
4.
Next,starttheservice: Start-SPEnterpriseSearchServiceInstance -Identity $SearchServiceInstance
■NoteForthisexample,parametersarefilled,wherepossible,withtheiractualvaluesforclarity’ssake. However,itisbesttosetvariablesforthesevaluesinthescriptandcallthemlater.Thiswillallowthevaluestobe re-usedandalsoprovidethecontentofsomeoftheparameterstobecalledwherenecessary.
53
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
5.
Createanapplicationpool.Tocreateanapplicationpool,giveitanameand anaccount.Inthiscase,wewilluseadministrator,butanorganizationwill likelywanttouseadifferentaccountdependingonhowsearchisdeployed. TheuserwillneedtheSharePoint_Shell_Accessroleontheconfiguration databaseandwillneedtobeamemberoftheAdministratorsand WSS_ADMIN_WPGlocalgroupsontheserverwhereSharePointisinstalled. New-SPServiceApplicationPool -name Search_Service_App_Pool -account Administrator
6.
CreatetheSearchserviceapplication.Todothis,createanew SPEnterpriseSearchServiceApplication,giveitaname,callourpreviously createdapplicationpool,andassignadatabasenamefortheadmindatabase. New-SPEnterpriseSearchServiceApplication -Name "Pro Search Service Application" -applicationpool Search_Service_App_Pool -databasename Search_Service_Admin_Database
7.
Createaserviceapplicationproxy.Aproxyisrequiredtointeractwiththe serviceandexposesearchtothefront-endsearchWebParts.Tocreateaproxy, usetheNew-SPEnterpriseSearchServiceApplicationProxy cmdlet.Itwill requireanameandtheabsoluteURIoftheSearchserviceapplicationthatwas created.TogettheabsoluteURI,makeavariable,placetheSearchservice application,andthencalltheURIasfollows: $SearchServiceApplication = Get-SPEnterpriseSearchServiceApplication New-SPEnterpriseSearchServiceApplicationProxy –nam Search_Service_App_Proxy -Uri $SearchServiceApplication.Uri.AbsoluteURI
8.
54
SettheAdministrationcomponentsoCentralAdministrationcan interactwiththeSearchservice.ThiswillrequireknowingtheGUIDs asthesewillbetakenasparameters.TheIDscanbeseenbyusingthe Get-SPEnterpriseSearchServiceInstanceand GetSPEnterpriseSearchServiceApplicationcmdlets(seeFigure2-12).
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Figure2-12.SettingtheSearchAdministrationcomponentusingtheIDsoftheSearchservice instanceandSearchserviceapplication 9.
Obviously,itwillbemorepracticaltousethevariableswehavealreadysetand setnewvariablestoeasilypasstherequiredvalues. Set-SPenterpriseSearchAdministrationComponent -SearchApplication $SearchServiceApplication -searchserviceinstance $SearchServiceInstance
10. Inordertocrawl,acrawlcomponentisrequired.Butbeforeacrawl componentcanbeprovisioned,thereneedstobeacrawltopologyinwhichto placeit.Sothenextstepistocreateacrawltopology. $CrawlTopology = $searchserviceApplication | New-SPEnterpriseSearchCrawlTopology 11. Now,acrawlcomponentcanbecreated.Butfirst,anewcrawldatabase shouldbecreated. $CrawlDatabase = $searchserviceApplication | New-SPEnterpriseSearchCrawlDatabase -DatabaseName CrawlDatabase New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology -CrawlDatabase $CrawlDatabase -SearchServiceInstance $SearchServiceInstance
55
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
12. Next,setthenewcrawltopologyasactive.Severalcrawltopologiescanexist onasingleserver,butonlyonecanbeactive.Beforeonecanremoveacrawl topology,analternativemustbecreatedandsetasactive.Thencontent sourceswillbecrawlable. $CrawlTopology | Set-SPEnterpriseSearchCrawlTopology –Active
■NoteUseRemove-SPEnterpriseSearchCrawlTopologytoremoveanyoldcrawltopologies.
13. Createanewquerytopology,indexpartitions,andquerycomponenttoquery theSearchserviceapplication.Thenumberofpartitionsontheservercanbe setusingthe–partitions parameter.
$QueryTopology = $searchServiceApplication | New-SPEnterpriseSearchQueryTopology -Partitions 1
14. Itgetsabitcomplicatednow,sothepartitionIDwillneedtobeplacedintoa variableandthenpassedwiththeotherinformationtocreatethenewquery component. $Partition = Get-SPEnterpriseSearchIndexPartition -querytopology $QueryTopology New-SPEnterpriseSearchQueryComponent -indexpartition $Partition –QueryTopology $QueryTopology -SearchServiceInstance $SearchServiceInstance
■NoteItisrecommendedtocreatefailoverpartitionsofallindexpartitions.Ifmultiplepartitionsarecreated, eachpartitionwillrequireitsownquerycomponents.Tosetapartitionasfailover,addtheparameter –failoverOnly.
15. Finally,thequerycomponentwillneedapropertydatabase.Fororder’ssake, createanewdatabaseandassignthenewpartitionstoit.Andthenactivatethe querytopology. $PropertyDatabase = New-SPEnterpriseSearchPropertyDatabase –searchapplication $SearchApplication -databasename Search_Property_Database $Partition | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase $QueryTopology | Set-SPEnterpriseSearchQueryTopology –Active
■NoteSearchtopologiescanalsobeimportedandexportedforre-usewiththe$searchserviceapplication | Export-SPEnterpriseSearchTopology -Filename c:\Search\Topology.xml.
56
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Listing2-1providesthecompletesamplescript. Listing2-1.SampleScriptProvisionSSA.ps1 #Set Database and Service Names here - set them as desired $SearchServiceAppPool = "Search_Service_Application_Pool" $SearchApplicationName = "Pro SharePoint Search Service Application" $SearchAdminDatabase = "Search_Service_Admin_Database" $CrawlDatabase = "Crawl_Database" $SearchPropertyDatabase = "Search_Property_Database" #Set the search service instance name in a variable and start the service. $SearchServiceInstance = Get-SPEnterpriseSearchServiceInstance -local Start-SPEnterpriseSearchServiceInstance -Identity $SearchServiceInstance #Set a user for the service and create a new application pool for search $Search_Service_Account = "Administrator" $ApplicationPool = new-SPServiceApplicationPool -name $SearchServiceAppPool –account $Search_Service_Account #Create the search service application New-SPEnterpriseSearchServiceApplication -Name $SearchApplicationName –applicationpool $ApplicationPool -databasename $SearchAdminDatabase #Create the Search Service Application Proxy $SearchServiceApplication = Get-SPEnterpriseSearchServiceApplication New-SPEnterpriseSearchServiceApplicationProxy -name Search_Service_App_Proxy –Uri $SearchServiceApplication.Uri.AbsoluteURI #Set the Search Service Administration Component Set-SPenterpriseSearchAdministrationComponent –SearchApplication $SearchServiceApplication -searchserviceinstance $SearchServiceInstance #Create a Crawl topology $CrawlTopology = $searchserviceApplication | New-SPEnterpriseSearchCrawlTopology #Create a new crawl database and crawl component and then Set the new Crawl Topology Active $CrawlDatabase = $searchserviceApplication | New-SPEnterpriseSearchCrawlDatabase –DatabaseName $CrawlDatabase New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology –CrawlDatabase $CrawlDatabase -SearchServiceInstance $SearchServiceInstance $CrawlTopology | Set-SPEnterpriseSearchCrawlTopology -Active
57
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
#Create a new query topology $QueryTopology = $searchServiceApplication | New-SPEnterpriseSearchQueryTopology -Partitions 1 $Partition = Get-SPEnterpriseSearchIndexPartition -querytopology $QueryTopology New-SPEnterpriseSearchQueryComponent -indexpartition $Partition –QueryTopology $QueryTopology -searchserviceinstance $SearchServiceInstance #Create a database for properties and assign it to the query partition $PropertyDatabase = New-SPEnterpriseSearchPropertyDatabase -searchapplication $SearchServiceApplication -databasename $SearchPropertyDatabase $Partition | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase #Activate the Query Topology $QueryTopology | Set-SPEnterpriseSearchQueryTopology -Active
PowerShellforScaling PowerShellcanalsobeeffectivelyusedtoscaleoutthesearchcomponentsofSharePoint2010.Topology changesarenotallowedonastand-aloneinstallation,somakesuretheinstallationisappropriate. PowerShellscalingcapabilitiesforSharePointSearchincludethefollowing: •
Addingquerycomponents:Querycomponentscanbeaddedonlytoaninactive querytopology.Therefore,anewquerytopologymustbecreatedwiththedesired structurebeforeaddingquerycomponents.Allquerycomponentsshouldbe addedbeforethequerytopologyisactivated. New-SPEnterpriseSearchQueryComponent
•
Addingindexpartitions:Thenumberofindexpartitionsmustbedefinedwhen creatingthequerytopology.Aftercreatingthequerytopologywiththedesired numberofindexpartitions,querycomponentsshouldbesettotheappropriate partition. New-SPEnterpriseSearchQueryTopology -Partitions 2
•
Addingpropertydatabases:PropertydatabasescanbeaddedtothespecificSearch serviceapplicationtosupportlargeamountsofmetadata.Itonlyrequiresthe Searchserviceapplicationasaparameter. New-SPEnterpriseSearchPropertyDatabase
•
Addingcrawlercomponents:Acrawltopologycancontainmultiplecrawl componentsthatwillaidincrawlperformance. New-SPEnterpriseSearchCrawlComponent
58
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
Summary Inthischapter,welookedatfactorstoconsiderwhendeployingsearchinfrastructure.Wealsolookedat thekeycomponentsforthesearchmodelinSharePoint2010andhowtheyworktogethertoscaleand loadbalance.Planninganinitialdeploymentwascovered,andsuggestionsanddiagramsforthat planningweregiven.Therearenoclearrulestomatcheverypossibleconfiguration,buttheguidelines givenshouldhelpadministratorsfindarchitecturetogetthemstarted. Thechapteralsoaddressedperformanceandavailabilitytopicsandgavesuggestionsandbest practicesforwhattodoiftheseareasbecomeanissue.Somelimitationswereaddressedandoutlinedto helpavoidunrealisticexpectationsforSharePoint2010Search.Andfinally,WindowsPowerShellfor searchwasintroducedandabriefoverviewoftheavailablecommandswasgiven.Astep-by-stepguide toasimpleprovisioningSharePointsearchandasamplescriptweregiven.
FurtherReading Herearesomesuggestionsforfurtherreadingormoredetailsonthetopicscoveredinthischapter.
SharePointComponents Microsoft’sRussMaxwellhassomegoodblogpostsonarchitectureandscalehere:http://blogs.msdn. com/b/russmax/archive/2010/04/16/search-2010-architecture-and-scale-part-1-crawl.aspxand http://blogs.msdn.com/b/russmax/archive/2010/04/23/search-2010-architecture-and-scale-part-2query.aspx.
EnvironmentPlanningandMetrics Microsoft’sguideonhardwareandsoftwarerequirementscanbefoundhere:http://technet. microsoft.com/en-us/library/cc262485.aspx. Microsoft’sguideonperformanceandcapacityplanningcanbefoundhere:http://download. microsoft.com/download/7/F/0/7F069D0B-B6BD-4692-868B-E8555BB72445/ SearchforSPServer2010CapacityPlanningDoc.docx. Aguideonsearchusagereportscanbefoundhere:http://technet.microsoft.com/ en-us/library/ee808861.aspx.
Performance InformationonstoragecapacityplanningandRAIDcanbefoundhere:http://technet.microsoft. com/en-us/library/cc298801.aspx#Section33.
PowerShell AgeneraldescriptionofWindowsPowerShellforSharePointcanbefoundhere:http://technet. microsoft.com/en-us/library/ff628968.aspx.
59
CHAPTER2■PLANNINGYOURSEARCHDEPLOYMENT
AshortandusefullistofWindowsPowerShellcmdletsforsearchcanbefoundhere: http://social.technet.microsoft.com/wiki/contents/articles/sharepoint-server-2010-searchwindows-powershell-cmdlets.aspx. AcompletelistofavailablecmdletsislistedonTechNethere:http://technet.microsoft.com/ en-us/library/ee906563.aspx. Searchtopologycmdletsaredescribedhere:http://technet.microsoft.com/ en-us/library/ff696763.aspx.
60
CHAPTER 3
■■■
Setting Up the Crawler Aftercompletingthischapter,youwillbeableto •
SetupthecrawlertoindexSharePointcontent
•
Addandremovecontentsources
•
Importandindexuserprofiles
•
CrawlfilesharesandExchangepublicfolders
•
Troubleshootcrawlererrors
•
InstalliFilterstocrawladditionaldocumenttypes
•
Setupfederatedsources
AftertheSharePoint2010environmenthasbeensuccessfullyplannedandinstalled,thenextsteps aretosetupthecrawler,definethecontentsources,andapplyanyspecialrulesorfilterstoensureall appropriatecontentisindexed. Thischapterwilldiveintotheindexingprocessandhowtodefineandsetupeachcontentsource.It willgivestep-by-stepinstructiononaddingorremovingcontentsourcestobecrawledaswellas settingsspecifictothosesources.ItwillcoverhowtoimportuserprofilesfromActiveDirectoryand LDAPserversandindexthoseprofilesintothesearchdatabase. Crawlingandcrawlruleswillbeaddressed,andsomeguidanceoncommonproblemsandhowto troubleshootthemwillbeaddressed.Wewillalsoseehowcrawlrulescanbeappliedtomodifythe credentialsusedtoconnecttocontentsources. ThechapterwillalsocovertheuseofiFilterstoindexfiletypesnotsupportedoutoftheboxby SharePoint2010.Third-partyiFilters,indetail,willbecoveredlaterinthebook,sowewillcoveronlythe installationandsetupinthischapterandgiveacoupleofquickexamplesofthemostcommonfiletypes, PDFandRTF. Finally,addingfederatedsourceswillbecovered.Displayingresultsfromthesesourceswillbe coveredlaterinthebook,butthischapterintroducestheconceptofaddingeitheranewfederated sourceorimportingafederatedlocationfromMicrosoft’sFederatedSearchConnectorGallery.
61
CHAPTER3■SETTINGUPTHECRAWLER
TheSearchServiceApplication SharePoint2010isdesignedtoachievemanybusinesstasks,andalogicalstructureisimportantto controlandorganizeallthosefunctions.Forthisreason,SharePointisbrokenintoseparateservices. ManyoftheessentialservicesdeliveredbySharePointarebrokenintowhatMicrosofthascalledservice applications,whichcancontrol,independently,thedifferenttasksthatSharePointperforms.Theycan alsobeindividuallyconfiguredforperformanceandscaling.Aswesawinthepreviouschapter,this compartmentalizationmakesSharePointextremelyscalableandperformant. TheSearchcomponentsofSharePoint2010,formanyreasons,includingscaling,configurability, andperformance,arethereforeisolatedintotheSearchserviceapplication,whichisanapplicationlayer forconfiguringtheback-endfunctionalityofSharePointsearch.Almostalltheconfigurationdirectly relatedtothesearchcomponentsisdoneintheSearchserviceapplication.However,aswewillsee,a greatdealofsupportingconfigurationmayberequiredintheUserProfileserviceapplication,the ManagedMetadataservice,ortheBusinessDataConnectivityservice.Theseserviceshelpextend SharePoint2010Searchtoaddressavarietyofbusinessneeds. ThischapterwillreferoftentotheSearchserviceapplicationandthemenuitemsintheleft navigationoftheSearchServiceApplicationpage.Thereareoftenmanywaystogettothesamepagesin SharePoint.Themostdirectrouteisoutlinedhere. 1.
OpenCentralAdministration.OnthemainpageofSharePointCentral Administration,thereareeightsections.UnderApplicationManagement(as showninFigure3-1),choose“Manageserviceapplications”.
Figure3-1.Choose“Manageserviceapplications”fromtheApplicationManagementmenu.
62
CHAPTER3■ SETTINGUPTHECRAWLER
2.
TheServiceApplicationspageshowsalltheserviceapplicationsrunninginthe SharePointfarmandtheirstatus.ScrolldownandchoosetheSearchService Applicationoption(Figure3-2).
Figure3-2.TheSearchServiceApplicationoption 3.
TheSearchServiceApplicationpageshowsaSystemStatusandaCrawl Historysectionaswellasanavigationtotheleftwithfoursections: Administration,Crawling,QueriesandResults,andReports.Examinethe informationintheSystemStatussection.Thisisthestartingpointformost Search-relatedadministrationtasks.
DefaultContentAccessAccount SharePoint’scrawlerrequiresausertoaccesscontentandmakesrequeststoSharePointandother contentsources.Itmakesstandardrequeststothesecontentsourcesmuchthesamewaythatauser requestscontentthroughabrowserandwaitsforareply.Thereplyitgetsoftendependsonwhatuserit makesthoserequestswith.Somecontentsourcesmayrestrictaccesstospecificcontentbasedonuser credentials,andhavingthewronguserappliedtoSharePoint’sdefaultcontentaccessaccount(Figure33)canadverselyaffecttheoutcomeofcrawls. MakesureauserwithappropriatepermissionstocrawlSharePointissetonthedefaultcontent accessaccountontheSearchServiceApplicationpage.Thisusershouldhavereadaccesstoallcontent thatshouldbecrawled.Thisusershouldnotbeanadministrator,asdocumentsinanunpublishedstate wouldbecrawled.
Figure3-3.Thedefaultcontentaccessaccount Iftherearecontentsourcesthatdonotrecognizethedefaultcontentaccessaccount,specialcrawl rulescanbecreatedtouseadifferentuserforthosesources.Seemoreinthe“UsingCrawlRules” section.
Indexing Indexingistheprocessofcollectingdataandstoringitinadatastructurethatcanbeaccessedbyan applicationthatcanquerytheindexandpointtodatainadatabase.Thisdatastructureisusuallycalled
63
CHAPTER3■SETTINGUPTHECRAWLER
asearchindex.Someindexescontainallthesearchableinformation.Others,suchasSharePoint’s,store thewordsfoundinthedocumentsandpointerstomoreinformationaboutthosedocumentsinanother database.InSharePointtheindexisheldonthequeryservers,andthedocumentdataanddatarelated tothecrawleranditsadministrationareheldonthedatabaseservers.However,forthepurposeofthis section,wewilldiscussonlyindexingastheprocesstocreateboththeindexesandtherelatedsearch databases. SharePoint2010cancrawlandindexanumberofdifferentfiletypesandcontenttypesfrom differentsources.Inthissection,wewilldiscussthedifferentcontentsourcesandhowtosetupthe crawlertoindexeachone. Outofthebox,SharePointcanindexthefollowingcontentsources: •
Webcontent(HTTPandHTTPS)
•
SharePointuserprofiledatabases
•
LotusNotes
•
Exchangepublicfolders
•
Fileshares
•
BusinessConnectivityServices–connectedcontent
•
Othersourceswhereaconnectorisprovided(e.g.,Documentum)
Thesedifferentsourcescanbedividedintotwodifferenttypes:structuredandunstructured content.
StructuredContent Structuredcontentiscontentthathasadefinedstructurethatcangenerallybequeriedtoretrieve specificitems.Relationaldatabases,suchasMicrosoftSQLServer,arestructuresthatallowtheircontent toberetrievedifyouknowtherowandcolumnIDofthecellwherethatdatasits.Databasesallowtheir contenttoberetrievediftheuserortheuserinterfaceknowshowtoacquirethelocationofthedata. MostrelationaldatabaseshavetheirownindicestohelplocatetheseIDs.Thesearegenerallynotvery performantanddonotsupportfreetextsearchwell.Asearchenginedatabasestructurewillperform muchbetteratfindingalloftheoccurrencesofaparticularterminatimelymanner. Whenwemarryunstructuredandstructuredcontentoreventwodisparatestructuredcontent sources,welosetheabilitytosimplylookupcellIDstofindthespecificdata.Additionally,different databases’indicesseldom,ifever,worktogether.Thisiswhereasearchenginebecomescrucial. SharePoint’ssearchcomponentscanindexbothunstructuredandstructuredcontent,storethem together,returntheminahomogenizedresultset,filterbasedondeterminedmetadata,andleadthe endusertothespecificsourcesystem. SharePoint2010hasapowerfulfeatureforindexingstructuredcontent.Thisfeature,called BusinessConnectivityServices,allowsadministratorstodefineconnectorstostructureddatasources andindexthecontentfromtheminalogicalandorganizedmanner,makingthatdatasearchableand usefulfromSharePoint.
64
CHAPTER3■ SETTINGUPTHECRAWLER
BCSiscapableofcollectingcontentoutoftheboxfrom •
MSSQLDatabases
•
.Netassemblies
Additionally,customconnectorscanbecreatedtoallowittoindexalmostanyothercontentsource, including •
Otherdatabases
•
Line-of-businessapplicationssuchasSeibelandSAP
•
Otherenterpriseresourceplanning(ERP)systems
•
Manyotherapplicationsanddatabases
UnstructuredContent Unstructuredcontentreferstocontentthatisnotsetinastrictstructuresuchasarelationaldatabase. Unstructuredcontentcanbee-mails,documents,orwebpages.Unstructuredcontentisthebiggest challengeforsearchingasitrequiresthesearchenginetolookforspecifictermsacrossahugecorpusof freetext.Unstructuredsearchisoftenreferredtoas“freetext”search. Outofthebox,SharePoint2010canindexthefollowingunstructuredcontentsources: •
SharePointsites
•
LotusNotessites
•
Fileshares
•
Exchangepublicfolders
•
Externalandinternalwebsites
•
Othersourceswhereaconnectorisavailable
CrawlingSharePointSites SettinguptargetsitestocrawlinSharePointiseasy.TheContentSourcessectionintheSearchservice applicationallowstheadministratortoaddanytypeofsupportedcontentsource.Bydefault,when installed,thecontentsourceofthelocalwebapplicationsassociatedwiththeSharePointsitewillbe defined.IfaSharePointinstallationisdedicatedsolelytosearchthetarget,SharePointsitecollection shouldbeexplicitlydefinedasacontentsource. Inordertodothis,navigatetotheSearchServiceApplicationpageintheCentralAdministration underManageServiceApplications.Ontheleft-handmenu,thereareseveralsearch-specificitems,one ofthembeingContentSources.Onthispage,thereisafulllistingofallthecontentsourcesbeing indexedbySharePoint(seeFigure3-4).
65
CHAPTER3■SETTINGUPTHECRAWLER
Figure3-4.ContentSourcespage
■NoteThetypeofcontentsourceshouldbechosensoSharePoint’scrawlerknowshowtoconnectandhandle thedocumentsitiscrawling.IfaSharePointsiteisbeingindexed,thecrawlercanconnectandretrieveallthe documents,lists,listitems,libraries,andanyassociatedmetadata.
■NoteNoticetheSPS3protocolintheStartAddressdefinitionsontheContentSourcespage(Figure3-5).Thisis theprotocolbywhichSharePointconnectstotheUserProfilerepositoryandindexesuserdata.Ifuserdataistobe indexed,thisprotocolandtargetshouldbedefined.Ifthereareissuessearchingforpeople,checkinthissection first.
66
CHAPTER3■ SETTINGUPTHECRAWLER
Figure3-5.Definingstartaddressesinacontentsource
CrawlingUsersProfiles Enoughcannotbesaidaboutthepowerofconnectingpeopleforbusiness.Formostorganizations,their peopleandthosepeople’sexpertisearetheirbiggestassets.Findingpeopleandexpertiseinacompany canbeachallengingtaskatthebestoftimes,andexperienceandskillscangolargelyunexploited becausepeoplewiththerightknowledgecannotbefound—orworse,theircolleaguesdon’tevenknow theyexist. SharePoint’sPeopleSearchisapowerfulfeaturetoexposepeopleinanorganizationandtheir expertise,makingthemfindableandaccessible.Thepeoplesearchmechanism,althoughasimple enoughconcept,requirestheidentificationofpeopleintheorganization,theirexpertise,andtheir contactinformation.Inordertoexposethisinformationandfindtherelevantpeople,SharePointmust firstbeabletocrawltheinformationaboutthesepeople. PeopledatainSharePointcomesfromindexinguserprofiles.UserprofilesareheldinSharePoint andholdtheinformationaboutalltheusersofSharePointaswellasotherpotentialSharePointusers thatmayhaveprofiledataimportedfromActiveDirectoryorsomeotherdirectoryserverservice.User profiledatacanbeenteredmanually,eitherbytheadministratororbytheusersthemselvesintheir personalsite(MySite).Additionally,otherdatasourcescanbeusedtopopulateuserprofiledata. Usuallythestartingpointforanorganizationistosynchronizetheexistinginformationtheyhavein theirorganization’sdirectorywithSharePointandthenallowconnecteduserstoenrichthatinformation ontheirMySitepages.ThiswillallowforrichmetadataandsocialsearchfunctionalityinPeopleSearch. However,thisisnotstrictlynecessary,anddatafromadirectoryserverisnotrequiredtohavearich
67
CHAPTER3■SETTINGUPTHECRAWLER
peoplesearchexperienceaslongasusersareawareoftheMySitefeatureandhavethetimeandinterest tokeepituptodate. UserprofiledataismanagedbytheUserProfileserviceapplicationintheServiceApplications sectionofCentralAdministration.Forthepurposeofthisbook,wewillonlygointocrawlinguser profilesandsynchronizingthemwithDirectoryServers,butitisimportanttonotethatagreatdealof richuserinformationcanbemanagedfromthisserviceapplication.Additionally,theUserProfile serviceapplicationmakesitpossibletoshareuserdataacrossmultiplesitesandfarms.Thiscanallow forarichandeffectivepeoplesearchandexposeexpertiseinareasoftheorganizationnotpreviously accessibletomanyemployees. TheprotocolusedtocrawldatacollectedfromtheUserProfileserviceiscalledSPS3.Itcanbeseen setinthedefaultcontentsourceforSharePointsitesassps3://servername.Ifuserprofilesarenot crawled,checkifthissiteissetinthedefaultcontentsource.
■TipIfyourMysitedefinitionusesSecureSocketsLayerorTransportLayerSecurity(https),itmaybenecessary tosettheSPS3protocoltousesecuresockets(sps3s)aswell.
SynchronizingUserProfiles Tosynchronizeuserprofiles,navigatetothe“Manageserviceapplications”pageinCentral Administration(Figure3-6).
Figure3-6.TheApplicationManagementmenu ThenchoosetheUserProfileServiceApplicationlink(seeFigure3-7).Checkiftheservice applicationisstartedintheright-handcolumn.
Figure3-7.ChoosingtheUserProfileServiceApplicationlink
68
CHAPTER3■ SETTINGUPTHECRAWLER
ThesourcesforuserprofileinformationaremanagedintheSynchronizationsection,where differentuserdatasourcescanbedefinedandsynchronizationschedulesdefined(Figure3-8).
Figure3-8.TheUserProfileServiceApplicationpage SelectingtheConfigureSynchronizationConnectionmenuitemwilldisplaythepagewhere additionaluserprofiledatasourcescanbeadded.Toaddanewsourcetosynchronization,selectCreate NewConnection.Thefollowingsourcetypescanbeselected: •
ActiveDirectory
•
ActiveDirectoryLogonData
•
ActiveDirectoryResource
•
BusinessDataConnectivity
•
IBMTivoliDirectoryServer
•
NovelleDirectory
•
SunJavaSystemDirectoryServer
■NoteTheSynchronizationConnectionpagereturnsrelativelygooderrorsiftheconnectionfails,butthe PopulateContainersbuttonwillstillfunctionevenifalltherequiredfieldsarenotfilledout.Makesureyouhave thecorrectdomain,server,anduserinformationtoconnectandretrievethedirectorydata.
69
CHAPTER3■SETTINGUPTHECRAWLER
UserAccounts Thesynchronizationconnectionsettingsshoulduseanaccountthathasaccesstothedatasource.The accountshouldbeabletoreadalltheuserprofiledataonthedirectoryserverbeingsynchronized.How thisaccountissetupmayvarydependingonthesourcesystem.Thesourcesystemsaredefinedonthe AddSynchronizationpageandcanbesetbychoosingthecorrectsystem(listedhere)intheTypedropdownmenu,showninFigure3-9.WhenusingBusinessDataConnectivityServices,anaccountisnot requiredastheaccountssetintheBusinessDataConnectivityentitywillbeused. •
ActiveDirectory:TheusermusthaveReplicateDirectoryChangespermissionon thetargetdomain.ForWindows2003ActiveDirectoryinstallations,theuser shouldbeamemberofthePre-Windows2000CompatibleAccessgroup.For domainswithadifferentNetBIOSname,thecn=configurationcontainerinActive DirectoryshouldbecheckedtomakesuretheuserhasReplicateDirectory Changespermission.Asexportingpropertyvaluesisalsolikely,theusershould alsohaveCreateChildObjectsandWriteAllPropertiespermissions.
Figure3-9.AddinganewDirectoryServersourceforsynchronization
70
CHAPTER3■ SETTINGUPTHECRAWLER
•
NoveleDirectory:NoveleDirectoryshouldbeconfiguredtoallowthespecified usertobrowseintheEntryRightspropertyforthedirectorytreewheretheusers toimportarelisted.Additionally,itshouldgivetheuserRead,Write,andCompare rightsinAllAttributesforthesamedirectorytree.
•
SunJavaSystemDirectoryServer:IntheSunJavaSystemDirectoryServer, AnonymousAccesstoRootDSEshouldbeenabledwithRead,Write,Compare, andSearchrights.Iftheintentionistoincrementallysynchronize(recommended forlargedirectories),theaccountshouldalsohaveRead,Compare,andSearch permissionsonthecn=changelogobject.
•
IBMTivoli:TheaccountspecifiedtosynchronizewithIBMTivolishouldbea memberoftheadministrativegroup.
■NoteToconfiguresynchronizationwithaLightweightDirectoryInterchangeFormat(LDIF)file,seethehow-to guideprovidedbyMicrosoftonTechNet:http://technet.microsoft.com/en-us/library/ff959234.aspx.
ExcludingDirectoryTreeNodes SharePointallowstheadministratortochoosewhichlevelsofthedirectoryandwhichnodesto synchronize.Allothernodeswillbeexcluded.Theadministratorcanselecttheentiredirectoryby choosingSelectAllorchooseeachorganizationalunitseparately.Since,generally,currentuserdatais interestingonlytoanorganization,itisrecommendedthatcareistakentoselectonlyorganizational unitsthathavecurrentusersinthem.Excludeformeremployees,serviceusers,computers,etc.See Figure3-10.
Figure3-10.Selectingthedirectorycontainersanduserstobesynchronizedforuserdata
71
CHAPTER3■SETTINGUPTHECRAWLER
■NoteTheUserProfileservicemustbesettosynchbeforeanyuserprofilescanbecrawled.Besuretoinitiate aninitialsynchbeforecrawlingandexpectinguserstobesearchable.
SearchingfromMySites EachMySitehasitsownsearchboxthatissimilartoallthepagesinaSharePointsite.However,this MySitesearchboxcanhaveadifferenttargetsearchcenter.Designatingthetargetsearchcenterfor MySitesisdoneintheUserProfileservicesapplicationunderMySiteSettings(Figure3-11).
Figure3-11.SettingtheappropriatetargetsearchcenterforMySites
CrawlingFileShares SharePoint2010Searchistrulydesignedasanenterprisesearchtool.Manydonotappreciatethe extensivesearchcapabilitiesofSharePointbecauseofallitsotherenterprisefunctionality.SharePoint 2010hasextensiveindexingcapabilities,andoneofthemostusefulistheindexingoffileshares.We haveyettoencounteranorganizationwithouthoardsofdatastoredawayonfileshares.Someorallof thisdatamaynotbeinteresting,andcareshouldbetakenastowhatisincludedinanindex.Wewill coverthisindetailinChapter10.However,theabilitytoindexandexposethepotentialtreasuretroves ofinformationlockedawayinthesedatagraveyardsisvast.Thissectionwilloutlinehowtoquicklyand easilysetuptheSharePointcrawlertoindexfileshares. LikeaddingSharePointsites,settingthecrawlertoindexfilesharesisdoneintheAddContent SourcespageintheSearchserviceapplication(seeFigure3-12).
72
CHAPTER3■ SETTINGUPTHECRAWLER
Figure3-12.TheAddContentSourcepagedefiningfilesharestocrawl DefinedpathsintheStartAddressessectionmustbeeitherUNCpathsorpathsusingthefile protocol(file://fileshare).Testingthepathsbymappingthedrivesontheserverisadvisablebefore addingthemascontentsources.Makesurethecrawluserhasreadaccesstothefileshares. CrawledfilesmayalsocontainmetadatathatcanbeusedbythesearchrefinersinSharePoint2010 orinscopes.ThismetadataisusuallynotmadeavailablebydefaultinSharePoint,unlikemanyofthe documentpropertiesindocumentsmanagedbySharePointindocumentlibraries.Makingsurethis metadataiscrawledandmappedtomanagedpropertiesinSharePointcanallowforthismetadatatobe usedinrefinersandscopes.Seethesectionlaterinthischapteroncrawlingandmappingmetadatafor moredetailsonhowtomapthiscrawledmetadata.
■NoteFilesharesareoftenfilledwithdocumenttypesthatarenotindexedbydefaultbySharePoint’scrawler. Luckily,SharePointhastheability,viatheWindowsoperatingsystem,toconvertandcrawltextfromotherfile typesusingiFilters.iFilterscanbeprogrammedforcustomfiletypesorpurchasedfromthird-partyvendors.We willaddressiFilterslaterinthissectionandlaterinthebook.
73
CHAPTER3■SETTINGUPTHECRAWLER
CrawlingWebSites SharePoint2010canalsocrawlwebsitesandhasauniquecrawlingmechanismforindexingweb content.AlthoughSharePointitselfisessentiallyaverypowerfulwebsiteforportalusage,thecrawling mechanismdiffersinsomuchasthewebcrawlingmechanismofSharePoint2010hasspecialcapabilities forparsingHyperTextMarkupLanguage(HTML)andextractingcontentfromHTMLtags.When crawlingSharePointsites,thecrawlerusesadifferentapplicationprogramminginterface(API)tocollect documentsandarichamountofassociatedinformationsuchascustomproperties. ItisgenerallyrecommendedthatSharePointsites,eventhosethatareusedasexternalwebsites, shouldbeindexedasSharePointsites.Ifindexingawebsitebuiltonsomeothercontentmanagement systemorindexingallorpartofanexternalwebsite,thewebsitedefinitionshouldbeused.Crawling sitesaswebsiteswilllimitthecrawlertoindexingcontentretrievableonthepresentationtieroftheweb site—thatis,thewebsitesasanonymousvisitorswillseethem. TherearetimeswhenitmaybenecessaryordesirabletoindexSharePointsitesaswebsites,and thisisalsopossible—forexample,iftheSharePointsiteisforapublicsitenotownedoroperatedbythe organization,ifthesiteisbehindafirewall,oriftheSharePointsiteisbasedonadifferentversionof SharePointanditisnotpossibletoindexitasaSharePointsite. WebsitesshouldbeaddedbyaddingtheentireHypterTextTransferProtocol(HTTP)orHTTPwith SecureSocketLayers(SSL)path(HTTPS).SeeFigure3-13.
Figure3-13.Addingawebsitecontentsource
74
CHAPTER3■ SETTINGUPTHECRAWLER
Websitesareanythingbutastandardgroupofitems.Therearenearlyasmanyvariationsofhow websitesarebuiltaswebsitesthemselves.EventhoughstandardsexistforHTMLandwebcontent,itis verydifficulttofindasitethatfollowsthesestandards.Respectshouldbegiventobrowserdevelopers forgivingenduserssucharichexperience,giventhestateofmostwebsites.Withthatsaid,the argumentexiststhatifbrowserswerenotasforgiving,webdeveloperswouldbemorecareful.Most crawlersareusuallynotasforgiving.Thisisusuallyduetothefactthatacrawlerneedstomakesenseof thecontentitisgettingintheHTML,notjustdisplayit. Manyfactorsmakecrawlingwebpagestricky,including •
JavaScript:CrawlersgenerallycannotunderstandJavaScriptandwillignoreit.
•
Flash:CrawlerswillnotindexthecontentofFlashobjectsinmostcases.
•
Images:Webcrawlersdonotmakesenseofimagesoutsideoftheirmetatagsoralt tags.Scannedtextisaspecialproblem—althoughusersseetext,crawlersseeonly animage.
•
BrokenHTML:AlthoughbrowserswilldisplaypoorlyformattedHTML,crawlers canoftenstumbleonit.
•
Poorormissingmetadata:Webpagescanholdmetadata,andthiscanimprove therichnessofthecontent.However,mostcontentmanagementsystemsdoa poorjobofmanagingandpublishingmetadata.Customsitesareevenworse.
•
Pageorsite-basedcrawlrules:Robotsmetatagsorrobots.txtfiles
Theseissuesmakecrawlingwebsitesdifficultandthecontentcollectedfromthemoftennotas goodasthatfromaSharePointsite.Iftheadministratorhascontrolofthewebsite,correctingthese issuescanmakethewebcontentmoreaccessibletoSharePointSearchaswellastoglobalsearchifthe siteisexposedtotheWorldWideWeb.
CrawlingExchangePublicFolders SharePoint2010canalsocrawlExchangepublicfolders.Likefileshares,publicfoldershaveenjoyeda certainlevelofpopularityforstoringshareddocuments.Exchangehasthehandycapabilityofsharingemailmessagesanddocumentsbyplacingtheminsharedpublicfolders.Sincemanyinformation workersareactivelyusingOutlook,havingshareddocumentsande-mailinExchangecanbeveryuseful. Ofcourse,SharePointisthenext-generationsolution,andtherearemanyadvantagestomovingthis contentdirectlyintoSharePoint.However,ifmovingthemisnotdesirable,indexingthatcontentand makingitavailableinSharePoint’ssearchispossible. Settingupthecrawlertocrawlpublicfoldersissimilartothepreviouscontentsources,exceptyou willneedtobeawareofwhatuserrightsthecrawleraccounthas.Ifitdoesnothavereadaccesstothe publicfoldersthatneedindexing,acrawlrulewillneedtobeaddedthatdefinesthisuser. FollowthesestepstoaddExchangepublicfoldersasacontentsource(seeFigure3-14): 1.
IntheSearchServiceApplicationpageintheCentralAdministration,select ContentSourcesandNewContentSource.
2.
Filloutthefieldswiththeappropriateinformation,andselectExchangepublic foldersasthecontentsource.
75
CHAPTER3■SETTINGUPTHECRAWLER
3.
SettheExchangeserverandthepathtothepublicfolderstobeindexedinthe StartAddressesfield.InternalsitescanusetheNetBIOSnameinplaceofthe fullyqualifieddomainname(FQDN).IfExchangeWebAccessisrunning underSecureSocketLayers,besuretousetheHTTPSprotocolinthepath.If theserverisExchange2007SP2orlaterversions,thepathtothepublicfolder canbeidentifiedbyaccessingthepublicfoldersviaExchangeWebAccessand copyingthepathintheaddressbarfromthebrowser.
4.
Fillouttheotherfieldswithappropriatechoices(indexsubfolders,schedule crawl,etc.).
5.
Ensurethecrawluserhasreadaccesstothepublicfoldersorcreateanew crawlrulethathasthecredentialsofauserthatdoeshaveaccess.Seethe followingsectiononcrawlrulesformoreguidance.
Onceagain,thecrawlerwillcommunicatewiththeExchangeserverinadifferentwaythanother contentsources.Forthisreason,itisimportanttomakesurethatthecontentsourceiscorrectlydefined.
Figure3-14.AddingExchangepublicfoldersasacontentsource
76
CHAPTER3■ SETTINGUPTHECRAWLER
CrawlingLine-of-BusinessData Line-of-business(LOB)systemsarethosesystemsinanorganizationthatperformtaskscriticaltothe operationforthebusiness.Althoughthisdefinitionisrelativelybroad,generally,systemssuchas enterpriseresourceplanning(ERP),accounting,andcustomerrelationsmanagement(CRM)systems areincludedinthisdefinition.Formanyorganizations,SharePointisquicklybecominganintegralpart ofthesesystems.SinceSharePointisarelativelynewandlightweighttoolformanyorganizations, bringingdatafromlarger,older,ormorecorebusinesssystemscanbeimportant. Theabilitytocrawlline-of-businessdatafromotherITsystemsisoneofthefeaturesthatmakes SharePointatrueenterprisesearchtool.ThisabilityismadepossiblebythepowerfulBusiness ConnectivityServices,whichhasanentirechapterinthisbookdedicatedtoit(Chapter9).Ifitisthe intentiontoincludeline-of-businessdatainSharePointandutilizeaBusinessDataConnectivityservice, thereshouldbeacontentsourcedefinedforthatdata.HerearethestepstoaddaBusinessConnectivity Servicescontentsource. 1.
NavigatetotheSearchserviceapplicationandselectContentSourcesonthe left-handmenu.
2.
GivethecontentsourceanameandchooseLine-of-BusinessDataasa ContentSourceType.
3.
SelecttheappropriateBusinessDataConnectivityserviceifthereismorethan one.Selectedexternalsourcesorallexternalsourcescanalsobechosen.This maybenecessaryifthereareseveralexternalsourcesdefinedintheservice butallarenotinterestingtocrawl.
4.
Setacrawlscheduleandapriority.
ThecrawlerisnowreadytocrawlandindextheBusinessDataConnectivityservice(Figure3-15).
77
CHAPTER3■SETTINGUPTHECRAWLER
Figure3-15.SettingupaBusinessConnectivityServicescontentsource
UsingCrawlRules SharePoint2010’scrawlercommunicateswiththecontentsourcesthataredefinedinavery standardizedmanner.Itindexesthecontentastheuserthatitisspecifiedasandcollectsinformation fromallthelinksthatarespecified.Ifsubfoldersaresettobeindexed,itwillnavigatetothosefolders, collectthelinks,andgatherthecontent.Itisnotalwaysdesirableorpossible,however,tohave SharePointcrawlthecontentsourcesinthesamewaywiththesameaccounts.Therefore,SharePoint 2010hasapowerfulfeaturetospecifyrulesforgivenpathsthatmaybeencounteredduringcrawling. Theserulescanincludeorexcludespecificcontentaswellaspassspecialusercredentialstothose specificitemsinordertogatherthemcorrectly. CrawlrulesareappliedintheSearchserviceapplicationontheCrawlRulespage,whichisunderthe Crawlersectionoftheleft-handnavigation.AddinganewcrawlruleisaseasyasnavigatingtotheCrawl Rulespageandselectingnewcrawlrule.Becauseregularexpressionsandwildcardrulescanbeapplied, atestingfeatureismadeavailableontheCrawlRulespage.Thisfeaturewillallowaparticularaddressto beenteredandtestedtoseeifthereisarulealreadydesignatedthataffectsthecrawlingofthisaddress. Sincemanyrulescanbeappliedandtheeffectofrulesisnotalwaysobvious,thistestingfeatureisvery useful(Figure3-16).Ifapageisnotbeingcrawled,administratorsareencouragedtocheckfor conflictingrules.
78
CHAPTER3■ SETTINGUPTHECRAWLER
Figure3-16.Testingacrawlrule Toaddacrawlrule,navigatetotheSearchserviceapplicationandchooseCrawlRulesinthelefthandnavigationunderCrawler.OntheCrawlRulespage,selectNewCrawlRule.OntheAddCrawlRule page,pathscanbeaddedtoeitherexplicitlyexcludeorinclude.Wildcardsorregularexpressionscanbe usedtocreatecomplicatedinclusionorexclusionrules.Thisgivesapowerfulwaytofindundesirableor desirablecontentandmakesureitisorisn’tcrawled. Adjustingthecrawlerwithcrawlrulescangoalongwaytowardimprovingtherelevanceandquality ofthesearchresultset.Alltoooften,searchresultlistsarepollutedwithunnecessaryorirrelevant content.Settingthiscontentincrawlrulestobeexcludedfromthecrawlcanhelptoremove unnecessarydocumentsfromthecrawldatabaseandconsequentlytheresultlists.Sometypical examplesofthisaredocumentsofacertaintypeorinacertainlocation.Althoughmanyserious scenarioscanbeimaginedwheredocumentswithacertainfilenameorinacertainpathneedtobe excluded,oneofthemostcommonsituationsiswhencrawlingapublicwebsitewithprintversionsfor eachpage.Settingacrawlruletosettheprintversion(e.g.,print=truepatterninURL)caneasilyallow thesetoberemovedfromthecrawledcontentandremovethisnoise.Somesimpleinspectionsofthe searchresultsandthepatternsinURLsonthecontentsourcesiteswillhelptodeterminewhatkindsof rulesareappropriate.
79
CHAPTER3■SETTINGUPTHECRAWLER
UsingRegularExpressioninCrawlRules SharePoint2010hastheaddedfeatureofsupportingregularexpressionsincrawlrules.The administratormustbesuretoselectthe“Matchregularexpressions”checkboxandformulatethe expressionsproperly,butthisfeatureopensvastnewpossibilitiesforcontrollingwhatiscrawledand whatisn’t. SharePoint2010supportsthefollowingregularexpressionoperatorslistedinTables3-1 through3-3. Table3-1.AcceptableGroupingOperatorsinSharePoint2010
Operator
Symbol Description
Example
Valid match
Invalid match
Group()
Parentheseswill groupsetsof characters. Operatorsfor thegroupwillbe appliedtothe entiregroup.
Disjunction|
Thispipeoperator \\prosharepointshare \\prosharepointshare \\myshare\ share1share2\ isappliedbetween \((share1)|(share2))\.* \share1\ OR twoexpressionsand \\prosharepointshare returnstruewhen \share2\ onlyoneisvalid.It isalogicalOR.
Table3-2.AcceptableMatchingOperatorsinSharePoint2010
Operator
Symbol Description
Matchany . character
80
Example
Valid match
Invalid match
Theperiodor http://prosharepoint http://prosharepoint http://prosharepoint search/default.aspx search/default.asp dotoperator search/default.as. matchesany character.It willnot matchwitha null character, whichmeans thenumber ofdots should correspondto thenumber ofcharacters matched.
CHAPTER3■ SETTINGUPTHECRAWLER
Operator
Symbol Description
Conditional match
?The
Wildcard *A match
Match oneor more times
+
Example
Valid match
Invalid match
http://prosharepoint search/default(1)?.ht expression canbetested ml toeitherexist ornot.Itwill notexpand the expression.
http://prosharepoint http://prosharepoint search/default.aspx search/default11.aspx AND http://prosharepoint search/default1.aspx
http://prosharepoint single charactercan search/default(1)*.asp eitherexistor x repeatedly existbasedon theoperator’s expansion.
http://prosharepoint http://prosharepoint search/default.aspx search/def.aspx AND http://prosharepoint search/default111.asp x
Itrequiresthe http://prosharepoint expressionon search/default(1)+.as px whichitis appliedto existinthe targetaddress atleastonce.
http://prosharepoint http://prosharepoint search/default1.aspx search/default.aspx AND http://prosharepoint search/default111 .aspx
Listmatch [] isalistof characters insidesquare brackets“[]”. Itmatches any charactersin thelist.A rangeof characters canbe specified usingthe hyphen"-" operator betweenthe characters.
http://prosharepoint search/page1.htm OR http://prosharepoint search/page2.htm OR http://prosharepoint search/page3.htm OR...
81
CHAPTER3■SETTINGUPTHECRAWLER
Table3-3.AcceptableCountOperatorsinSharePoint2010
Operator Symbol Description
Example
Valid match
http://proshare http://proshare http://proshare Thisoperatorisa pointsearch/(1){5} pointsearch/11111- pointsearch/111numberinsidecurly 000.aspx 00.aspx brackets“{}”,e.g.,{1}.It -(0){3}.aspx limitsthenumberof timesaspecificmatch mayoccur.
Exact count
{num}
Min count
http://proshare {num,} Thisoperatorisa pointsearch/(1){5, numberinsidecurly brackets“{}”followedby }-(0){2}.aspx acomma","e.g.,{1,}.It limitsthenumberof repetitionsaspecific matchcanhaveand placesaminimum amountonthatmatch.
http://proshare http://proshare pointsearch/11111- pointsearch/111100.aspx 00.aspx AND http://proshare pointsearch/1111100.aspx
Range count
{num1, Thisoperatorholdstwo http://proshare pointsearch/(1){4} num2} numbersinsidecurly brackets“{}”separated -(0){2,3}.aspx byacomma","e.g., {4,5}.Thefirstnumber definesalowerlimit, andthesecondnumber definesanupperlimit.It limitsthenumberof repetitionsinaURL betweenthetwovalues, num1andnum2.The firstnumbershould alwaysbelowerthanthe secondtobevalid.
http://proshare pointsearch/111100.aspx AND http://proshare pointsearch/1111000.aspx
http://proshare pointsearch/99990000.aspx
\\proshare pointshare \share1\ OR \\proshare pointshare \share2\
\\myshare\ share1share2\
Disjunc- | tion
Thispipeoperatoris appliedbetweentwo expressionsandreturns truewhenonlyoneis valid.ItisalogicalOR.
\\proshare pointshare \((share1)| (share2))\.*
82
Invalid match
CHAPTER3■ SETTINGUPTHECRAWLER
Operator Symbol Description List[] charactersinsidesquare pointsearch brackets“[]”.Itmatches /page[1-9].htm anycharactersinthe list.Arangeof characterscanbe specifiedusingthe hyphen"-"operator betweenthecharacters.
Valid match
Invalid match
http://proshare pointsearch/page1.h tm ORhttp://proshare pointsearch/page2.h tm OR http://prosharepoin tsearch/page3.htm OR...
Whenaddingregularexpressionstomatchcrawlpaths,itisimportanttoknowthattheprotocol part(e.g.,http://)ofthepathcannotcontainregularexpressions.Onlypartsofthepathafterthe definedprotocolmaycontainregularexpressions.Iftheprotocolisexcluded,SharePointwilladd http://tothehostnameandanyattemptsatregularexpressions. Bydefaultregularexpressionmatchesarenotcase-sensitive.Additionally,SharePoint2010’s crawlernormalizesalldiscoveredlinksbyconvertingthemtolowercase.Ifitisnecessarytomatchcase oruseregularexpressionstoexcludedocumentsbasedoncharactercaseinthepath,the“Matchcase” checkboxshouldbechecked.Otherwise,leaveitempty.Itmaybenecessarytomatchcaseifcrawling Apache-drivenwebsiteswherepagesarecase-sensitive,Linux-basedfileshares,orcontentfrom BusinessConnectivityServicesthatpreservescase.Creatingcrawlrulesforcase-sensitivefiletypes allowsthemtobecrawledandrecognizedasunique.
UsingCrawlRulestoGrantAccess Crawlrulescanalsobeusedtograntaccesstospecificcontentorpartsofcontentbydefiningtheuser thatwillcrawlthatcontent.Generally,thecrawlershouldbegivenfullreadaccesstocontentandallow SharePoint’spermissionsfilteringtodeterminewhatuserscansee.
■NoteBecarefulwhenapplyingblanketpermissionsacrosslargedocumentrepositories.Althoughgivingthe SharePointcrawlerreadaccesstoeverythingisusuallyagoodideainwell-managedSharePointsites,doingiton othersystemscanoftenexposesecurityriskssuchasdocumentswithoutcorrectpermissionsthatarenever foundsolelyduetoobscurity.Asearchengineisagreattoolforfindingthings,eventhosebestlefthidden.
Itisalsopossibleandsometimesnecessarytodefineaspecialuserforindexingexternalsitesor independentsystemssuchasfilesharesorExchange.Inthesecases,aspecialuserwithreadaccessto thecontentcanbedefinedinthecrawlrules.Forexample,ifindexingExchangepublicfolders,a separateusercanbedefinedtoallowread-onlyaccesstothosefolders.Thisusercanbesetincrawl rulestobetheusertoindexthatcontent,therebyprotectingotherExchangecontentfromunauthorized crawling(Figure3-17).
83
CHAPTER3■SETTINGUPTHECRAWLER
Figure3-17.Specifyingacrawlrulethatappliesaspecificusertothecrawler
■NoteManycontentmanagementsystemsallowforweb-basedauthoring.Authorscanclickalinktoadd,edit, anddeletecontent.Withsomecrawlertechnologies,itispossibleforthecrawlertodeleteallthecontentonasite asthecrawlerclickseverylink.TheauthorsofthisbooksawthisoftenwithMicrosoft’spreviousCMSproduct. However,SharePoint’scrawlerwillsubmitonlyGETformrequests,andmodificationsanddeletionsviaweb-based authoringsystemsareusuallytriggeredbyPOSTforms.SothelikelihoodofSharePoint’scrawlermodifyingor deletingcontentisslim.However,itisstillwisetousecrawlrulestospecifyaread-onlyusertoindexsuchsites.
TroubleshootingCrawlErrors Alltoooften,userscomplainaboutmissingcontentinsearchengines.Eitherimpatientusersexpect theircontenttoappearimmediatelyorsomecrawlingissuecausesthecontenttobeskippedduring
84
CHAPTER3■ SETTINGUPTHECRAWLER
indexing.Undefinedfiletypes,documentswithoutanytext,documentsleftcheckedout,orjust corruptedfilescancauseSharePoint’scrawlertofail. LuckilythereisawaytoinvestigateandidentifycrawlproblemsinSharePoint(althoughitstill leavesacertainamountofguessworknecessary).TheSharePointcrawlerlogscanshowalotof informationaboutwhatwascrawled,whatwasn’t,errorsthatwereencountered,andevenwarnings. AdministratorscaninvestigatethecrawllogsinSharePointCentralAdministrationintheSearch serviceapplication,undertheCrawlermenuontheleftnavigation.Bydefaultthecrawllogshowsalist ofcontentsourcesandtheirtop-levelwarnings.Byclickingeachcontentsource,theadministratorcan digintotheparticularcontentsource’serroroverview.Formoredetailsonspecificdocumentsorpages, theadministratorwillneedtochooseoneofthelinksatthetopofthepagetoviewcrawllogsby hostname,URL,crawlhistory,orerrormessage. TheHostNamecrawlerlogpageshowsallthehostnamesdefinedacrossthedifferentcontent sources.ClickingindividualhostnamestakestheadministratortotheURLpage,whereindividualURLs aredisplayedwiththeircrawlresult.Thiscanbeasuccess,anerror,orawarning.Itwillalsoshow documentsdeletedfromthecrawldatabase. Thecrawlerlogwillreportthefollowingstatusmessages(seeFigure3-18): •
Success:Theitemwassuccessfullycrawled.Theitemhasbeenaddedtotheindex anddatabasesandalreadymadesearchableorthecontentwasalreadyinthe indexandhasnotchanged.
•
Warning:Awarningmessageindicatessomeissuewiththecrawl.Thiscould meanthatthecontentwascrawled,notcrawled,orpartiallycrawled.Agood exampleofthisiswhenafiletypeisdefinedbutanappropriateiFilterforthatfile typeisnotpresentorisnotfunctioningproperly.Awarningindicatesthatthe documentanditsassociatedmetadatafromSharePoint(properties)havebeen crawledbutnotthecontentfromwithinthedocument.
•
AllErrors:Thismessageindicatestherewasaproblemwiththeitemandit, therefore,wasn’tcrawled.Ifitisanewitem,itwillnotbesearchable.Olditems presentlyintheindexwillnotberemoveduntiltheerrorhasbeenresolvedand theitemcanbeidentifiedasdeleted.Theitemwillalsonotbeupdated.
•
Deleted:Deletedreferstoallitemsthat,foranyreason,wereremovedfromthe index.Theseitemswillnolongerbesearchable.Itemsaregenerallydeletedfrom anindexinresponsetoadeletiononthesiteoracrawlruleoraSearchResult Removal(moreonSearchResultRemovalinChapter10).
•
Top-LevelErrors:Top-levelerrorsareasubsetoftheerrorsgroupandtherefore arenotcountedinthehostnameview.Theyareerrorsatthetoppageorentry pointofthecrawlerthatrestricteditfromcrawlingfurther.Theseerrorsare importantastheycanindicatewhyanentiresiteorcontentsourceisnotindexed.
•
Folder/SiteErrors:Theseerrorsareliketop-levelerrorsbutrepresenterrorsonlyat thestartpageoffoldersorsites.Again,theseerrorscanbeusefulwhendiagnosing errorsatalowerleveloronaparticularsiteandnoerrorforthespecificitem exists.
85
CHAPTER3■SETTINGUPTHECRAWLER
Figure3-18.Filteringonstatusmessagesinthecrawllogs Crawlerrorscanbeverydifficulttodecipher.SharePointadmittedlystilldoesnothavethebest errorlogging.However,thereismuchthatcanbegleanedfromthecrawllogsandcorrectionsmade basedontheinformationpresented.Herearesomecommonscenarios: •
Warningmessage:“Thefilteringprocesscouldnotloadtheitem.Thisispossibly causedbyanunrecognizeditemformatoritemcorruption.” Thismessageismostlikelycausedbyoneoftwoproblems:
•
•
1.
TheiFilterforthisfiletypeisnotinstalledorisnotfunctioningproperly.In thiscase,installtheiFilter.CiteknethasaniFilterExplorerthatcanhelp diagnosetheseproblems.
2.
AlthoughtheiFilterisinstalledandfunctioningproperly,thisdocumentis createdinamannernotsupportedbythisiFilterorthereisformattinginthis documentthattheiFilterdoesnotlike.Inthiscase,investigateathird-party vendor’siFilterasanalternative.
Warningmessage:“Thisitemandallitemsunderitwillnotbecrawledbecausethe ownerhassettheNoCrawlflagtopreventitfrombeingsearchable.” 1.
Thismessageindicatesthatduringcrawl,thecrawlerwasinstructedbythe serverthatthiscontentshouldnotbecrawled.ForSharePointthiscanmean thatthesitewassettonotallowcrawling.ThisissetinthesiteunderSite Settings,SearchandOfflineAvailability.
2.
Aparticularlistorlibrarycanalsobesettonotbevisibleinsearchresults. ThisissetinAdvancedSettingsontheListorLibrarysettingspageofthelist orlibraryinquestion.
3.
Fornon-SharePointcontent,thiscanbecausedbyaRobotsmetatagora robots.txtfile.Ifthetagappearsonthepage,SharePointwillrespectitandnotcrawlthe page.Ifthepageislistedinarobots.txtfileattherootofthesite,SharePoint willlikewiserespectthisruleandnotindexthepage.
Errormessage:“Objectcouldnotbefound.” Thismessageindicatesthatwhencrawlingafileshare,thenameofthefileshareis correctbutthefiletobecrawledisnotcorrect.Thefilewillbedeletedfromthe index.Checkthefileshare,andmakesurethecontentiscorrectandaccessibleby thecorrectuser.
86
CHAPTER3■ SETTINGUPTHECRAWLER
•
Top-levelerrormessage:“Networkpathforitemcouldnotberesolved.” Thismessagepointstoaproblemwiththefileshareortheresolutionofadomain name.Checkthattheshareisavailableorthecontentsourceisresolvablefrom thecrawlserver.Contentpreviouslycrawledunderthiscontentsourcethatisnot subsequentlyfoundwillnotbedeletedfromtheindex.
•
Errormessage:“Accessdenied.” “Accessdenied”isoneofthemostcommonerrormessagesandindicatesthatthe contentisnotaccessibletothecrawler.Checkthepermissionsonthedocument againstwhichuserhasbesetasthedefaultcontentaccessaccountintheSearch serviceapplication.
ServerNameMappings Sometimes,itisdesirabletocrawlonesourceandhavethelinkrefertoanothersource.Forexample,I haveadedicatedcrawlservercalledSPCrawlWFE,whichisamirrorofmywebserversthatareproviding contenttomyusers.IwanttocrawltheSPCrawlWFEsitebuthavetheusersclickthroughtotheother server(SPProdWFE).Byusingservernamemappings,onesitecanbecrawledandtheservernameson theresultpagelinkschangetoanotherserver. Toaddaservernamemapping,navigatetotheServerNameMappingspageundertheCrawler sectionoftheSearchserviceapplication.ClickNewMapping.OntheAddNewMappingpage,addthe nameofthesitethatwascrawledandthenameofthesiteusersshouldclickthroughto.SeeFigure3-19.
Figure3-19.Configuringservernamemappings
87
CHAPTER3■SETTINGUPTHECRAWLER
CrawlerImpactRules Crawlerimpactrulescanallowtheadministratortodictatewhetherthecrawlerrequestscontentfroma sitemoreorlessaggressivelythandefault.Thisisusefulifasitedoesnothaveamirrorfordedicated crawlingorifthesiteisoutsideoftheSharePointfarmandmaynothandletheload.Incaseswhereitis desirabletocrawlanexternalwebsite,itmaybewisetolimittheloadputonthatexternalsite,asthe administratorofthatsitemayblockthecrawlerduetotheloadandfearofapossibledenialofservice attackonthesite.Ontheotherhand,itmaybedesirableinenvironmentsthatareespeciallyperformant toincreasetheloadthecrawlerputsonthecontentserversduringcrawltospeedupthecrawlerand reducecrawltime. Addingcrawlerimpactrulesiseasybutrequiresconsideration.Theauthorsofthisbook recommendthoroughtestingindevelopmentsystemsbeforededicatingcrawlerimpactrulesto production.Toaddarule,clickCrawlerImpactRulesundertheCrawlingsectionoftheleftnavigation ontheSearchserviceapplication.ChooseAddRule.Enterthenameofthesiteorcontentsourcethatthe ruleshouldapplyto.Ifitisdesirabletorestricttheimpactonthesite,lowerthenumberofrequests (defaultis8).Ifitispossibletoincreasetheloadonthetargetsource,increasethenumber.Ifthesiteis particularlysensitivetoload,choose“Requestonedocumentatatimeandwaitthespecifiedtime betweenrequests.”Addatimeinsecondsthatitwilltakethesitetorecoverfromdeliveringtherequest. Rememberthatlimitingthenumberofconnectionsandaddingapausebetweenrequestswill substantiallyslowthecrawltime.SeeFigure3-20.
Figure3-20.Addingacrawlerimpactrule
88
CHAPTER3■ SETTINGUPTHECRAWLER
CrawlerScheduling SharePoint’scrawlerscanbescheduledtoperformfullandincrementalcrawlsatdifferentintervalsand fordifferentperiods.Thisisdoneseparatelyforeachcontentsource,allowingforstaticcontenttobe isolatedfromrecurringcrawlsanddynamicorfrequentlyupdatedcontenttobeconstantlyrefreshed. TheschedulingconfigurationisdoneontheEditContentSourcepageofeachcontentsourceattheend ofthepage. ItisrecommendedthatSharePointcontenthavearelativelyaggressiveincrementalcrawlschedule whiletakingintoconsiderationactualupdatefrequencyandpossiblehardwarelimitations.Other contentsourcesshouldhavetheirrespectiveusageconsideredbeforeschedulingincrementalcrawls. Itiswisetoscheduleafullcrawlonaregularbasistoensuredatabaseconsistency.However,this regularschedulewilldependlargelyonthetimeittakestoperformafullcrawl.Someorganizationswith largerepositoriesmaychoosetoavoidfullcrawlsaftertheirinitialindexispopulated.Atthetimeof writingthisbook,thereliabilityoftheSharePointindexisunknown,butitshouldbenotedthatsearch databases,likeotherdatabases,aresubjecttocorruptionandafullcrawlmaybeperiodicallyrequired. Figures3-21and3-22showthepartoftheEdit/AddContentSourcespagewhereafullcrawlor incrementalcrawlcanbescheduledandtheManageSchedulespage(accessedthroughthe“Create schedule”and“Editschedule”links)withtheoptionsforschedulingthosecrawls.
Figure3-21.TheschedulingsectionoftheEdit/AddContentSourcepage
89
CHAPTER3■SETTINGUPTHECRAWLER
Figure3-22.TheManageSchedulespage
Fullvs.IncrementalCrawls SharePoint2010hastwotypesofcrawlmechanisms,fullandincremental.Incrementalcrawlsperform moreefficientlyandcankeeptheindexuptodateinnearrealtime(Figure3-23).However,atleastone fullcrawlofacontentsourceisalwaysrequiredandtheremaybeotheroccasionswhenafullcrawlis required. Duringafullcrawl,thecrawlerqueriesthecontentsourceandrequestsallthecontentforthefirst time.ItthensavesthatdataintheindexandcrawldatabasewithdatestampsanditemIDs.Everytimea fullcrawlislaunched,thisprocessisbegunfromscratchandolddataisabandoned. Afullcrawlisrequiredwhen
90
•
Anewcontentsourceisadded—anynewcontentsourcerequiresafullcrawl initially.
•
Anewfiletypeisadded—newfiletypescannotbepickeduponanincremental crawl.
•
Anewmanagedpropertyismappedfromacrawledproperty.
CHAPTER3■ SETTINGUPTHECRAWLER
•
Managedpropertymappingsarechangedoranewcrawledpropertyisaddedto anexistingmanagedproperty.
•
Newcrawlrulesareadded,changed,orremoved—crawlrulemodification requiresafullcrawltotakeeffect.
•
Theindexbecomescorruptedorperformsirregularly—thisshouldalmostnever happenbutshouldnotberuledout.
Duringanincrementalcrawl,thecrawlerlooksatthecrawldatabasetodeterminewhathasbeen crawledornotcrawled,andthenrequestsupdatedinformationfromthesourcedependingonthe contentsourcetype.Inthisway,thecrawlercancollectonlydocumentsthathavebeenaddedor updatedsincethelastcrawlorremovedocumentsfromtheindexthathavebeenremovedfromthe contentsource. Ifasituationexistswhereanincrementalcrawlisinappropriateornotpossible,SharePointwillstart afullcrawlinstead.Inthisway,thesearchindexwillnotallowforthecrawlertostopcrawlingon scheduleandwillnotlaunchacrawlthatwillcorrupttheindex.
Figure3-23.CrawlcontrolinSharePoint2010
91
CHAPTER3■SETTINGUPTHECRAWLER
CrawlingMetadata Metadataisinformationthatisassociatedwithadocumentorfilethatisnotnecessarilyanexplicitpart ofthevisibledocument.Often,metadataisheldinhiddentagsonadocumentorwithfilesorrecords associatedwiththatdocument.SharePoint2010hasapowerfulmechanismtoassignalargenumberof propertiestolistsanddocuments,whichisconfigurablebytheadministratorandupdatablebyauthors andcollaborators.Themanagementofmetadatawillbediscussedlaterinthisbookwhereitis consideredrelevantforimprovingorexpandingsearch.SharePoint2010hasarich,newManaged Metadataserviceapplicationthataddsagreatdealofconfigurabilityandrelevancytosearch,whichwill becovered. Inthissection,wewillcoverhowtocrawlmetadatasuchasmetatags,documentproperties,and SharePointcustomproperties,aswellasseehowtomapthatmetadatatomanagedpropertiestomake themavailableinsearch. ThefirststeptoworkingwithmetadatainSharePointsearchistogetfamiliarizedwiththeexisting propertymappingsandthecrawledproperties.IntheSearchserviceapplicationundertheQueriesand Resultssectionoftheleftnavigation,thereisalinktotheMetadataPropertiespage.Onthispage,allof themanagedpropertiesandtheirmappingstocrawledpropertiesarelisted.Thereareseveraldefault mappings.Manyofthecrawledpropertymappingsareobvious—forexample,People:AccountName (text).Butothersarenotobvious—forexample,Office:5andBasic:6.ThosebeginningwithOWSare fromSharePointlistcolumns. ByselectingCrawledPropertiesatthetopoftheMetadataPropertiespage,alistofallcrawled propertiesandtheirrespectivemappingsisshown.Itispossibletoglean,insomecases,whatthe specificcrawledpropertiesmean.Butinmanycases,theyareamystery.However,thisisgenerallyof littleconsequence.Itisimportanttonamecolumnsthatcontaincustompropertieswithuniqueand tellingnamessothattheymaybeeasilyidentifiedandmappedtomanagedproperties. Bydefault,columnsareindexedbythecrawler,buttheyarenotallmappedtoamanagedproperty andsoarenotsearchable.Theexceptiontothisisthatcrawledtextpropertiesaresearchableasfreetext whenincludedintheindexbutarenotexplicitlysearchableasproperties.Tomapacrawledproperty fromacolumntoamanagedproperty,navigatetotheMetadataPropertiespageintheSearchservice application.SelectNewManagedPropertyatthetopofthepage(seeFigure3-24).
92
CHAPTER3■ SETTINGUPTHECRAWLER
Figure3-24.TheMetadataPropertiespage OntheNewManagedPropertypage,thepropertycanbedefined.Thenameshouldbeindicativeof thecolumnandperhapshavethesamename.Thenamecannotcontainspaces.Usersshouldbeableto enterthisterminthesearchboxwithappropriatesearchsyntaxtoreturndocumentswiththese properties.Usingunusualcodesormysteriousnamingconventionsshouldbeavoided.Declareatypeof propertyandwhetherindividualpropertiesinthecolumnswillholdmultiplevalues.Themultiple valuescheckboxisnotnecessaryifdifferentrecordshaveasinglevalueinthecolumnbutdiffer—onlyif asinglepropertyentryassociatedwithasinglerecordmayhavemultiplevalues. Multiplecrawledpropertiescanbemappedtoasinglemanagedproperty.Thisisusefulwhen indexingseverallists,orlibrarieswithsimilarcolumnsbutdifferentheadingsandhencedifferent crawledpropertynames.Also,differentcrawledpropertiesfromdifferentdocumenttypesorfromother sitescanbemergedintoasingle,searchablemanagedproperty. SelectAddMappingtofindthecrawledpropertytomaptothemanagedproperty.TheCrawled PropertySelectiondialogallowsacategory(suchasSharePoint)tobechosenandatitlefilterappliedto narrowapotentiallylonglistofcrawledproperties.ThetitlefilteriscontrolledbytheFindsearchbox andusesa“contains”operatorsothatanypropertywiththeenteredterminitwillbereturned(see Figure3-25).
93
CHAPTER3■SETTINGUPTHECRAWLER
Figure3-25.The“Crawledpropertyselection”dialog Allmanagedpropertiescanbeallowedtobeusedinscopestomakelogicaldivisionofthesearch index.Thisallowsforsearchinginaparticularsetgroupofdocumentswithspecificproperties.For example,PeopleSearchinSharePointusesascopethatrefinesqueriestoonlythePeopleitemsinthe index.Seemoreonscopesinthenextsection. Finally,managedpropertiesthataretextcanbestoredashashinthedatabase.Todothis,setthe “Reducestoragerequirementsfortextpropertiesbyusingahashforcomparison”checkboxwhen creatinganewmanagedproperty.Thiswillreducetheamountofspacenecessarytostoretheproperties butwilllimitthesearchoperatorsthatcanbeusedtofindthepropertiestoequalityorinequality.
DefiningScopes SearchscopesareaslightlyconfusingconceptinSharePoint,asMicrosofthasadoptedtheterm“scope” torefertoastructurecategorizationofdocumentsbasedonfilteringofdocumentsontheirshared properties.Itisbesttothinkofsearchscopesasgroupsofdocumentsthathavesharedproperties. Whensettingupthecrawler,itispossibletocreatescopesbasedonmanagedproperties.Thiswill allowpre-determinedfiltersetstobeappliedonnewsearchtabsandinsearchboxdrop-downs(must beenabledintheSiteCollectionSearchsettings).Careshouldbetakentocreatescopesthatmatch businessneedsandpossiblefuturesectioningofthecontent.Anymanagedpropertycanbemade availableforscopes,butpropertiesmustbeexplicitlydefinedasavailableforscopesintheEdit ManagedPropertypage.
94
CHAPTER3■ SETTINGUPTHECRAWLER
Tocreateanewscope,navigatetotheScopesmenuitemunderQueriesandResultsontheSearch ServiceApplicationpage.OntheScopespage,theexistingscopescanbeseen.InSharePoint2010,there shouldbetwodefaultscopes,PeopleandAllSites,asshowninFigure3-26.
Figure3-26.TheViewScopespage
AddingorEditingScopes Ascopecanbeeditedbyclickingit.AlternativelyanewscopecanbecreatedbyclickingNewScope. ThiswillopentheCreateScopepage,wherethescopecanbegivenanameanddescriptionandatarget resultpagesetifthedefaultsearchcenterisnotbeingusedforthatparticularscope.Norulesforthe scopewillbeappliedonthispage.Thisisdoneinthenextstep.Afterthenewscopeiscreated,thesite willreturntotheViewScopespage.Herethenewentrywillappearwithalinktoaddrules.IftheAdd Ruleslinkisclicked,anewpagewhererulesforthatscopecanbeappliedwillappear. Therearefourkindsofscoperuletypes: •
WebAddress:ContentcanbedelimitedbasedontheURLofthesitethecontent wasfoundunder.ThisruletypeisbasedontheprotocolandURLofthesite(e.g., http://server/path).Thisrulecanbeappliedonafolder,ahostname,adomain, orsubdomain.Eachsettinghasauniquefieldtoapplytherule.
95
CHAPTER3■SETTINGUPTHECRAWLER
•
PropertyQuery:Ascoperulecanbecreatedthatfiltersdocumentsbasedon commonpropertiesacrossdocuments.Forexample,aparticularcontenttypeor authorpropertycanbeusedtoisolatedocumentsinascope.ThePropertyQuery optiongivesadrop-downofallmanagedpropertiesthathavebeensetas availableforuseinscopes.Theoperatorisalwaysequalsothevalueplacedinthe fieldmustbeanexactmatchtothevalueintheproperty.
•
ContentSource:Ascopecanlimittheresultsettoaparticularcontentsource. ChoosingContentSourcewillgiveadrop-downmenuofallthedefinedcontent sourcesintheSearchserviceapplication.
•
AllContent:Ascopecanalsobebasedonallcontentintheindex.ChoosingAll Contentwillsimplyreturnallcontentinthatscope.
Inadditiontotheserules,specificbehaviorsmaybeappliedforeachruleexceptAllContent.The availablebehaviorsareInclude,Require,andExclude. •
Include:Itemsinthisrulewillbeincludedintheresultsofthisscopeunlessthey areexcludedbyanotherruleappliedtothesamescope.
•
Require:IfRequireischosen,thescopewillnotincludeitemsthatdonotconform tothisrule.Thatis,allitemsmustmatchthisruleregardlessofotherrules.
•
Exclude:Itemsmatchinganexcluderulewillnotbeaddedtothescopeor includedinthesearchresultsetofthescope.
Multiplerulesmaybeappliedforanygivenscope.
ScopeUpdateSchedule Scopeupdates,asarule,happenevery15minutesifsettoautomaticallyrefresh.Ifnecessary,these updatescanbechangedtobemademanually.ThisisdonefromthemainpageoftheSearchService ApplicationpageunderScopeUpdateSchedule.
SettingScopeswithPowerShell ScopescanalsobemanagedwithPowerShellcmdlets.Itispossibletoadd,remove,andeditscopeswith PowerShellaswellasmanagetherulesassociatedwiththescopes. ThefollowingPowerShellcommandsareavailableformanagingscopes: •
Get-SPEnterpriseSearchQueryScope
•
New-SPEnterpriseSearchQueryScope
•
Remove-SPEnterpriseSearchQueryScope
•
Set-SPEnterpriseSearchQueryScope
Additionally,scoperulescanbeadded,removed,andsetusingthefollowingPowerShellcmdlets:
96
•
Get-SPEnterpriseSearchQueryScopeRule
•
New-SPEnterpriseSearchQueryScopeRule
CHAPTER3■ SETTINGUPTHECRAWLER
•
Remove-SPEnterpriseSearchQueryScopeRule
•
Set-SPEnterpriseSearchQueryScopeRule
Inordertosetarule,thescope’snamemustbepassedasaparameterforthecmdletforadjusting thescoperule.Thisisbecauserulesareuniquetoindividualscopes.Forexample,tocreateascope calledPDFandsetthatscopetoincludeonlyitemsofthePDFfiletype,opentheSharePoint2010 ManagementShellconsoleandusethefollowingPowerShellcmdlets: Get-SPEnterpriseSearchServiceApplication | New-SPEnterpriseSearchQueryScope –name PDFs –description "PDF documents only" -displayinadminui $true ThiswillcreateanewscopecalledPDFs.TheDisplayInAdminUIparametershouldbesetto$true(or 1)ifthescopeshouldappearintheSearchserviceapplication’sScopespageinCentralAdministration. Otherwise,setitto$false(or0)tohideit. Aftercreatingthenewscope,itshouldhavesomerulesappliedtoit.Todothis,theIDofthescope isrequired.Otherwise,ifcreatingascopeandaddingrulestoitatthesametime,avariablecanbe assignedtotheNew-SPEnterpriseSearchQueryScopecommandlikethis: $NewScope = Get-SPEnterpriseSearchServiceApplication | New-SPEnterpriseSearchQueryScope –name PDFs –description "PDF documents only" -displayinadminui $true JustlikeontheScopespageintheSearchserviceapplicationinCentralAdministration,thereare fourruletypesyoucansetwithNew-SPEnterpriseSearchQueryScopeRule.Herearetheruletypesand examplecmdlets. •
WebAddress:TocreateawebaddressruleinPowerShell,thecmdlettakestheURL valueintheruletypeparameter.TheparameterURLScopeTypemustalsobeset. ThevaluesthatthisparametertakesareFolder,HostName,orDomain,justlikein theScopespageinCentralAdministration.Finallyavaluefortheparameter MatchingStringmustbeset.Thisisthestringofthewebaddressyouwanttoset. Thecmdletwouldlooksomethinglikethis: New-SPEnterpriseSearchQueryScopeRule -ruletype Url –matchingstring http://prosharepointsearch/demos -urlscoperuletype Folder –filterbehavior Include -url http://prosharepointsearch -scope $NewScope
•
PropertyQuery:Creatingapropertyqueryruleisprobablythemostcommon.This ruletyperequiresanameforthemanagedpropertythatwillbeusedandthe valuethatthemanagedpropertywillcheck.Italsoneedsafilterbehaviorasinthe Scopespage,aURL,andthespecificscopetoapplyittoandthesearch application. New-SPEnterpriseSearchQueryScopeRule -ruletype PropertyQuery -managedproperty filetype -propertyvalue pdf -filterbehavior Include -url http://prosharepointsearch -scope $NewScope
•
ContentSource:Thereisnospecificruletypevalueforcontentsources.Thisis becausecontentsourceisamanagedpropertyinSharePoint.Tosetthescopeby contentsource,usethePropertyQueryvalueintheruletypeparameterandsetthe nameofthecontentsourceasthevalue. New-SPEnterpriseSearchQueryScopeRule -ruletype PropertyQuery –managedproperty
97
nioperahs/:trcsh.eta
CHAPTER3■SETTINGUPTHECRAWLER
ContentSource -propertyvalue "Local SharePoint Sites" -filterbehavior Include –url http://prosharepointsearch -scope $NewScope •
AllContent:TheAllContentscoperuleisquitestraightforwardasitsimply includesallcontent.Usethefollowingcmdlet: New-SPEnterpriseSearchQueryScopeRule -ruletype AllContent -url http://prosharepointsearch. -scope $NewScope
CrawlingOtherDocumentTypeswithiFilters NotallfiletypesarecrawledbySharePointoutofthebox.Therefore,itisimportanttoidentifythefile typesthatareimportanttotheorganizationandmakesuretheyarebothcrawledandsearchable.Itis probablynotpossibleordesirabletocrawlallfiletypesfoundinanorganization(especiallythose lingeringonfileshares);however,somethoughtshouldbegiventowhichfiletypesholdcontent relevanttothebusiness’sneeds.
AddingaFileTypetotheContentIndex Thefirstmeasuretotakeafteridentifyingapotentiallyunsupportedfiletypeistoaddittothecontent index.ThisisdoneintheCentralAdministrationundertheSearchserviceapplication.Ontheleftmenu isdisplayedtheFileTypesmenuitemundertheCrawlingsection(seeFigure3-27).
Figure3-27.TheCrawlingmenuontheSearchServiceApplicationpage TheFileTypespageholdsalistofallrecognizedfiletypesfortheSharePointcrawler(Figure3-28). ThemostcommonfilesfoundinaSharePointenvironmentandallMicrosoftOfficefiletypesare representedhere.However,manyfiletypescommontomostorganizations,suchasPortableDocument Format(PDF)andRichTextFormat(RTF),arenotaddedoutofthebox.Manyotherfiletypesmayalso befoundinorganizations.Manyareuniqueandcomplicatedfileformats.Othersarejustdifferent namesforplaintextfiles.ItwouldbeamajorundertakingforMicrosofttosupportevenafractionof them.InsteadMicrosofthascreatedamechanismforaddingnewfiletypesandconvertingtheminto somethingSharePoint’scrawlercanrecognize.
98
CHAPTER3■ SETTINGUPTHECRAWLER
Toaddanewfiletype,clicktheNewFileTypelinkatthetopofthepage.Anewfiletypemay alreadybeasupportedformat,butthefileextensionmightnotberecognizedbySharePoint.For example,therecanbemanyvariationsoffilenameextensionsforflattextfiles(e.g.,.log).SeeFigure329.Additionally,somefiletypeswillnotappearbydefaultbutcanberecognizedanddecodedbythe defaultiFilters.Ifitisnecessarytocrawlthesefiles,addingthemisasimplebutrequiredtask.
Figure3-28.TheFileTypespage
99
CHAPTER3■SETTINGUPTHECRAWLER
Figure3-29.AddingtheLogFileFormat(.log)filetypeforSharePointtocrawl SomefileswillrequiretheadditionofaniFilter.AniFilterisacomponentthatcandecodeaspecific filetypeandallowthecrawlertounderstandandstorethetextandmetadatafromitinitsdatabasesand index.AlthoughmanyiFiltersareprovidedforfreefromMicrosoftandothersources,notallareinstalled bydefaultbySharePoint2010.FindingandinstallingtheseiFilterscanbenecessarytoindexcertainfile types.OneofthemostcommonfiletypesfoundthatisnotsupportedbydefaultinSharePointisthe RichTextFormat(RTF);anotheristhePortableDocumentFormat(PDF). ToaddthePDFformat,itisrecommendedthatyouacquireaninstallableiFilterfromAdobeor anotherthird-partyvendor.Otherthird-partyvendorsofferiFiltersthathavealargerrangeof compatibilitywithdifferentPDFgenerationtypesandperformsignificantlybetterthanAdobe’sbut comewitharelativelymodestpricetag.DependingonwhattypeofPDFfilegeneratoranorganization usesandhowmanyPDFdocumentsithas,itmayopttouseathird-partypaid-foriFilter.Considering therelativelylowcostsoftheiFilters,theauthorsofthisbookwouldhighlyrecommendchoosingiFilters fromoneofthevendorsinChapter11.
InstallingAdobe’siFilter AcrobatiFiltercanbeacquiredfromAdobe’swebsite.Itwillbenecessarytodownloadandinstallthe 64-bitversionavailablefromwww.adobe.com/support/downloads/detail.jsp?ftpID=4025.Atthetimeof thisbook’spublication,thelatestversionwas9.0.Theinstallationrequiressomeadditionalinstallation steps.ThesestepsareoutlinedinthePDFguideavailableonthedownloadlinkonAdobe’ssite
100
CHAPTER3■ SETTINGUPTHECRAWLER
(www.adobe.com/special/acrobat/configuring_pdf_ifilter_for_ms_sharepoint_2007.pdf).Theguideis targetedforMicrosoftOfficeSharePointServer2007,butthesameinstructionsapplyexceptforthe locationoftheregistrykey.Thebasicsofinstallingthe64-bitiFilterareasfollows: 1.
DownloadtheiFilter.
2.
Runtheinstaller.
3.
Opentheregistry(Regedit.exe)andaddthe.pdffileextensionvaluetothe filterextensioncontainer(Figure3-30)at \\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension.The defaultvaluethatshouldbeappliedis{E8978DA6-047F-4E3D-9C78CDBE46041603}.
4.
AddanicontotheiFilterinstall(see“AddingIconstoFileTypes”).
5.
RestarttheSearchserviceapplicationbyrunningServices.mscattherun dialog,findingtheSharePointServerSearch14service,andrestartingit.
6.
Performafullcrawl.
Figure3-30.Thenew.pdfregistrykeyintheregistry OtheriFiltervendors’installationprogramsperformthesetasksautomatically.However,itisalways necessarytoperformafullcrawltoretrievenewfiletypes.PleasefollowtheiFiltervendor’sinstructions whenaddinganewiFilter. BeforePDFdocumentsoranynewfiletypecanbecrawled,theSearchserviceapplicationwillneed toberestarted.TheeasiestwaytodothisistogototheServicessnap-inbytyping“services.msc”inthe searchboxintheStartmenuontheserver,findtheSharePointServerSearch14service,andrestartit (seeFigure3-31).Aftertheserviceisrestarted,itwillbenecessarytolaunchafullcrawltopickupany PDFfiles.Forthisreason,itiswisetoinstallthePDFiFilterbeforestartingthecrawleronalarge documentsetforthefirsttime.
101
CHAPTER3■SETTINGUPTHECRAWLER
Figure3-31.RestartingtheSearchserviceintheServicessnap-in
■NoteTheSearchserviceapplicationcanalsoberestartedusingtheNET STARTandNET STOPcommandsfrom acommandprompt.ThenameoftheSearchserviceapplicationisOSearch14.
IndexingRichTextFormatFiles AddingtheRichTextFormat(RTF)filetyperequiresfindingtheRTFiFilterontheserveroron Microsoft’swebsiteandinstallingandregisteringitontheSharePointindexserver.Additionally,adding theRTFfiletypeisnecessary.
102
1.
CheckiftheRTFiFilterisontheserver.Itiscalledrtffilt.dllandisinthe %windir%\system32folder(probablyC:\Windows\System32).Ifitisn’tthere,the self-extractingRTFiFilterfilertf.execanbedownloadedfromMicrosoft’s website(http://support.microsoft.com/kb/291676/en-us).
2.
RegistertheiFilterwiththeregsvr32 commandatacommandpromptby placingthislineintherundialog:regsvr32 rtffilt.dll.
CHAPTER3■ SETTINGUPTHECRAWLER
3.
AddtheRTFfiletypetotheFileTypespageinCentralAdministration,as showninFigure3-32.
4.
RunServices.mscattherundialog,findtheSharePointServerSearch14 service,andrestartit.
5.
Startafullcrawl.
Figure3-32.AddingtheRichTextFormat(.rtf)filetype
AddingorChangingtheFileTypeIcon Newfiletypeswillusuallynothaveaniconassociatedwiththem.SharePointSearchwilldisplaya defaultblankiconinsuchcasesafterthefiletypehasbeenadded.Evenifthereisadefinitionalready there,manyorganizationswillwanttoadjusttheiconstomatchtheirownstylerequirements.
103
CHAPTER3■SETTINGUPTHECRAWLER
Toaddanewfiletypeiconorchangetheexistingone,firstthenewiconmustbecopiedtothe C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\ directory.Imagescanbedownloadedorcreated.Theyshouldbeiconsize,roughly16pixelsby16pixels. ForPDFfiles,Adobeoffersafree17-pixel-by-17-pixelicon,withsomelegalrestrictions,at www.adobe.com/misc/linking.html#pdficon.Thiswillalsowork,butlargericonsmaycauseformatting problems. AftertheiconisaddedtotheIMAGESdirectory,theDOCICON.xmlfileintheC:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XMLdirectoryneedstohaveakeyadded totellSharePointthenameofthenewfiletype’sicon.ForthePDFicon,thelineshouldread,wherepdficon.gifisthenameoftheiconyousavedtothedirectory.
■NoteSinceafullcrawlwillbeneededtoincludenewfiletypes,itisadvisabletoaddanyiFiltersandfiletypes beforeafullcrawlinalargeproductionenvironment.
FederatedSources AnothergreatfeaturesupportedinSharePoint2010istheabilitytoaddfederatedsources.Federated sourcesarethosesourcesthatarenotdirectlycrawledbySharePoint’scrawlersbutcanstillbesearched byqueryingandaccessingtheindexesofexternalsystems.Thisisdonebyqueryingthesearch mechanismofthatexternalsource,retrievingtheresultset,andthenformattinganddisplayingitwithin theSharePointsearchinterface. FederatedsourcescanbeeitherSharePointsitesorsitesthatconformtotheOpenSearch1.0or1.1 standards.Thesestandardsdefinehowsearchqueriesshouldbepassedandhowthedataisstructured andreturned. Newfederatedsourcescanbedefinedoranexistingtemplatecanbedownloadedandimported.To createanewfederatedsource,clickNewLocationandfilloutthefieldswiththeappropriatesettings. Everysourcerequiresanamethatwillalsobeusedinthesearchcenter.
CreatingaNewFederatedSource Whencreatinganewfederatedlocation,anameandadisplaynameshouldbedefined.Thedisplay namewillbeshownonthefederatedsearchWebPart.Adescriptionofthesourceisalsorequired(see Figure3-33).
104
CHAPTER3■ SETTINGUPTHECRAWLER
Figure3-33.Defininganewfederatedlocation Triggerscanbesetonallfederatedlocationstodictatewhatqueriesaresenttothefederated locationsandhowtheyaresent. Therearethreebasictriggers: •
Always:Sendallqueries.
•
Prefix:Useatriggerprefixtosendqueries.
•
Pattern:Useapatterntriggertosendboththetriggerandthequeryinanew patternthatmaybeadjustedwithregularexpressions.
IfAlwaysischosen,anysearchqueryorphrasewillalsobepassedtothefederatedsource;ifPrefixis set,itwilllookforaparticulartermandthenpassthefollowingtermsasthequery.Inthisway,thefirst term(thetriggerterm)canbeusedtoindicatewhichfederatedsourceshouldbequeriedtosupplythis information(Figure3-34).SoifthePrefixtriggeris“pics”,itmightbeadvisabletofederateinFlickror someotherimagesearchengine.IfthePrefixtriggeris“weather”,itmightbeadvisabletosendthequery toweather.com.Thiswillrequireacertainleveloftrainingforenduserssotheyunderstandwhich triggerswillactionwhichinformationtoappear.FederatedsearchresultsappearinaseparateWebPart ontheresultspage.ThisisdiscussedinmoredetailinChapters6and7.
105
CHAPTER3■SETTINGUPTHECRAWLER
Figure3-34.Settingtriggersinanewfederatedlocation Locationinformationmustbeprovided.IfanOpenSearch-compliantsiteisbeingused, OpenSearchshouldbesethere.Additionally,aquerytemplateshouldbespecified.Thisqueryshouldbe theURLtotheOpenSearch-compliantRSSfeedwherethequerytermisreplacedbythe{searchTerms} value.Thisiscalledaquerytemplateinthestandard.Thisoffersacertainamountofflexibility,andthe {searchTerms}valuecanbemixedwithotheracceptedparameterstoprovidemoreexactresults.For example,onGoogle’sblogsearchfeed,wecanfilterintotheresultsetbyclickingsomeoftheoptionson thepage.Itispossibletosorttheresultsetbydate,andtheparameterscoring=disaddedtothequery URI.Thislistofparameterscanbecapturedfromtheaddressbarofthebrowserandmodifiedwiththe {searchTerms}valuetocreateaquerytemplatethatreturnsresultssortedbydate.Notallparametersare supportedbyRSSfeedsastheyaregenerallyseparateapplicationsthatarenotamainconcernforthe searchproviders.However,oftenRSSfeedsandtheOpenSearchdefinitionswillsupportsomeadded functionality. FortheOpenSearch-compliantRSSfeedforblogposts,searchfromGoogle, http://blogsearch.google.com/blogsearch_feeds?hl=en-us&q=sharepoint&lr=&ie=utf-8&num=10;ifwe replacethequeryterm“sharepoint”withthe{searchTerms}valueandaddtheparameterscoring=d,we willgetthequerytemplatehttp://blogsearch.google.com/blogsearch_feeds?hl=enus&q=sharepoint&lr=&ie=utf-8&num=10&scoring=d,whichcanbeusedtocreateafederatedsourcethat retrievesblogpostssortedbydate.
106
CHAPTER3■ SETTINGUPTHECRAWLER
ThepropertiesdisplayedcanalsobemodifiedbymodifyingXSLTintheDisplayInformation section.Dependingonwhichproviderisfederated,itmaybenecessarytoprovideacustomXSLT. ProvidersdoprovideanOpenSearchdeclarationthatcanbeusedasastartingpoint,andtheexample XSLTdefinitionsfromthelocationsavailableforimportwillhelp.
■NoteTofederatesearchfromSAPNetWeaver,SAPhasadetailedhow-todocumenthere: www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70bce92e-d355-2d10-9993890bb7b19381?QuickLink=index&overridelayout=true.
ImportingaFederatedLocationfromMicrosoft’sFederatedSearch ConnectorGallery Toimportalocation,apreconfiguredfederatedlocationmustbedownloadedandimported.The availablefederatedlocationdownloadsareavailablefordownloadfromMicrosoft’sFederatedSearch ConnectorGalleryforEnterpriseSearch:http://technet.microsoft.com/en-us/enterprisesearch/ ff727944.aspx.Twofiletypesaregiven,anFLDfileandanOSDXfile.SharePoint2010requiresthe OSDXfile.EarlierSharePointsearchproductsrequiretheFLDfiles.TheyarebasicallyjustXMLfileswith thesettingsforthefederatedlocations.Theycanbeeditedmanually,butenteringanewlocationwillbe easier. Afterdownloadingthefederatedlocationdefinitionfile,itcanbeimportedwiththeimport commandandeventuallyeditedtomatchtherequiredsettings.
■NoteYoumayhavetorestarttheSearchserviceapplicationforchangestotakeeffect.
Itisalsopossibletodefineafederatedlocationasasearchindexonthisserver.Thiswillprovide searchresultsintheFederatedResultsWebPartsfromalocallystoredindex.Thisisnotthesettingfor federatingresultsfromaremoteSharePointsite.TogetfederatedcontentfromanotherSharePoint server,usetheOpenSearchspecificationandtheRSSfeedofthesearchresultsfromtheremote SharePointsite.
■TipTheFederatedSourcespageisaquickwaytoseeanoverviewofthesourcegroupsforsearch,thenumber ofquerieseachhasreceivedinthelast30days,andtheirclick-through.
107
CHAPTER3■SETTINGUPTHECRAWLER
Summary Thegoalofthischapterwastoprovidedetailedguidanceonsettingupthecrawlerandaddingcontent sources.Inaddition,itaddressedcrawlingissuesandadditionalsettingsintheSearchservice applicationnecessarytocrawlingtypicalkindsofenterprisecontent.Italsolookedathowtoconfigure thecrawlerforspecialdocumenttypesandhowtoaddiFiltersfordocumenttypesthatarenot supportedoutoftheboxbySharePoint. Itiswise,ifnotcritical,toconsiderthesesettingsbeforebuildingtoomuchofanenterprisesearch implementationwithSharePoint,ascrawlinglargedocumentsetscantakedays,ifnotweeks,andmany settingsinthissectionrequireafullcrawlafteradjustment.
FurtherReading Herearesomesuggestionsforfurtherreadingormoredetailsonthetopicscoveredinthischapter.
Indexing TodownloadtheindexingconnectorforDocumentum,gohere:www.microsoft.com/downloads/ en/details.aspx?FamilyID=32D0980A-4B9A-4B0D-868E-9BE9C0D75435&displaylang=en. Toreadaboutcrawlingcase-sensitiveURLs,seethisblogpost:http://blogs.msdn.com/ b/enterprisesearch/archive/2010/07/09/crawling-case-sensitive-repositories-using-sharepointserver-2010.aspx.
CrawlRules Toreadmoreaboutregularexpressionsincrawlrules,see:http://blogs.msdn.com/b/ enterprisesearch/archive/2010/01/21/regular-expressions-support-in-crawl-rules.aspx.
Scopes ForalistoftheparametersandmoreinformationoncreatingscoperuleswithPowerShell,see: http://msdn.microsoft.com/en-us/library/ff608132.aspx.
FederatedSources FormoreinformationontheOpenSearchproject,visitwww.opensearch.org. Alistofsitesthatlistsearchenginesandsitesthatsupporttheformatsisalsoavailableat www.opensearch.org/Community/OpenSearch_search_engine_directories.
108
CHAPTER 4
■■■
Deploying the Search Center Aftercompletingthischapter,youwillbeableto •
Understandtheout-of-the-boxsearchuserinterfaces
•
DeploytheBasicandEnterpriseSearchCenters
•
Redirecttheuniversalsearchboxtoasearchcenter
•
AddsearchWebPartstoaWebPartpage
Beforewecanmoveforwardwithintroducingthepiecesofthesearchuserinterface,weneedto outlinethestepsofsettingupanddeployingthesearchcenter.ThesearchcenterisasiteinSharePoint 2010thatprovidessearchresultsandcanbemodifiedtomeetanorganization’sparticularsearchneeds. ThischapterwillintroducethetemplatesavailablefordeployingsearchtoaSharePointsite collection.Itwillthenhighlightthedifferencesbetweenthedifferentsearchcentersandpresentstepby-stepinstructionsonhowtodeployeachtype.ItwillclosethingsoutbydeployingWebPartsto standardpages.
UnderstandingtheSearchCenter Strictlyspeaking,thesearchcenterisnotarequiredelementforsearchtofunctioninSharePoint2010. IndividualsearchWebPartscanbeaddedtoanypageonasiteandperformavarietyofsearchtasks. Also,SharePointcomeswithadefaultresultspagethatwilldisplayresultsfromthequeriestothe standardsearchboxonallpages.However,agoodstartingpointforsettingupandtestingsearchisto usethesearchsitetemplatesprovidedandcreateasearchcentertowhichquerieswillberedirected. Beforethatcanbedone,though,onemustfollowashortsetofsteps.OnceSharePointhasbeen installed,somecontentadded,andthefirstinitialcrawlrun,theadministratorcangotothedefaultsite collectionandsearch.Thesearchcanbeperformedbythesearchboxthatappearsonthetoprightof everypageinthedefaultSharePointsitecollectionandwillappearonnewsitecollectionsastheyare created(Figure4-1).Itcanbemodifiedorremovedbymodifyingthedesignelementsofthesite collection,butthatwillnotbecoveredinthisbook.
109
CHAPTER4■DEPLOYINGTHESEARCHCENTER
Figure4-1.Thesearchbox Ifasearchisperformedfromthissearchbox,thesearchquerywillbepassedtoasearchresults pageandsearchresultswillbedisplayed.However,thissearchresultspage,called OSSSearchResults.aspx,isthedefaultsearchpageandwilldisplaytheresultsforthegivensite collection.However,mostsiteadministratorswillwanttocreateacustomsearchandresultspagethat userscanaccessbothviathesearchboxandviaasearchpage.AlthoughtheindividualWebPartscanbe addedtopagestocreateatotallycustomsearchandresultspageanywherewithinasitecollection,this customsearchandresultspageisusuallydeployedasasiteunderthesitecollectionusingeitherthe BasicorEnterpriseSearchsitetemplates. Thereareseveraladvantagestothis.Bycreatingasearchcenterwithasearchsitetemplate,the SharePointadministratorcandothefollowing: •
Giveusersasitetonavigatetoforsearchinsteadofusingthesearchboxtogetto theresultspage
•
Customizethesearchexperiencewithadvancedsearchcapabilities
•
Accesssearchpreferences
•
Utilizetabstocreateacustomsearchscopingexperience
•
Shareasearchcenteracrosssitesorcollections
•
Separatesearchbycollection
Basicvs.EnterpriseSearchCenters TherearetwositetemplatesforsearchdeliveredwithSharePoint2010:theBasicSearchCenterandthe EnterpriseSearchCenter.TheBasicandEnterpriseSearchCentersvaryinseveralwaysandbothare includedinthestandardlicenseforSharePoint.IftheSharePointServerPublishingInfrastructure featureonthesitecollectionhasnotbeenactivated,thentheBasicSearchCenteristheonlyfunctional option.TheEnterpriseSearchCentertemplatewillappearbutwillcauseanerrorifchosen(seemorein thesectionondeployingtheEnterpriseSearchCenter).
■NoteTheEnterpriseSearchCenteristheSharePoint2010replacementofthe“MOSS2007SearchCenterwith Tabs”publishingsitetemplate.TheBasicSearchCenteristheSharePoint2010equivalentofthe“MOSS2007 SearchCenterLite.”
110
CHAPTER4■DEPLOYINGTHESEARCHCENTER
TheEnterpriseSearchCenter TheEnterpriseSearchCenterprovidesatab-basedinterfaceinwhichuserscanjumpbetweenseveral searchpages.AnexampleofthiscanbeseeninFigure4-2.Thetwotabs,AllSitesandPeople,are providedbydefault,butadditionaltabscanbeadded.Thesetabscanbefullycustomizedtocatertothe needsofaparticularorganization.Byselectingthedifferenttabsabovethequeryfield,userscandirect theirsearchestodifferentscopes.
Figure4-2.TheEnterpriseSearchCenter ThemostimmediatelyapparentbenefitoftheEnterpriseSearchCenteristheavailabilityofthe PeopleSearchtab.TheBasicSearchCenterdoesnotincludeaPeopleSearchtab,soifthisisrequired, enablingtheSharePointServerPublishingInfrastructurefeatureanddeployingtheEnterpriseSearch Centerarerecommended.Aswillbeshownthroughoutthebook,thetabsprovidedintheEnterprise SearchCenterallowuserstoquicklyexecutesearchesagainstdifferentscopes.Administratorscanadd oneormoreadditionalcustomizedsearchcenterswhenusingtheEnterprisetemplatethroughthese tabs.Customizedsearchcentersmayaddsimplecontrasts,suchasdirectingsearchestodocumentsor people,butmaybemoreadvanced,suchassearchingagainstdifferentphysicallocationsor departments.Thisprovidesarangeofflexibilityfororganizationswithacentralenterpriseportalthat needstoprovideasearchexperiencetoarangeofindependentdepartmentsorusergroupswith distinctlydifferentneeds.Forexample,whilethesalesdepartmentneedstosearchagainstcustomer profilesandmarketingdocuments,theaccountingdepartmentneedstofindinformationpertainingto contractdates,expensereports,andpurchasehistory.Theexperienceeachdepartmenthopestoget fromsearchisdifferent.Creatingseparatesearchcentersthatdisplayresultsbasedondifferent properties,providedifferentrefinementpanelcategories,orevenpresentresultsinadifferentformat mayprovideabetterexperienceforeachofthesegroups.
111
CHAPTER4■DEPLOYINGTHESEARCHCENTER
AdministratorscancontrolaccessforeachEnterpriseSearchCentertab.Intheforegoingcase,they maychoosetoallowonlythesalesandaccountingdepartmentsaccesstotherespectivesearchtabs, whileallowingthehumanresourcesdepartmentaccesstoboth.Properlyestablished,securitytrimming inSharePointensuresthatemployeescanaccessonlythesitesthattheyareallowedtoview.
DeployingtheEnterpriseSearchCenter IfPeoplesearchisrequiredordesired,itiswisetodeploytheEnterpriseSearchCenter,whichhasa templatewithalltheelementsofPeoplesearchalreadyset.AlthoughtheEnterpriseSearchCenter templateisvisibleonstandardSharePointdeployments,itrequirestheSharePointServerPublishing Infrastructurefeature. TodeploytheEnterpriseSearchCenter,followthesestepsandrefertoFigure4-3.
112
1.
Navigatetothetoplevelofyoursitecollectionwhereyouwantthesearch center.
2.
Loginasasitecollectionadministrator.
3.
ChooseSiteActions,CreateSite.
4.
NamethesearchcenterintheTitlefield.
5.
GiveapathforthesearchcenterunderWebSiteAddress.
6.
ChoosetheEnterprisetabundertheTemplatesection.
7.
ChoosetheEnterpriseSearchCentertemplate.
CHAPTER4■DEPLOYINGTHESEARCHCENTER
Figure4-3.DeployinganEnterpriseSearchCenter
■NoteIfyougetanerrorcreatingthesite,itislikelythePublishingfeatureactivationfailed(Figure4-4).Ifyou copythecorrelationIDfromtheerrorpageandlookinthemostrecentULSlogatC:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS,youwillfindanerrorsimilartothis: Exception: System.InvalidOperationException: The SharePoint Server Publishing Infrastructure feature must be activated at the site collection level before the Publishing feature can be activated.
ThisindicatesthePublishingfeatureneedstobeactivatedatthesitecollectionlevelbeforetheEnterpriseSearch Centercanbeused.Activateit,andtrytodeploythesearchcenteragain.
113
CHAPTER4■DEPLOYINGTHESEARCHCENTER
Figure4-4.TheSharePointServerPublishingInfrastructurefeature
TheBasicSearchCenter UnliketheEnterpriseSearchCenter,theBasicSearchCenterprovidesusersonlywiththeabilityto executebasicandadvancedsearchesagainstoneuniversalaccesssearchexperience.Thelackofbuilt-in tabsthatallowfordifferentsearchexperiencescanbeseeninFigure4-5.WhiletheBasicSearchCenter canbecustomizedtoprovideaspecializedexperienceforusers,everyuseronthesearchcenterwill returnresultsfromthesamecontentsourcesinanidenticallayout.Inaddition,asnotedearlier,the BasicSearchCenterdoesnotprovideapre-deployedtabforPeoplesearch.Themainbenefitofthis searchcenterissimplicity,asitallowsforquickdeploymentofsearchfunctionalityonanySharePoint sitecollection.
Figure4-5.TheBasicSearchCenter
114
CHAPTER4■DEPLOYINGTHESEARCHCENTER
DeployingtheBasicSearchCenter TheBasicSearchCentergivessearchandresultfunctionalitywithadvancedsearchandpreferencesbut withoutabuilt-in,pre-definedPeopleSearchtab.SeeFigure4-2. TodeploytheBasicSearchCenter,followthesestepsandrefertoFigure4-6. 1.
Navigatetothetoplevelofyoursitecollectionwhereyouwantthesearch center.
2.
Loginasasitecollectionadministrator.
3.
ChooseSiteActions,CreateSite.
4.
NamethesearchcenterintheTitlefield.
5.
GiveapathforthesearchcenterunderWebSiteAddress.
6.
ChoosetheEnterprisetabundertheTemplatesection.
7.
ChoosetheBasicSearchCentertemplate.
■NoteItisbesttonameyoursearchcenter“Search”.Althoughmanyadministratorscomeupwithclevernames forsearchfortheirorganizationorportal,itisreallybesttokeepitsimple.Thepathcanalsobe/search/unless thereisagoodreasontonameitotherwise.
115
CHAPTER4■DEPLOYINGTHESEARCHCENTER
Figure4-6.CreatinganewBasicSearchCenter
RedirectingtheSearchBoxtotheSearchCenter Afterthesearchcenterhasbeendeployed,itwillbepossibletomakesearchesfromthecenter’ssearch page,modifypreferences,andperformadvancedsearchesfromtheAdvancedSearchpage.However, themainsearchboxthatappearsonallpageswillstillpointtoOSSSearchResults.aspx.Soyou’llneedto directthesequeriestothesearchcenteryouhavecreated.Formultiplesitecollectionsthatsharea singlesearchcenter,redirectingthissearchboxtothesharedsearchcentercanbeextremelyuseful. Tomodifythetargetofthesearchbox,followthesestepsandrefertoFigure4-7.
116
1.
Navigatetothetoplevelofthesitecollections.
2.
ChooseSiteActions,SiteSettings.
3.
UnderSiteCollectionAdministration,chooseSearchSettings.
4.
IntheSiteCollectionSearchResultpagefield,defineyournewsearchresults page.IfyounamedyourBasicSearchCenter“Search”,thispathwillbe /Search/results.aspx.IfyoucreatedanEnterpriseSearchCenterandnamed it“Search”,thepathwillbe/Search/Pages/results.aspx.
CHAPTER4■DEPLOYINGTHESEARCHCENTER
Figure4-7.Changingthesearchboxtarget ThesearethebasicstepsnecessaryfordeployingasearchcentertoSharePoint2010.Usingoneof thebuilt-insearchcentersisthequickestwaytogetafeature-rich,customizablesearchuserinterface. However,aspreviouslymentioned,searchdoesworkoutoftheboxandmanyorganizationscangetby usingthedefaultOSSSearchResults.aspxresultspage.Forothers,eventhesearchcentersarenotenough orperhapsnotflexibleenough.ThiswillrequirethemtocreatetheirownWebPartpagesanddeploythe searchWebPartsindividuallytothem—orperhapsdeploythemtoothersitepagesorevencreatetheir ownWebParts(asdiscussedinChapter8).
WebPartDeployment ItispossibletodeploysearchonyourSharePoint2010installationwithoutactuallydeployingasearch center.BothsearchandresultWebPartscanbeaddedtonormalpageswithoutusingthebuilt-in templates.ThemethodofdeployingthesearchWebPartsisthesameasdeployinganyotherWebPart onSharePoint2010.Infact,allthefunctionalityoftheBasicandEnterpriseSearchCenterscanbe recreatedbybuildingasitewiththesearchWebParts.However,thisisalengthytask,andmostifnotall ofthesearchfunctionalitynecessaryformostorganizationsisavailableonthesearchcenters.Therefore, unlessextremelycustomsearchusageisrequired,itisrecommendedtousethebuilt-intemplatesand deployasearchcenter.
117
CHAPTER4■DEPLOYINGTHESEARCHCENTER
AddingWebParts ToaddWebPartstoanexistingpage,dothefollowing: 1.
ChooseEditPageunderSiteActionswhileloggedinasasiteadministrator.
2.
SelectEditingToolsandInsert.
3.
ClickWebPart.
4.
ChoosetheSearchcategoryandthesearchWebPartyouwanttoadd (Figure4-8).
5.
Saveandclosetheeditorunderthepagemenuintheribbon.
Figure4-8.AddingsearchWebParts AftertheWebPartsareaddedtothepage,thetargetofthesearchboxcanbeaddedbyeditingthe WebPartorcustomizationstothepartsmade.InFigure4-9,asearchboxandcoreresultsWebParthave beenaddedtothehomepageofthedefaultSharePointsite.
118
CHAPTER4■DEPLOYINGTHESEARCHCENTER
Figure4-9.AcrudeexampleofaddingsearchWebPartstoapage AbetterexampleofwhentoaddthesearchWebPartstoanon-searchpagewouldbefordisplaying adiversesetofdocumentsorpagesinasinglelistregardlessoftheirlocationinSharePoint.Thiscould bealistofthelatesttendocumentsthathaveagiventerminthemordocumentsbyaspecificauthor. UsingtheresultWebPartaloneonaWebPartpageandsettingafixedqueryforthatWebPartcanallow thisinformationtobedisplayedanywhereonthesitethattheadministratordeemsuseful.SeeChapters 6and7formoreinformationaboutdeployingandcustomizingthesearchWebParts.
Summary Inthischapter,welookedatthesearchuserinterfacesavailablefordeploymenttoSharePointsite collections.WelookedatthedifferentfunctionalityavailableintheBasicandEnterpriseSearchCenters andoutlinedthestepstodeployeachone.Additionally,webrieflylookedatdeployingthesearchWeb PartstoWebPartpagesinSharePoint.
119
CHAPTER 5
■■■
The Search User Interface Aftercompletingthischapter,youwillbeableto •
NavigatethesearchuserinterfaceinSharePoint2010
•
CreatealertsandRSSfeedsforsearchresultsets
•
Usefederatedresults
•
Filtersearchresultswithrefinersandscopes
•
Useadvancedsearchsyntaxtoadjustsearchqueries
•
LeveragetheAdvancedSearchpagetobuildcustomsearchqueries
•
LookforpeoplebyusingthePeopleSearchpage
•
Setsearchpreferencesforlanguagesandsuggestions
Sofar,thisbookhasprovidedathoroughwalkthroughofplanningthesearcharchitecturein SharePoint2010withconsiderationsofscalabilityandredundancy.Ithaswalkedthroughthe installationanddeploymentofthesearchserviceswithadeepdiveintosettingupthecrawlerfor variouscontentsources.Bythisstageinthereading,itisexpectedthatthereaderunderstandsthebasic termsofSharePoint2010SearchdiscussedinChapter1,andhasdeployedinfrastructure,installedthe software,andconfiguredthebasicservicesforsearch.Atthispoint,allofthebasicbuildingblocks shouldbeestablished,andtheabilitytoexecutequeriesshouldbeavailable. Thischapterdiscussesthesearchuserinterface,whichreferstoanyend-userexperiencestiedto search.Unliketherestofthisbook,thecontentofthischapterisdesignedtobeaguideforendusersas muchasforadministrators.Awiderangeoftopicsisdiscussed,suchasthequerybox,searchcenter, querysyntax,searchresults,andmanipulationofresults.Thischapterprovidesafront-enduser walkthroughofthesearchexperiencetoaidintheunderstandingofhowtouseSP2010Search;itdoes notdiscusstheconfigurationandmanipulationofthebackendofthisexperience.Thenextchapterwill providedetailedexplanationsonhowtomanipulateandconfigurethesearchcentersandfeatures discussedinthischapter. Thischapterstartswithamorein-depthreviewofthequerybox,whichwasfirstintroducedin Chapter1.Wethenprovideathoroughintroductiontothesearchcenteralongwiththedifferenttabs andpagesitcontains.Thechapterthentakesadeepdiveintoeachpageofthesearchcenterindetail, startingwiththeAllSitesresultspage.ThepurposeanduseofallthemajorsearchWebPartsare explainedbeforemovingintoadvancedquerysyntax.Thechaptercompleteswithwalkthroughsofthe AdvancedSearchpage,Peoplesearchpage,andfinallythePreferencespage.TheAdvancedSearchpage,
121
CHAPTER5■THESEARCHUSERINTERFACE
Peoplesearchpage,andPreferencespageleveragemanyofthesameWebPartsandquerysyntaxfirst introducedinregardstoAllSitessearch.Inaddition,theWebPartsandquerysyntaxintroducedinthis chapterformthecorecompetenciesthatarebuiltonfortherestofthisbook.Asaresult,itisvery importanttounderstandthesetopicsinregardstoAllSitessearchbeforemovingintothelaterpagesin thechapter. ForanyusersofpreviousversionsofSharePoint,thesearchuserinterfaceislargelyunchanged.For thosefluentinMOSS2007,pickinguptheend-usersearchexperiencewillbeeasier,andmuchofthe informationinthischapterwillbereview.Thereare,however,severalnewfeaturesthatshouldattract extraattention.ThesefeaturesincludetheadditionoffullBooleansearchsyntax,theadditionofsearch refiners(facets),theadditionofthePreferencespage,andvastimprovementstothePeoplesearchpage. Aseachsubjectisdiscussed,generaldifferencesbetweenthesearchuserexperienceinMOSSand SP2010willbenoted.
TheQueryBox Thequerybox,alsoreferredtoasthesmallsearchbox,isgenerallythefirstplaceausercangoto interactwithsearch.Inastandarddeployment,thequeryboxcanbefoundintheupperrightquadrant onanysiteoutsideofasearchcenter.Examplesofwherethequeryboxcanbefoundincludethehome page,sitecollections,sites,subsites,teamsites,andlists.Dependingonthecustomizationsdone,the searchcentermaybefoundinotherlocationsonapageorcanbefoundworkedintovariousWebParts. Unlessthedesignofasitehasbeencustomized,thequeryboxcanbefoundinthelocationshownin Figure5-1.
Figure5-1.TheSP2010querybox Thequeryboxprovidesafreetextfieldforenteringsearchqueries.InSharePoint2010,thequery boxcanbeusedtoentersearchqueriesfordocuments,people,sites,lists,andanyotheritemsfoundin crawledcontentsources.Bydefaultitissettosearchthesitetheuseriscurrentlyon,butdependingon theconfigurationofthequerybox,andwhethertheadministratorhasmadethescopepickeravailable, thequeryboxcanbesetuptosearchagainstanyavailablesiteorsitecollection.
122
CHAPTER5■THESEARCHUSERINTERFACE
Duetothelevelofcustomizationsthatcanbemadetothesearchuserinterface,certain configurationshavebeenmadetotheuserinterfaceweshowthroughoutthischapter.Thesesettings havebeenmadetoprovideathoroughoverviewofthestandardsearchfeaturesmadeavailablein SP2010.Althoughnotautomaticallyenabledwiththedeploymentofasearchcenter,these customizationsaresimpleandstandardtomanydeployments.Theydonotrequireanyspecialcustom developmentandcanbeeasilyenabledthroughthesitesettings.Severalofthesimplecustomizations thathavebeenmadetoshowthefullrangeofsearchuserinterfacefeaturesincludethefollowing: •
TheSearchActionsWebParthasbeensettodisplaythe“relevance”and “modifieddate”sortingoptionsinFigures5-4,5-9,5-47,and5-49.
•
TheTopFederatedResultsWebParthasbeenenabledforBing.comin Figure5-32.
•
TheFederatedResultsWebParthasbeenenabledandsettodisplayresultsfrom Bing.cominFigures5-9and5-29.
•
Thescopesdrop-downontheSearchBoxWebParttodisplaythescopepickerin Figures5-2,5-3,5-4,and5-45
•
AdditionaltabswereaddedinFigure5-8and5-31todisplayfederatedsearch options.
•
QuerysuggestionswereenabledonthesearchboxWebParttoshowthefeaturein Figure5-13.
•
Abestbetisestablishedbetweenthequery“SharePoint”andthedocument CollaboratingwithSharePointinFigure5-28.
Detailsonhowtoenablethesefeaturesaswellasseveralotherswillbefoundinthenextchapter. ThequeryboxcanacceptthestandardsearchsyntaxusedthroughoutallsearchfieldsinSP2010. UnlikeMOSS2007,SP2010supportsadvancedquerysyntax.Althoughnotnecessarilythemostefficient placetobuildcomplexsearchqueries,thequeryboxcan,infact,executeallofthesamesearch parametersastheAdvancedSearchpagefoundonasearchcenter.Thedetailsoftheavailablesearch syntaxarediscussedindetaillaterinthechapter. Whenusersentersearchqueriesinthequeryboxandexecutethesearch,theyareredirectedtoa searchresultspagewithitemsrelevanttotheexecutedsearchreturned.Thereturnedsearchresultsare providedbasedontheenteredquery,scope,anduserpermissions.Thesearchcenterthequerybox routestoisestablishedbythechosenscope.Theusercantheninteractwiththesearchresultsasifthe searchhadbeenexecutedthroughasearchcenter.Asstatedearlier,ifthedefaultscopeisused,the searchresultswillreturnresultsonlyfromthesitetheuserwasonwhenheorsheexecutedthequery. Tosearchagainstabroaderrangeofsites,theuserneedstoselectadifferentscope,navigatehigherin thesitehierarchy,orexecutethequerythroughthesearchcenter.Searchesenteredthroughaquerybox withoutadifferentsiteselectedwillreturnresultssimilartothoseshowninFigure5-2.
123
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-2.Sitesearchresults
TakingAdvantageoftheScopePicker Tobroadenorsharpenasearchthroughthequerybox,thescopepickercanbeused.Scopesaresetup byadministratorsandprovideoptionsfortheapplicationofpre-determinedrulestoasearch.Themost commonapplicationofscopesistospecifyatargetsiteorsitecollection,butscopescanalsobeusedto selectdifferentsearchpagessuchasPeoplesearch,aswellasacombinationofotherparameters,such asthosefoundontheAdvancedSearchpage.Scopesarenotgenerallycreatedonthefly,butinsteadare createdbythesiteadministratorforthemostcommonlyneededsearchparameters.
124
CHAPTER5■THESEARCHUSERINTERFACE
Whenavailable,scopesareaccessedthroughadrop-downtotheleftofthequeryboxasshownin Figure5-3.Bydefault,thesitecurrentlybeingaccessedischosen.Tochangethescope,clickthedropdownandselectthedesiredscope.Whenascopeforadifferentsiteorsitecollectionischosen,the executedquerywillreturnresultsoutsideofthoseavailableonlythroughthecurrentsite.
Figure5-3.Searchscopesandthequerybox Whenthesearchisexecuted,thetargetsiteorsitecollectionwillbelistednexttothesearchquery abovetheresults(Figure5-4).
Figure5-4.Searchscopesandtheresultspage
125
CHAPTER5■THESEARCHUSERINTERFACE
Afteraresultsetisreturned,thecapabilitytochangetheselectedscopeorqueryismadeavailable. Byselectingadifferentscopeandexecutingadifferentquery,anewsetofresultswillbereturned.This providestheabilitytochangesearchparametersasneededwithoutnavigatingbacktotheoriginating siteorsitecollection.
TheSearchCenter Thesearchcenteristhesecondlocationuserscanleveragetoexecutesearchesandreturnresults. SearchcentersareSharePointsitesdedicatedtothefunctionofsearchthatholdallthesearchpieces, tabs,WebParts,searchpages,resultspages,etc.Theyprovidetheend-to-endabilitytoenteradvanced queries,selectpreferences,andretrieve,filter,andactionsearchresults. SharePoint2010isnotrestrictedtoonesearchscopepersearchcenter.Dependingontheneedsof anorganization,manyscopesmaybemadeavailable.Themostcommonare“AllSites”and“People” searchpages.Inadditiontothese,specializedsearchpagesmaybecreatedfordifferentusergroups, departments,sites,andfederatedenvironments,tonameafew.Eachsearchtabisdesignedarounda fixedscope,sowhenthe“People”searchtabisaccessed,itautomaticallyappliesthe“People”scope. Accesstovarioussearchpagescanbeprovidedthroughafewpaths.Whenasite-specificsearchis executedthroughthequerybox,theuserisnavigatedtoasearchpageforthetargetsite.Whenasearch isperformedthroughthequeryboxtoacollectionofsitesorallsites,theuserisdirectedtothe correspondingsearchresultspage.WhenausernavigatestotheAllSitescentertab,theoptioncanbe madeavailabletochooseseveralsearchpagesotherthanAllSites.
■NoteWhenqueriesareexecutedthroughthequerybox,theuserisdirectedtoasearchcenter.Inanout-ofthe-boxconfiguration,thedifferencebetweenmanuallynavigatingtoasearchcenterandenteringasitesearch throughaqueryboxistheavailabilityoftheAdvancedSearchpageandthePreferencespage.Itisimportantto understand,however,thatthequeryboxcanbedirectedtoasitesearchresultspageorthesamesearchcentera usercanmanuallynavigateto.
Thesearchcentercanbeaccessedjustlikeanyothersite.Oncethesearchcenterisselected,the landingpageshowninFigure5-5willappear.
126
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-5.EnterpriseSearchCenterhomepage Fromthispage,thereareafewmoreoptionsmadeavailable.Userscanchangethescopeoftheir querythroughtabsabovethequeryfield,navigatetotheAdvancedSearchpage,navigatetothe Preferencespage,orenterasearchquery.Thevarioustabsavailableherearegenerallysettodifferent searchscopes.Theymaybeconfiguredtoexecutequeriesagainstdifferentcontentsets,andthesearch resultspageeachtabreturnscanbeconfiguredforacustomizedlookandfeel.InthedefaultSharePoint 2010EnterpriseSearchCentershowninFigure5-5,userscanexecutequeriesagainstcontentinthe entiresitecollection,orselectthePeopletabtoexecuteaqueryagainstthepeoplescope.Theformatof thesearchresultspagethatreturnsforqueriesexecutedthrougheachofthesetabsisdifferent.More customizeddeploymentsmayoffersearchtabsthatarespecializedtotheneedsofaparticular departmentormaydirectqueriestospecificcontentsources. Queriesenteredthroughthesearchcenterwillfunctioninthesamemannerasthoseenteredinthe searchquerybox.Bydefault,thestandardsearchcenterhomepageissetto“AllSites”(Figure5-6).“All Sites”isthebroadestsearchscopeavailableandincludesallavailablecontentsources,items,andsites, withtheexceptionofpeople.Whenaqueryisenteredthroughthe“AllSites”tab,theuserwillbe navigatedtothecorrespondingsearchresultspage.
127
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-6.StandardAllSitesresultspage InadditiontotheAllSitessearchtab,thePeoplesearchpagecanbeaccessedbyselectingthe Peopletababovethesearchfield.Bydoingso,thescopeofthesearchisredirectedtothePeoplesearch resultspage.Figure5-7showsastandardSPS2010Peoplesearchresultspage.Mostofthefunctionality onthePeoplesearchresultspageissimilartothatoftheAllSitesresultspage.Thenotabledifferences areaddressedtowardtheendofthischapter.
128
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-7.StandardPeoplesearchresultspage OnboththeAllSitesandPeoplesearchresultspages,thereistheoptiontotabbetweenthe availablesearchscopes.InafullydevelopedSharePoint2010deployment,othersearchtabsmaybe madeavailable. InglobalcompanieswithmorethanoneSharePointfarm,itiscommontoprovideaccesstosearch againstfederatedenvironmentsthroughsearchcentertabs.Chapter3discussedthetopicofcrawling federatedenvironmentsindetail,buttoreview,federationistheabilitytosearchoncontentthatwas notcrawledbythefarmbeingaccessed.Federatedsearchesmayincludecontentpulledfromglobal searchenginesorotherSharePointdeploymentswithinaglobalcompany.Withfederatedsearch,a querycanbeenteredthroughonefarmandpassedtoadifferentcontentsource,whereitisthen processedbythatrespository’ssearchengine. Accesstofederatedsearchiscommonlyprovidedthroughtabsonthesearchcenter.Thisallows userstosearchtheirownfarmsbydefault,butselecttosearchagainstothercontentrepositoriesas needed.AnexampleofsearchtabssetupforfederationisshowninFigure5-8.
Figure5-8.Federatedsearchtabs
129
CHAPTER5■THESEARCHUSERINTERFACE
TheSearchResultsPage Onceaqueryisexecuted,eitherthroughthequeryboxorasearchcenter,theuserisnavigatedtothe correspondingsearchresultspage.ThesearchresultspageiscomprisedofanumberofWebPartsthat, whencombined,allowuserstoviewandinteractwiththesearchresults.Thesearchresultspage presentsasetnumberofresultsperpage,andthenallowsuserstomovetoadditionalpagesbywayofa navigatorlocatedatthebottomoftheresultspage. Asshowninthescreenshotsintheprevioussections,theresultspageforsearchesenteredthrough thequeryboxandsearchcentervaryslightlyintheout-of-the-boxconfiguration.Thedefaultsearch resultspageforqueriesenteredthroughthequeryboxdoesnotprovideaccesstotheAdvancedSearch pageorPreferencespages.Itdoes,however,providethescopepickerdrop-down.Thefeatures discussedinthissectionareavailableforsearchesmadethroughtheAllSitessearchpage.These featurescanalsobemadeavailableforsearchesenteredthroughthequerybox. Thesearchresultspageiscomposedofmanydifferentcomponentsbroughttogetherbyacollection ofWebParts.AWebPartisanASP.NETservercontrolthatallowsadesignertomodifythecontent, appearance,andbehaviorofawebpagedirectlyfromabrowser.WebPartsarethebuildingblocksthat providethewiderangeofcustomizationallowedinSharePoint2010.Theypresentdata,allowfor interactionwithpages,andcontrolthedesignofapage.InSharePoint2010,thereareover75WebParts thatcomewiththeplatform,andadditionalcustomWebPartscanbecreated.Thereare17WebParts dedicatedtosearch.Eachcanbeenabledordisabledtochangetheavailablefunctionality,moved aroundthepagetochangelayout,andreconfiguredtochangebehavior.Thischapterdiscussesthe majorsearchWebPartsthatmostuserswillinteractwith.ThekeyWebPartcomponentsofthesearch resultspagearelabeledinFigure5-9.
Figure5-9.Labeledsearchresultspage
130
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-9displaysfeaturesandWebPartsthatmaynotbeenabledineveryenvironment.The followingsettingshavebeenmadetoprovidethebroadestoverviewofavailablefeatures. •
TheSearchActionsWebParthasbeensettodisplaythe“relevance”and “modifieddate”viewoptions.
•
TheTopFederatedResultsWebParthasbeenenabled.
•
TheFederatedResultsWebParthasbeenenabledandsettodisplayresultsfrom thelocationBing.com.
SearchresultspagesmayincludeWebPartsadditionaltothoseshown.IndividualWebPartsmay alsobelocatedindifferentzonesonthepage,orbeconfiguredtoactdifferentlythanshown.Thisfigure showsmostofthestandardavailablesearchWebPartsintheAllSitesscope,withtheirdefaultsettings. Startingfromthetopzone,theSearchBoxWebPartprovidestheabilitytoexecuteanewsearch query.ItalsoprovidesaccesstothePreferencespageandtheAdvancedSearchpagediscussedlaterin thischapter.Whentriggered,theSearchSummaryWebPartdisplaysalternativequerysuggestionsfor thecurrentsearchquerybelowthesearchbox.AsshowninFigure5-10,thisWebPartprovidesquery suggestionsbasedonSharePoint’sdictionarytoprovideuserswithalternativequeryoptions.
Figure5-10.SearchBoxandSearchSummaryWebParts Directlybelowthesearchbox,theSearchStatisticsWebPartdisplaysthenumericalportionofthe resultsetbeingdisplayedonthecurrentpage.Italsoprovidestheestimatednumberofresultsinthe entireresultset.AdjacenttotherightoftheSearchStatisticsWebPart,theSearchActionsLinksWeb PartprovidestheabilitytosetalertsandcreateRSSfeedsontheresultset.Ifenabled,userscanchange theorderofthesearchresultsbyselectingadifferentsortingoptionfromthe“SortBy:”drop-down. UserscanalsousethisWebParttoconnectWindowsDesktopSearchtotheresultset.Thisprovidesthe abilitytosearchtheresultsetatalatertimewithoutmanuallyopeningSharePointagain.
■NoteDuetosecuritytrimming,thesearchenginegenerallyisunabletodeterminetheexactnumberofresults inlargeresultssets.Thisisthereasonthephrase“about”isusedwhendisplayingthetotalnumberofresults. Whenatotalresultcountisexact,theterm“about”isomitted.
TotherightoftheSearchActionsLinksWebPartistheRelatedQueriesWebPart.Ifavailable,this providesalistofsuggestedalternativesearchqueriesbasedontheaggregatedexperiencesofusersin theenvironment.BelowtheRelatedQueriesWebPartisthePeopleMatchesWebPart.ThisWebPart, showninFigure5-11,displaysthefirstthreepeoplethatwouldbereturnedhadthequerybeenexecuted throughthePeopletab.ThisisausefultoolthatallowspeopletonotbeincludedintheAllSitesresults set,whilestillbeingabletoseesomeofthetoppeople-relatedresults.
131
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-11.PeopleMatchesWebPart UsersmayalsofindtheFederatedSearchResultsWebPartintherightzone,whichpresentsresults fromafederatedcontentsourcesuchasBing.comorblogs.TotheleftoftheSearchStatisticsWebPart, theRefinementPanelWebPartallowsuserstodrillintosearchresultsbyselectingknownmetadata suchasresulttype,thesitetheitemislocatedon,ortheauthoroftheitem. BelowtheSearchStatisticsWebPart,theBestBetsWebPartcanbefound,which,ifenabled, providessuggestionsforthemostlikelyitemsusersmaybelookingforinaresultset.BelowtheBest BetsWebPart,theTopFederatedResultsWebPartdisplaysthemostrelevantsearchresultsfromoneor morefederatedenvironments.TheTopFederatedResultsWebPartisnotenabledbydefault,andif enabled,willbeshownonlyifafarmispullingcontentfromfederatedcontentsources. Thefocusofthesearchresultspageis,ofcourse,theresultsthemselves.Theresultscanbefoundin theSearchCoreResultsWebPartlocatedinthecenterofthepage.Eachresultcontainsseveral components,asshowninFigure5-12.
Figure5-12.Individualsearchresult Eachresultcontainsaclickabletitle,which,ifclicked,willprovidetheabilitytointeractwiththe searchresult.Dependingonthetypeofsearchresult,theactiontakenwhenthetitleischosenwill change.IftheitemisaMicrosoftOfficedocument,asecondwindowwillappear,whichprovidesthe abilitytosavethedocumentoropenitwiththecorrespondingMicrosoftOfficeprogram.Iftheresultisa documentotherthanMicrosoftOffice,onlytheoptiontosavethedocumentisprovided.Iftheresultis notadocument,choosingtheresulttitlewillnavigatetheusertothelocationoftheresult.Examplesof non-documentresultsincludeSharePointsites,lists,orwebpages.Theicontotheleftofthesearch resulttitleindicatestheitemtypefortheresult.
132
CHAPTER5■THESEARCHUSERINTERFACE
Belowtheresulttitle,adescriptionisdisplayed.Thedescriptioncontainswhatthesearchengine believesarethemostrelevantblocksoftextfromwithinthecontentoftheitem.Theblocksofcontent arenotnecessarilythefirstblockoftextintheresultoradjacenttoeachother.Thekeywordsfromthe searchqueryarefoundinboldwithintheresultdescription.Underthedescription,thereisalistofkey propertiesassociatedwiththeitem.Bydefault,thedisplayedpropertiesareauthors,dateoflast publishededit,andsizeofthefile.Finally,belowtheproperties,anactionablelinktotheresult’s locationisshown. ThefinalWebPartinastandardsearchresultspageistheSearchPagingWebPart,foundatthe bottomofthepage.ThisWebPartprovideslinksfornavigatingtoadditionalsearchresultspages.By default,thenumberofresultsreturnedperpageissettoten,butthisnumbercanbeadjustedbythe administrator,asshowninthenextchapter. Dependingonhowanenvironmentisbeingused,itmaybeadvisedtoincreasethenumberof resultsperpage.Providingmoreresultsperpageallowsforfasterbrowsingoflargesearchresults,butit doesaffectperformance.SinceSharePoint’ssearchengineisreturninginformationonlyaboutthe resultsdisplayedonthecurrentpage,increasingtheresultsperpagewillconsequentlyincreasethe amountofinformationthatneedstobeprocessedandreturned.Boththeuserexperienceandserver performanceshouldbetakenintoconsiderationbeforeadjustingtheresultsperpage. Thefinalmajorfactorthatcontributestothesearchresultspageistheorderoftheresults.The orderofreturnedresultsisdeterminedbasedondocumentrelevancyandSharePoint’srankingformula. SharePointranksdocumentsbasedonthefrequencyofquerytermswithinthefileaswellastheoverall comparativedocumentvalue.Variousrankingconsiderationsareappliedbasedonseveralvaluessuch askeywordmatches,queryproximity,staticdocumentpropertiessuchasfiletypes,anduser-driven weightingsuchaspopularity.Theresultisthatasingledocumentbecomesacollectionofdifferently weightedrankingconsiderations.Theseweightedvaluesarethenusedtoproducetheorderofsearch results. Thetopicofrelevancyisoneofgreatimportanceasitgreatlyaffectsthesearchuserexperience.The phrase“garbagein,garbageout”isquiteapplicabletothetopicofsearchrelevancyinthatifusersdo notprovideSharePointwithaccurateproperties,thenSharePointwillproducebadsearchresults. Insuringthatuserscorrectlytag,store,andratedocumentswillgreatlycontributetosuccessful relevancy.Ifusersdonotconsistentlyattachpropertiestodocumentsorstorefilesinillogicallocations, thenthenumberofvaluesSharePointcanconsiderforrelevancydecreasesalongwithaccuracy. Companiesshouldimplementsimpleandconsistentpracticesfortaggingandstoragesothatuserscan contributetotheirownsuccess. Itisalsoimportanttounderstandthatwhilethefront-enddiligenceofdocumentmanagementis thesharedresponsibilityofeveryuser,therankingformulaisoutsideofend-usercontrol.Thereare, however,manystepsthatSharePointadministratorsanddesignerscantaketoimproveresultranking. ThisisatopicofsignificantimportanceandisdiscussedatlengthinChapter10. ThecombinationofthevariousWebPartsdiscussedinthissectioncreatethenetend-usersearch experience.TosuccessfullyleverageSharePoint’ssearchexperience,usersmustbecomfortablewiththe useofmostofthesefeatures.Eachfeaturecontributestosearchsuccessthroughadifferentfunction. Thefollowingsectionsdrillintoeachofthesefeaturesandtheirpurposewithinthesearchcenterin moredetail.Asmentionedatthestartofthechapter,thegoalofthischapteristoprovideathorough reviewoftheend-userexperiencesforeachcomponentofthesearchinterface.Thefollowingsections areinlinewiththisgoalandexplainhowtouseeachcomponent,nothowtocustomizeeach component.Thefocusofthefollowingchapteriscustomizationofeachfeatureinthefollowing sections.
133
CHAPTER5■THESEARCHUSERINTERFACE
SearchSuggestions Ifenabled,SharePoint2010canprovidesearchsuggestionsonanyqueryboxorsearchcenterdialog field(Figure5-13).Searchsuggestions(calledquerysuggestionsontheSearchBoxWebPart)work similarlytoBingorGooglesearchfields.Asauserentersasearchquery,SharePointpresentssuggested termsbelowthesearchboxbasedonthepartialentryofaquery.Byselectingapresentedsearch suggestion,thatquerywillbeautomaticallyinitiatedandthecorrespondingsearchresultspagewillbe returned.
Figure5-13.Searchboxwithsearchsuggestions Searchsuggestionsareprovidedbasedonpastuserexperience.Overtime,SharePointtrackssearch queriesthatresultinauserclickingaresult.Onceaminimumnumberofclicksoccurforaparticular searchquery,itbecomesanavailablesuggestion.Onlysearchtermsthatyieldresultsthatactuallyget clickedwillgointothesearchsuggestionpool.Aminimumofsixclicksperyearisrequiredfortheterm toshowupasasearchsuggestion.Asaresult,searchsuggestionsbecomemoreabundantandrelevant overtime. Althoughitispossibletoaddandremovesearchsuggestionsmanually,thiscannotbemanagedby theenduser.Thenextchapterdiscusseshowanadministratorcanmanuallymanipulatesearch suggestions.Thetopicofmanuallyaddingquerysuggestionsandscopingthemtocreateacustom experiencebasedonthesearchpageiscovered.
AlertMe TheAlertMeoptionfoundintherightzonebelowthesearchboxprovidestheabilitytosetnotifications whentheresultprovidesforaspecificsearchquerychange(Figure5-14).Thisisusefulforuserswho needtoknowifnewcontentrelevanttoasearchqueryhasbeenindexed,existingresultsarealtered,or resultsareremovedfromtheset.Alertscanbecreatedtomakeoneormoreusersawareofthese changes.Theycanalsobesettobedeliveredviae-mailorSMStextmessage.
134
CHAPTER5■THESEARCHUSERINTERFACE
Tosetanalertforaresultset,firstclicktheAlertMebuttononthesearchresultspage.Thiswill navigatetheusertothenewalertpage.
Figure5-14.AlertMebuttonlocation Thenewalertpageprovidestheabilitytosettheparametersofthealert(Figure5-15).Onthispage, thefollowingoptionscanbeconfigured. •
Title:Thesubjectfieldofthee-mailorintroductorytextofSMStextmessages
•
Recipients:Whichusersshouldbealerted
•
Deliverymethod:Ifane-mailandorSMStextmessageshouldbesenttorecipients
•
Whentoalert:Ifthealertshouldtriggeronlywhenthesearchwouldyieldnew results,whencontentofanexistingresultischanged,orboth
•
Alertfrequency:Ifchecksforchangesthatwilltriggerthealertshouldbe performedonadailyorweeklybasis
Otheruserscanalsobeaddedtothisalert,whichwouldthenmakeaduplicatealertforthem.Once anotheruserhasbeenaddedtothealert,thecreatorwillnolongerbeabletoedititforthatuser.
135
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-15.NewAlertpage
■NoteChangesthattriggersearchalertsarebasedonthecrawledcontent.Analertcanthereforeneverfire moreoftenthanthecrawlintervalsofthecontentsourcesthatyieldthesearchresultsforthespecificsearchalert.
Oncethedesiredsettingsareentered,clickingOKwillcreatethealert.Alertswillcontinuetobe deliveredbySharePointattheestablisheddeliverymethodandfrequencyuntilthealertisremoved.To add,edit,orremovepreviouslysetalerts,selectManageMyAlertsunderthePagetabontheribbon (Figure5-16).Thiswillprovideaccesstomanageonlythelogged-inuser’sexistingsearchalerts.
Figure5-16.ManageMyAlertsoption
136
CHAPTER5■THESEARCHUSERINTERFACE
Thealertsmanagementpagedisplaysalistofallexistingalertsanddeliverymethodsfortheloggedinuser.Toeditanyalert,simplyclickthealertname.Todeleteoneormorealerts,selectthecheckboxes nexttothealertsthatneedtobedeleted,andthenchooseDeleteSelectedAlerts.Tocreateanewalert, selectAddAlert.AlertscreatedthroughtheMyAlertspagearenotrestrictedtoasetofsearchresults. Alertsforanylist,documentlibrary,ordocumentcanbecreatedthroughthisoption(Figure5-17).
Figure5-17.MyAlertspage Byselectinganalert,theuseristakentoapagethatisalmostidenticaltotheNewAlertspage.The onlydifferingoptionisthatonlyalertsforthecurrentusercanbeedited(Figure5-18).Asaresult,this pagedoesnotallowausertoaddrecipients.Theotherfieldsofthechosenalertcanbeeditedand updated.
Figure5-18.EditingAlertspage
137
CHAPTER5■THESEARCHUSERINTERFACE
RSS TheReallySimpleSyndication(RSS)optionprovidestheabilitytosubscribetoafeedbasedonthe currentsearchquery.Thisissimilartosettinganalert,butinsteadofreceivinganSMSore-mailnotice eachtimeaniteminthedocumentchanges,anRSSfeedisestablished.Unlikealerts,whichuseapushbasedmodelfornotifyingtheuseraboutchangestoasearchresultset,RSSemploysapull-basedmodel. Wherealertscauseane-mailtobepushedtoauser’sphoneore-mailwhencontentchanges,RSSallows userstodecidewhentheywanttopullandreviewchangestoaresultsetfromanRSSfeedreader. Inregardstosearch,RSSfeedscanpushnotificationstoauserifcontentwithinasearchresultset changes.Asinformationwithinthesetfeedisupdated,itwilldownloadtotheuser’slocalcomputerfor accessthroughRSS-compatibleprograms.ExamplesofRSS-compatibleprogramsincludeMicrosoft Outlook2010,theFeedHeadlinesgadgetinWindows7,andInternetExplorer.TheseRSS-compatible programsallowfortheaggregationofseveralfeedsandcanprovideaconsolidatedviewoftracked information.Asneeded,ausercanaccessanRSSfeedreaderandviewanychangestothecontentofa searchresultset. SettinganRSSfeedissimilartoestablishinganalert.TosetanRSSfeedforthecurrentquery,select theRSSbuttonafterexecutingaquery(Figure5-19).
Figure5-19.RSSbuttonlocation ThiswillnavigatetheusertoapagethatdisplaysthecurrentlysetRSSfeedsandtheabilityto subscribetothenewlydesiredfeed(Figure5-20).
138
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-20.RSSfeedlist ClickingthetitleoftheRSSfeednavigatesbacktothesearchresultsetforthatquery.Selecting “subscribetothisfeed”allowstheusertoenteranameforthenewfeedandselectthelocationwhere thefeedwillbecreated(Figure5-21).Afterafeediscreated,itisaddedtothecommonfeedlist.
139
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-21.SubscribingtoanewRSSfeed ToviewasubscribedfeedinInternetExplorer,selecttheFeedstabintheFavoritesCenter (Figure5-22).ThistabcanbeaccessedbyclickingFavoritesandthenFeeds.Allfeedsthecurrent userissubscribedtocanbefoundunderthistab.Selectingafeedwillnavigatetheuser’sbrowser tothechosenfeedinSharePoint.
Figure5-22.ViewingsubscribedfeedsinInternetExplorer Tochangethepropertiesofafeedafterithasbeencreated,select“Viewfeedproperties”onthe right-handsideofthefeedlist.DoingsowillopenthewindowinFigure5-23.Thefeedname,frequency oftheuser’scomputerchecksforupdates,andmaximumnumberofupdatestobestoredcanallbe configured.Dependingonthefrequencyofcontentupdateswithinthesearchresultset,system performance,andavailablestoragespace,theupdateschedulesandarchiveoptionsmayneedtobe considered.Ifcontentfrequentlychangeswithinafeed,frequentchecksforupdateswillcause
140
CHAPTER5■THESEARCHUSERINTERFACE
additionalloadontheuser’slocalmachine,connectionbandwidth,andhostservers.Settingalarge numberofitemstobearchivedwillrequirealargeramountofstoragespace.
Figure5-23.RSSFeedPropertiesdialog
SearchLaterfromWindowsExplorer TheSearchActionLinksWebPartoptionprovidestheabilitytosearchalocationlaterfromWindows ExplorerinWindows7.Thisallowsforausertoestablishfederatedsearchconnectionsbetweenthe SharePoint2010SearchCentersandtheuser’slocalmachine.Oncethisconnectionismade,auserdoes notneedtoopenSharePointtosearchwithinthescopeoftheconnection. Toestablishafederatedconnectorforthescopeofthecurrentsearchquery,firstexecutethesearch querywithinthedesiredscope.Onthesearchresultspage,selectthesearchactiononthefarrightas showninFigure5-24.
141
3
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-24.WindowsExplorerconnectionbuttonlocation Thisactionwilldownloadtheconnectorandprovideaprompt,askingiftheuserwantstoestablish theconnection.TheAddSearchConnectorpromptisshowninFigure5-25.Choosingtoaddthe connectionwillcompletethehandshakeandopenWindowsExploreronthelocalmachine.
Figure5-25.Addingtheconnector ByenteringasearchqueryintotheWindowsExplorersearchbox,queriescannowberunagainst theestablishedscope.Whenaqueryisexecuted,WindowspassesthefederatedsearchtoSharePoint 2010andreturnsresultsinmuchthesamewaytheywouldreturninaSharePointsearchcenter.Results returnwithactionabletitles,keywordshighlightedwithinthecontentsnippets,andassociated metadata.Figure5-26showsasetoffederatedsearchresultswithpreviewsenabledinWindows Explorer.
142
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-26.FederatedsearchresultsinWindowsExplorer Double-clickingaresultwillperformactionssimilartoclickingaresulttitleinasearchcenter. MicrosoftOfficedocumentswillbeopenedintheircorrespondingprograms.PDFswillopeninAdobe ReaderorotherPDFviewer,andSharePointsiteswillopeninanewwebbrowserwindow. Bydefault,thesearchresultsetinWindowsExplorerwilldisplayonlythefirst20results.Toviewthe entiresearchresultsset,thesearchmustbeexecutedwithinSharePoint.Ashortcuttoexecutingthe currentqueryinSharePointcanbefoundatthetopoftheWindowsExplorerWindow.Selecting“Search onwebsite”asshowninFigure5-27willopenSharePointinthebrowserandprovidethefullsearch resultsetinthecorrespondingsearchcenter.
Figure5-27.“Searchonwebsite”button
143
CHAPTER5■THESEARCHUSERINTERFACE
Ifmultiplefederatedsearchconnectionshavebeenestablishedonthelocalmachine,theycanbe accessedbyselectingthedesiredscopeontheleftsideofWindowsExplorerunderFavorites.
BestBets Bestbetsareresultsuggestionspushedtousersbasedontheirsearchqueries.Unlikethesearch suggestionfunctionality,whichsuggestsaquery,theBestBetsfeaturesuggestsaresult.BestBets suggestionsoccurbasedonspecifickeywordsenteredintothequeryandarepresentedasthefirst result(s)inasearchresultset.Thisresultisslightlyoffsetandmarkedwithastartostandoutfrom therestoftheresultset.Forusers,actioningaBestBetsresultsuggestionfunctionsasanyother searchresultofthesamecontenttype.TheusefulnessoftheBestBetsfeatureforusersisthatifwell managed,itdrivesthemostrelevantresulttothestartofaresultset.Figure5-28providesanexampleof abestbet.
Figure5-28.Searchresultspagewithabestbet TheBestBetsfeatureallowsadministratorstodeterminewhichresultsaremostrelevantfor keywords.Thegoaloftheseistofeedcontenttotheuserbasedontheresultsthattheadministrators wanttheusertofindfirst.AdministratorscanmanuallyassociatekeywordswithaBestBetsresult.These areusuallydeterminedbyanalyzingtheanalyticsforagivenenvironment.SharePoint2010canalso provideadministratorswithsuggestionsforBestBetsinaperiodicreportthatfactorsinlikelydesired suggestionsbasedontheaggregatedmetricsofanenvironment.Chapter10divesintoadministrative topicsinvolvingtheBestBetsfeature.
■NoteSharePoint2010BestBetsdonotincludeHTML.ForgraphicalbestbetsthatuseHTML,athird-party solutionsuchasOntolicaSearchorFASTforSharePoint2010isnecessary.Public-facingSharePointsitesorthose heavyonbrandingandmarketingmaywanttoconsiderthisoption.
144
CHAPTER5■THESEARCHUSERINTERFACE
FederatedResults SearchfederationinSharePointallowssearchresultstobepulledfromothersearchenginesintoa SharePointsearchcenter.Ifsetup,userscanuseonesearchcentertopullinformationbackfrom contentoutsideofSharePoint.Forexample,ifauserisloggedintotheNorthAmericanSharePointfarm, butwantstoalsoreturnresultsfromtheEuropeanfarm,iffederatedsearchissetup,theusercan achievethis.Inthesamesearchinterface,theusercouldalsoreturnsearchresultsfromanInternet searchengine,suchasBing.com. ThisconceptwasfirsthighlightedinChapter1andisessentialforSharePointenvironmentsthat needtopullcontentfromsourcessuchasexternalsilos,otherSharePointfarms,blogs,andInternet searchengines.Chapter1discussedhowSharePointcanacceptaquery,passittoanotherexternal searchengineforprocessing,andreturnresultsfromthatexternalsearchengineintooneaggregated interface.Chapter3discussedindetailhowtosetuptheSharePointcrawlerforsearchfederation. Chapter6discusseshowtocustomizetheuserinterfaceforfederatedsearchresults,andChapter9 discusseshowtoestablishcustomconnectorsthroughtheBCStocrawlfederatedsourcesnotsupported bySharePointoutofthebox.
FederatedSearchWebPartLocations DependingontheneedsofaSharePointenvironment,andthedesignchoicesmadebytheSharePoint administrator,federatedsearchresultsmaybedisplayedtousersseveraldifferentways.Federated searchresultsappearonthesearchresultspagethroughtheFederatedResultsWebPart.SincethisWeb Partcanbelocatedindifferentzonesonasearchresultspage,andthecontentbeingfederatedis differentforeverySharePointdeployment,theuserinteractionwithfederatedresultsisdifferentfor everyenvironment. Federatedresultsaremostcommonlyfoundinoneoftwosectionsoftheresultspage.Theymaybe foundintherightzoneofthepage,asshowninFigure5-29.Thisallowsforacleardifferentiation betweenfederatedresultsandtheresultsbeingreturnedfromlocallyindexedcontentsources.Blogs, wikis,andInternetsearchresultsaregenerallyconfiguredtoappearinthiszone.
145
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-29.Federatedresultsinrightzone Federatedresultsmayalsoappearaboveorbelowthelocallyindexedsearchresults.Generally, contentsuchasitemsfromexternaldatabasesandotherSharePointfarmsisdisplayedinthislocation (Figure5-30).Contentfromthesesourcesismorecloselyrelatedtothecontentinthelocalsearch results,soincludingitasamorefluidportionofthesearchresultsetmaybepreferable.
146
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-30.Federatedresultsinbottomzone Lastly,federatedresultsmaybesosignificantthattheyjustifytheirowntabonthesearchcenter. Thisallowstheadministratortocreateasearchresultspagespecificallyforfederatedresults,andnot includelocallyindexedcontent.AdditionaltabsmaybeaddedtothesearchcenteradjacenttotheAll SitesandPeopletabs,asshowninFigure5-31.Examplesofthisarecommoninenvironmentssuchas internationaldeploymentswithseveralSharePointfarms.Ausercansearchlocallyindexedcontentby searchingintheAllSitestab,butthenselecttheEuropeorAsiatabstodirectasearchonlytocontent federatedfromtheEuropeanorAsianSharePointfarms.Federatedsearchtabswithadedicatedsearch resultspagecanprovideasearchexperiencethatisthesameasthatforlocallyindexedcontent.
Figure5-31.Federatedsearchtabs
147
CHAPTER5■THESEARCHUSERINTERFACE
Whenaddingfederatedresultsaboveorbelowthelocallyindexedresults,andwhencreatinga separatetabdedicatedtothefederatedsearchresults,itisadvisabletousetheSearchCoreResultsWeb PartandnottheFederatedResultsWebPart.TheFederatedResultsWebPartisformattedtopresent resultsintherightzone.Consequently,usingtheFederatedResultsWebPartinthebottomzonewill presentresultsinatall,thinformat,whichdoesn’tpresentwell.Instead,settingthe“location”from whichtheSearchCoreResultsWebPartreturnsresultstothedesiredfederatedlocationwillpresent resultsinaformatmorealignedwithnormalresultsets.Thistopicisdiscussedfurtherinthenext chapter.
FederatedResultPresentation Ifindexedbythefederatedsearchengine,SharePointcandisplayinformationaboutthecontentand propertiesofaniteminthefederatedresults.Bydefault,whenreturningresultsfromanInternetsearch enginesuchasBing.com,thefirstthreeresultsthatwouldreturniftheuserexecutedhisorherquery throughBing.comarepresented.Thetitleoftheresults,afewlinesofcontent,andtheresult’sURLare alldisplayed.Clickingtheactionabletitleoftheresultwillnavigatetheuserdirectlytotheresult’sweb site.ChoosingtoviewmoreresultswillnavigatetheusertoBing.comandpresentthefullresultsetfor thequeryenteredintheSharePointsearchcenter.Fromhere,userscanusetheInternetsearchengine inthesamewaypossibleiftheyhadnavigatedtoitdirectly. Inadditiontodisplayingalistofmultipleresultsfromafederatedenvironment,SharePoint2010 canalsodisplaythetopfederatedresultsasshowninFigure5-32.IftheTopFederatedResultsWebPart isenabled,thetoponeormoreresultsfromafederatedlocationaredisplayedinaformatsimilartoa bestbet.Dependingonthesetting,thefirstresultorthefirstseveralresultsfromafederatedlocation canbesuggested.Thesuggestionsareformattedtoblendwellaboveorbelowacoreresultset,andthe titleprovidesalinkdirectlytotheresult.Thissuggestionoptioncanbedeployedbyitselforin combinationwiththeBestBetsfeature.
Figure5-32.TopfederatedresultfromBing.com
148
CHAPTER5■THESEARCHUSERINTERFACE
Asmentionedpreviously,duetothelargeamountofconfigurabilitysurroundingsearchfederation inSharePoint2010,everyenvironmentwillpresentfederatedsearchdifferently.Thetypeofcontent presentedinfederatedresultsandthewaytheresultsarepresentedonthepagerequiresignificant considerationfromtheadministratorbasedontheneedsofusers.Detailsregardinghowtoconfigure federatedsearchfordifferentneedsarediscussedinthefollowingchapter.
SearchRefiners Thesearchrefinersfoundontheleftzoneofthesearchresultspageprovidetheabilitytodrillinto searchresults.Theserefiners,whichareshowninFigure5-33,arethemajorsearchnavigation enhancementmadeavailableinSharePoint2010.Althoughcommontomanysearchengines,this featurewasnotavailableinpreviousversionsofSharePoint.Refiners,alsocalledfacets,allowusersto selectstructuredpropertiesabouttheresulttheyaresearchingfor,andcutoutresultsthatdonot containthatproperty.Thisfeatureallowsforirrelevantsearchresultstobequicklycutforaresultset.If properlydeveloped,userscanfilterfromamassiveresultsetlitteredwithirrelevantresults,downtoa smallerandmoremanageablesetofrelevantresults.
Figure5-33.Searchrefiners
149
CHAPTER5■THESEARCHUSERINTERFACE
Theimportanceofsearchrefinerscanbefoundthroughoutcountlesspublic-facingsites.Takean electronicretailer’swebsite,forexample.Whenusersnavigatetoanelectronicsretailsiteandsearchfor atelevision,anysiteofferingareasonablenumberofTVswillmostlikelyprovideaninitially overwhelmingnumberofoptionsforgeneralsearchqueriesonTVs.Withouttheabilitytofilterthrough thelargenumberofTVs,andnarrowdowntothoserelevanttoasitevisitor,potentialbuyersmay becomefrustratedandleavethesiteinfavorofcompetitors.Mostusersorsitevisitorswillnever navigatemorethanafewpagesintoasearchresultset.Fortunately,mostsuccessfulelectronicsretailers providerefinementoptions.SitesallowuserstoselectaTVbrand,size,pricerange,orfeatureset.This allowsbuyerstoquicklyfilteroutTVsthatarenotapplicabletotheirneeds,andmoreimportantly, returnasmallerlistofresultsforTVsthatdomeettheirneeds.Thissameneedtofilterresultsapplies whetherasiteiscateringtopotentialbuyersorinternalemployees. SharePoint2010’srefinersanalyzetheresultsetforparticularsetsofmetadata.Onastandard searchresultspage,thesemetadatasetsincludeResultType,Site,Author,andModifiedDate. SharePointwilllookaheadatthefirst50itemsintheresultsetbydefault,notjustthecurrentpage,and providealltheoptionswithinthesecategories.Forexample,ifaresultsetcontainsWordand PowerPointfiles,butnotExcelspreadsheets,thenanoptionforrefiningontheExcelfiletypewouldnot bemadeavailable. Bydefault,onlythefourmostfrequentoptionsforeachcategoryaredisplayed.Ifmorethanfour optionsareavailableinarefinementcategory,the“showmore”buttonatthebottomofeachgroupcan beselected.AnexampleofthisoptionisshownfortheAuthorcategoryinFigure5-34.Clicking“show more”willexpandtheavailablerefinersineachcategoryandprovidethefulllistfortheresultset.This optionisprovidedsothattheresultspagecanbekepttoalengthinwhichminimalscrollingisneeded. Byclicking“showmore”,apotentiallylargenumberofoptionsmaybecomeavailable,dependingonthe resultset.Ifalloptionsarepresentedbydefault,theresultspagewouldbecomeveryclutteredand lengthyinenvironmentswithlargeamountsofdifferingmetadataineachrefinementcategory.
150
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-34.Thesearchrefinementpanelwithallresultsdisplayed
SelectingRefinementValues Whenauserselectsarefinervalue,thesearchresultsetisupdatedtoshowonlyitemsthatcontainthe selectedvalue.Forexample,ifauserselectsPowerPointfromthesetofavailableresulttypes,allitems thatarenotPowerPointdocumentswillberemovedfromthesearchresultset.Thecurrentlyselected refinementvalueisindicatedbyathree-sidedboxaroundthevalue.Ifadditionalresultsetrefinementis needed,furtherrefinementvaluescanbeselectedinadditionalcategoriestocontinueeliminationof unwantedresultsuntilonevaluehasbeenselectedforeachcategory.Itisalsoimportanttonotethat multiplevaluescannotbeselectedforeachcategory.Forexample,ifauserwantstoreturnbothPDF andWorddocumentsinthesearchresultset,buteliminateallotherfiletypes,thisisnotpossibleusing therefinementpanel.Figure5-35showsthesearchrefinementpanelwithseveralvaluesselected.
151
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-35.Searchrefinementpanelwithselectedvalues Userscanalsochangetheselectedrefinementsasneededtoadjustthesearchresultset.For example,ifauserhassettherefinementsshowninthepreviousfigure,heorshehasinstructedthe searchresultspagetodisplayonlyWorddocuments,authoredbyMicrosoft,whichweremodifiedinthe lastsixmonths.IftheuserrecognizesthatthedocumentmayinfactbeaPDFdocument,heorshecan simplyselectAnyResultType,whichremovestheselectedvalue,andthenselectPDFasthenewvalue. Thissameprocesscanbedoneforanyoftherefinementcategoriestocleartheselectedrestrictions.
RefiningbySite TheSiterefinementoption,whichisshowninFigure5-36,functionsinaslightlydifferentfashionthan theotherrefinementcategories.ThiscategoryallowsuserstodrillintotheSharePointsitehierarchyand restrictthelocationofanitem.Forexample,ifauserissearchingAllSites,bydefaulttheuserwillfirstbe giventheoptiontoselectasitecollection.Onceasitecollectionisselected,alistofthetopsiteswhere resultitemsarelocatedisprovided.Theuserscanselecttheappropriatesitewherethedesireditemis located,whichthenmaypresentanoptionforacollectionofsubsites,dependingonthefarm’s taxonomy.Thisprocesscancontinuethroughsubsitesandintolistsanddocumentlibrariesuntilthe userhasdrilledintothebottomleveloftheSharePointhierarchy.Likeallrefinementpanelvalues,the availableoptionswilldependonthesetupandcontentofyourSharePointdeployment.
152
CHAPTER5■THESEARCHUSERINTERFACE
ItisimportanttonotethatwhileuserscandrillintotheSharePointhierarchy,theycannotbackout byjustonelevel.Tobroadenthesiterefinementcategory,usersmustselectanysiteandresettheentire collectionofselectedvalues.Thewebbrowser’sbackbuttondoesallowforaselectiontobereversed, bututilizingthisoptionisnotgenerallyrecommendedinpractice,asthebackbuttonhasnegative consequencesinotheraspectsofwebbrowsing.
Figure5-36.Siterefinementcategory Dependingonthemetadatawithinanenvironment,theavailablerefinementoptionscanbe expanded.Additionalcategoriescanbedisplayed,thenumberofcharactersdisplayedperfiltervalue canbeadjusted,andtheavailableactionscanberestricted.Thenextchapterdiscussesthisinmore detail.
RefinerLimitations TherearelimitationstothebaseSharePoint2010searchrefiners.Theprimarilynoticeablerestrictionis thatrefinementsarepresentedbasedonthefirst50itemsinaresultsetbydefault.Theyarenotbased onananalysisoftheentireresultsetunlesstheresultsetissmallerthantheWebPart’saccuracyindex. ThenumberoftopsearchresultsthatareanalyzedbytheWebPartcanbeincreased,butthehardlimit is500items.Asaresult,SharePoint2010refinersareconsidered“shallow.”Inaddition,SharePoint2010 OOTBcanpresentrefinersbasedonlyonmanagedproperties.Managedpropertiesmustbemapped, crawled,andexposedinlistandlibrarymetadata.Forsomeenvironments,especiallythosewith federatedcontentsources,thismayberestrictive.Forcasesrequiringfurtherentityextractionor refinementsthatanalyzealargersetofresults,asearchextensionsuchasOntolicaSearchorFASTfor SharePoint2010maybenecessary.
SearchQuerySyntax SharePoint2010iscapableofexecutingBooleanoperators,suffixwildcards,andpropertyqueriesin additiontothestandardfreetextqueries.Formanyendusers,simplybeingabletoexecutesuffix wildcardsearchesallowsforamucheasiertransitiontoSharePointfromlegacyplatformswiththis functionality.Thesecapabilitiesarestandardinmostglobalandwebsitesearchengines,buthavebeen lackinginSharePointuntilthe2010suiteofsearchsolutions.Theinclusionofmoreadvancedquery syntaxhassignificantimpactonauser’sabilitytoexpandandnarrowasearchresultsetbeforeusing refinersortheAdvancedSearchpage.
153
CHAPTER5■THESEARCHUSERINTERFACE
Usersfamiliarwithstandardsearchquerysyntaxshouldbeabletoeasilyadopttheadvancedsyntax availableinSP2010.Forthoseuserswhodonotneedtoconstructcomplexqueriesregularly,and consequentlydonotwishtolearntheadvancedquerysyntax,mostoftheseoptionscanbefoundonthe AdvancedSearchpage.Itisimportanttomentionthatnotallquerysyntaxcanbeusedforfreetext expressions,keywordqueries,andpropertyrestrictions.Aseachoperatorispresented,theexpressions thatcanbeusedwillbenoted.
SearchQueryOperators Thewildcardoperatorcanbeusedattheendofakeywordqueryorpropertyquerytoenableprefix matching.Thisallowsausertobroadenasearchbyenteringtheinitialportionofasearchqueryand indicatingthatSharePoint’ssearchengineshouldfillintheremainderofthequery.InSharePoint2010, thewildcardoperatorisindicatedbytheasteriskcharacter(“*”).Ausercanentertheinitialportionofa searchtermfollowedbythewildcardoperatorasfollows. shar* TheresultingsearchresultsmayincludethetermsSharePoint,sharing,Sharon,sharp,shark,andso on.Thewildcardoperatorcanbeusedonlyattheendofeachterminaquery.Asaresult,thequery “*point”willsearchfor“point”butnotreturn“SharePoint”.Thesearchquery“Share*ANDExp*”would allowthewildcardoperatortoworkasexpected,sinceitisinsertedattheendofeachterm. SharePoint2010supportstheAND,OR,NOT,andNEARoperators,whichallowforbroadeningor narrowingofasearchquery.Tofunctionasoperators,thesetermsmustbeenteredinallcaps,asshown. ThefirstthreeBooleanoperatorscanbeusedwithfreetextexpressions,keywordqueries,andproperty restrictions.TheNEARoperatorcanbeusedonlywithfreetextexpressions.TheANDoperatorspecifies thatallofthesearchtermsadjacenttotheterm“AND”mustbeincludedinthesearchresult.Unless anotheroperatorisspecified,theANDoperatorisenteredbetweenallsearchtermsbydefaultwhena queryisentered.Inthisexample,boththeterms“SharePoint”and“Expert”mustbeincludedinthe searchresult,althoughthetwotermsdonotneedtobeadjacenttoeachother. SharePoint AND Expert TheORoperatorspecifiesthatasearchresultmustincludeoneofthetermsadjacenttotheterm “OR”,butbothdonotneedtobeincluded.Inthisexample,eitheroftheterms“SharePoint”and “Expert”needstobeincludedinthesearchresult,butbothdonotneedtobeincluded. SharePoint OR Expert TheNOToperatorspecifiestermsthatcannotbeincludedinasearchresult.Itemsthatcontainthe keywordthatfollowstheNOToperatorwillbeexcludedfromtheresult.Inthisexample,resultswill includetheterm“SharePoint”,butmustnotincludetheterm“Expert”. SharePoint NOT Expert TheNEARoperator,alsoreferredtoastheproximityoperator,specifiesthatsearchtermsmustbe inaspecificorderandwithinaclosedistancetoeachother.UnliketheAND,OR,andNOToperators, theNEARoperatorcanbeusedonlywithtextexpressionsandcannotbeusedinpropertyrestrictions. Whenplacedbetweentwosearchterms,onlyresultscontainingthetermsintheenteredorderandin closeproximitytoeachotherwillbereturned.Ifauserfindsthatsearchresultsbeingreturnedwiththe defaultANDoperatorareirrelevantbecauseterm1appearsonpage1ofadocument,andterm2
154
CHAPTER5■THESEARCHUSERINTERFACE
appearsonpage15ofadocument,theNEARoperatormayprovidethedesiredresultset.Inthis example,onlyresultsthatincludetheterm“SharePoint”followedbyuptoeightothertermsandthen theterm“Expert”willbereturned. SharePoint NEAR Expert InadditiontotheseBooleanoperators,thereareseveralotheroperatorsthatareimportanttoknow. ThefirstisthesynonymoperatorthatisinitiatedbythephraseWORDS.TheWORDSoperatorallowsa usertoindicatethatcertaintermsinakeywordqueryaresynonymsofeachother.Thisissimilarin functiontotheORoperator,inthatresultsneedtocontainoneormoreofthekeywords,butthesetwo operatorsdifferintherankingsofthereturnedresults.AlsoimportanttonoteisthatunliketheOR operator,theWORDSoperatorislimitedtofreetextexpressionsandcannotbeusedonproperty restrictions.Inthefollowingexamples,thekeywordquerymatchesresultsthatcontaineithertheterm “Children”ortheterm“Kids”. WORDS (Children, Kids) Children OR Kids Theresultsthatarereturnedbyusingthesetwoqueriesmaycomebackinadifferentorder.Thisis becausestandardSharePoint2010rankingisbeingused.WhenusingtheWORDSoperator,SharePoint considersthetwotermstobethesameforrankingpurposes.WhenusingtheORoperator,SharePoint considersthetwotermstobedifferentforranking.Forexample,ifadocumentcontainstheterm “Children”fivetimes,andtheterm“Kids”fivetimes,theWORDSoperatorcausesthattobeconsidered astenoccurrencesofthesameterm.IftheORoperatorisused,SharePointconsidersthedocumentto havefiveoccurrencesoftheterm“Children”andfiveoccurrencesoftheterm“Kids”.Asaresult, SharePointwouldplacethedocumentwiththeassumedtenoccurrencesofonetermearlierintheresult setthanfiveoccurrencesofeachterm. IdenticaltotheAND/NOToperators,SharePointcanaccepttheinclusionandexclusionoperators. Theseareestablishedbyinsertionofa+or–inthequery,andcanbeusedonfreetextsearchor propertyrestrictions.SinceitisidenticaltotheANDoperator,theinclusion(+)operatoristhedefault behaviorofsearchunlessanotheroperatorisspecified.Inthefollowingexample,contentcontainingthe termsSharePointandExpertisincludedinthesearchresults,butcontentthatcontainsthetermMOSS isnot. SharePoint + Expert – MOSS Quotationmarks(“”)canbeenteredaroundaphrasetospecifythatsearchresultsmustcontainthe exactsetofwordsintheprovidedorder.Thisallowsforphrasestobegroupedtogetherandconsidered asonesearchterm.Thisisnecessarywhenthetermsneedtobeinaspecificorderwithoutadditional termsbetweenthem.Ifquotationmarksarenotused,theANDoperatorwillbeinsertedbetweenterms bydefault.Thismaycauseresultstobereturnedwherekeywordshavemanyothertermsseparating them.UnliketheNEARoperator,whichwillreturnalltheresultsproducedbyusingquotationmarks, theexactphraseoperatorreturnsonlyresultswherethetermsaretouching.TheNEARoperatorwill returnresultswherethetermsareeithertouchingorincloseproximitytoeachother.Inthefollowing example,onlyresultscontainingthephrase“SharePoint2010Expert”willbereturned. "SharePoint 2010 Expert"
155
CHAPTER5■THESEARCHUSERINTERFACE
Parentheses“()”canbeenteredtocombinepartsofkeywordqueries.Justlikeamathequation, enteringkeywordsbetweenparentheseswillallowtermsorphrasestobegroupedtogether.Inthe followingexample,allresultswillincludethetermSharePoint,buttheymustalsoincludeeitherthe term“Expert”or“Genius”. (Expert OR Genius) AND SharePoint
PropertyRestrictions InadditiontoBooleanoperators,wildcards,andothersyntaxoperators,SharePoint2010userscan executequeriesbasedonpropertyrestrictionstonarrowthescopeofasearch.Propertyrestrictions allowuserstolimitresultstothosethatcontainproperties,ormetadata,thattheyspecifyinthequery. Inmanycases,thesepropertiesmayalsobeabletoberestrictedbybuildingtheparametersinthe AdvancedSearchpage.Iftheoptiontoenterapropertyrestrictionhasnotbeenmadeavailableonthe AdvancedSearchpage,however,manuallybuildingarestrictionintothequerymaybeauser’sonly optionforreturningaspeciallyrefinedresultset.Propertyrestrictionscanbeexecutedforanymanaged propertyvalue.Chapter3discussedhowtomapacrawledpropertytoamanagedproperty. Abasicpropertyrestrictioniscomposedofthefollowingcomponents. Thepropertynameistheparticularpropertybeingaddressed,suchasauthor,filetype,orupload date.Thepropertyoperatoristhesymbolforthefunctionauserwishestoexecute.Propertyoperators aregenerallymathematicaloperatorsandincludefunctionalitysuchasstatingapropertymustbe greaterthan,lessthan,orequaltoavalue.Afulllistoftheseisprovidedlaterinthissection.Finallythe propertyvalueisthenumericalorwrittenlanguagecharacterthatmustbeassociatedwiththeproperty. Forexample,iftherestrictionisadate,thepropertyvaluemaybeSeptember30,oritcouldbe.docxina filetyperestriction.Theseareafewexamplesofcompiledkeywordpropertyrestrictions. author:"Josh Noble" ThisreturnsonlyitemsauthoredbyJoshNoble. filetype:docx ThisreturnsonlyMicrosoftWorddocuments. write>11/20/2010 Thisreturnsonlyitemsupdatedafter11/20/2010. Whenbuildingquerieswithpropertyrestrictions,itisimportantnottoleaveanywhitespace betweencharacters.AsdiscussedinthesectiononBooleanoperators,whitespaceisassumedbythe searchenginetobetheANDorinclusioncharacter.Asaresult,thefollowingquerieswouldbetreatedas freetextqueriesinsteadoftheintendedpropertyrestriction.
156
author:
"Josh Noble"
author
:"Josh Noble"
author
:
"Josh Noble"
CHAPTER5■THESEARCHUSERINTERFACE
Allthreeoftheseexampleswouldyieldresultsforthefreetextquery. author "Josh Noble" Asmentionedearlier,propertyrestrictionscanbeexecutedagainstanymanagedproperty.A secondarystipulationforsearchingonamanagedpropertyisthattheadministratormusthavesetthe propertytobeeitherretrievableorfull-textqueryable.Thisisnotapropertysettingthatcanbemadeby theenduser,butitdoesaffecttheactionsausercanperformonamanagedproperty.Managed propertiesthataresettoberetrievablearesoloedinthepropertystoredatabase.Managedproperties thataresettobefull-textqueryablearestoredinthefull-textindexalongwithalloftherestofthe contentinafarm,suchassites,documents,andlists.Asaresult,managedpropertiesthatarefull-text queryablecanacceptthesamequerysyntaxasanormalcontentquery. Onlytextproperties,alsocalledstringproperties,canbesettobefull-textqueryable.Allother managedproperties,suchasnumericalvalues(integers),dates,times,Boolean,andbinarydatatypes, arestrictlyretrievable.Full-textqueryablepropertiescanacceptthefull-rangeorkeywordquery operators. author:Josh author:Noble Forfull-textqueryableproperties,bothofthesepropertyrestrictionswillreturnitemsauthoredby JoshNoble.Thesepropertiescanalsoacceptsuffixwildcardandexactphraseoperators. author:Jos* ThisexamplewouldreturnitemsauthoredbyJoshNobleaswellasJoshuaHammond,JosefSmith, orJoslineHeffiftheresultsetcontainsthoseauthors.Justlikekeywordqueries,thewildcardoperator canbeusedonlyattheendofaterm.Whentheexactphraseoperatorisusedonafull-textqueryable property,thepropertymustcontainthespecificphrase. title:"SharePoint Expert" title="SharePoint Expert" Intheseexamples,thedocumenttitlemustcontainthephrase“SharePointExpert”.Returned resultsmayinclude“SharePointExpertgivessearchadvice”,“BecomeaSharePointExpert”,or“What theSharePointExpertknows”.Thesuffixwildcardoperatorcanalsobeusedincombinationwiththe exactphraseoperator. title:"SharePoint Ex*" Thisquerywouldreturnitemstitled“TheBestSharePointExperience”,“WhoneedsSharePoint Expertise?”,and“SharePointExpressSearch”. Propertyvaluesstoredinthepropertydatabasecanbequeriedonlyfortheentirevalueofa property.Unlikefreetextqueryableproperties,thosethatarejustsettoberetrievablemustmatchthe propertyrestrictionqueryexactly.Again,thisisnotanoptionmadeavailabletotheenduser,andifthe settingsofapropertyareunknown,testingifsomethingissettoretrievable,full-textqueryable,orboth mayrequiresometrialanderror.Forthosethatareonlyretrievable,andnotalsofull-textqueryable,the followingquerywouldbeaccepted.
157
CHAPTER5■THESEARCHUSERINTERFACE
company:"APress Books" Thisquerywouldreturnonlyitemsinwhichthecompanyfieldis“APressBooks”.Unlikefull-text queryableproperties,ifthecompanyis“APressBooksLondon”,theresultwouldnotbereturned.The termmustmatchthefieldexactly.Thissameruleappliesfornumericalpropertyvaluessuchasintegers, decimals,dates,times,yesorno,andbinarydatatypes. size:50MB Inthisexample,thereturnedresultsmusthaveexactly50MBinthesizeproperty.Theother propertyoperatorscanalsobeusedagainstretrievableproperties. size=50MB Thispropertyrestrictionreturnsonlyresultsinwhichtheitemsizeisgreaterthanorequalto50MB. AfulllistoftheavailableoperatorscanbefoundinTable5-1.Dependingonthemanagedproperty beingused,differentoperatorscanbeused.Thetableprovidesafulloutlineoftheoperatorsthatcanbe usedforeachdatatype.AllofthelistedoperatorscanbeusedforInteger,Decimal,andDatetimevalues. Text,orstring,valuescanacceptthe:or=operators.BinaryandBoolean(YesNo)valuescanbe restrictedonlywiththe:operator. Table5-1.PropertyRestrictionOperators
Operator
Action
:
Resultsmustcontainthespecifiedvalue.
=
Resultsmustbeequaltothevalue.
>
Resultsmustbegreaterthanthevalue.
>=
Resultsmustbegreaterthanorequaltothevalue.
50MB
159
CHAPTER5■THESEARCHUSERINTERFACE
BothofthesequerieswillreturnMicrosoftWorddocumentsthatarelargerthan50MBandauthored byJoshNoble.Justlikeakeywordquery,thesearchengineautomaticallyenterstheANDoperator betweenrestrictionsfordifferentproperties. Finally,combinationsoffreetextkeywordqueriesandpropertyrestrictionscanbeenteredasone querystring. Share* AND author:"Josh Noble" NOT "Piddocke" Thisquerywouldreturnitemsthatcontainthekeyword“Share”,areauthoredbyJoshNoble,and donotcontainthephrase“Piddocke”withinthecontent. filetype=docx filetype=pdf AND "SharePoint Expert" ThisquerywouldreturnitemsthatareeitherMicrosoftWordorPDFdocumentsandcontainthe phrase“SharePointExpert”.Usingtherulesoutlinedinthissection,awiderangeofadvancedqueries canbestrungtogethertoreturnadesiredsetofsearchresults.Asusersbecomemoreadvanced,andthe needtoproducemoreconcisesetsofsearchresultsincreases,understandingthefullcapabilitiesofthis searchsyntaxbecomesincreasinglynecessary.Afullreviewoftheavailablequerysyntaxcanbefoundin Table5-3. Table5-3.SearchQuerySyntaxOverview
160
Operator
Example
Prefixmatchingforsearchkeywordsand documentpropertiesusingthewildcard *operator
Whensearchingfor“nor*”,resultsmayinclude“Norcross”, “north”,“normal”,etc.
The“AND”operatorspecifiesaresult mustincludebothtermsseparatedby “AND”.
Whensearchingfor“NobleANDSharePoint”,allresults returnedmustcontainboththeterm“Noble”andtheterm “SharePoint”.
The“OR”operatorspecifiesaresult mustincludeatleastoneoftheterms separatedby“OR”,butdoesnotneedto containboth.
Whensearchingfor“EnergyORNuclear”,resultswillinclude itemscontaining“Energy”,“Nuclear”,orboth“Energy”and “Nuclear”.
The“WORDS”operatorspecifiesthat terms inakeywordqueryaresynonyms.This issimilartothe“OR”operator.
WhensearchingforWORDS(Kids,Children),resultswill includeitemscontaining“Kids”aswellas“Children”and considerthemtobethesametermforranking.
The“NOT”operatorspecifiesaresult mustnotincludethetermfollowingthe “NOT”operator.
Whensearchingfor“EnergyNOTNuclear”,allresults returnedmustcontaintheterm“Energy”,butnevershould contain“Nuclear”.
The“-”(exclusion)operatorworksthe sameasthe“NOT”operator.
Whensearchingfor“Energy-Nuclear”,allresultsreturned mustcontaintheterm“Energy”,butexcluderesults containing“Nuclear”.
CHAPTER5■THESEARCHUSERINTERFACE
Operator
Example
The“NEAR”operatorspecifiesthe adjacentsearchtermsmustbewithin closeproximity toeachother.
Whensearchingfor“EnergyNEARNuclear”,allresults returnedwillcontain“Nuclear”withinalimitednumberof wordsafter“Energy”.
Theuseofquotationmarks(“”)for designatingexactsearchphrasesis supported.
Thestring“2009financialreport”willreturnallitemsthat containtheexactphrase“2009financialreport”.
Parentheses()canbeusedtocombine differentpartsofkeywordqueriesand groupsearchterms.
Thestring“(NuclearOROil)ANDEnergy”willreturnall resultscontaining“Energy”solongastheyalsocontain “Nuclear”or“Oil”termsaswell.
Propertyrestrictionscanbeenteredso thatresultsmatchspecificproperties.
Thequery“author:JoshNoble”willreturnonlydocuments authoredby“JoshNoble”.“filetype:pdf”willreturnonly PDF-typefiles.
Anycombinationoftheforegoingsearch Thequery“plantANDfiletype:pdf”willreturnonlyPDF documentscontainingtheterm“plant”.Also“instru*AND toolsissupported. (author:JoshORauthor:Dan)”willreturnallitems containingtheterm“instructions”authoredbyJoshorDan.
TheAdvancedSearchPage Sofar,thischapterhasprovidedadetailedwalkthroughofenteringsearchqueriesthroughthequery boxandsearchcenter.Theactionsthatcanbetakenonthesearchresultspagehavebeendiscussedin detail,andtheavailablequerysyntaxhasbeenexplained.Steppingbacktothequeryboxandsearch center,thereisathirdoptionallocationforbuildingqueries.TheAdvancedSearchpageallowsusersto buildmorecomplexsearchquerieswithoutmanuallyenteringanadvancedsearchsyntaxstring.For userswhohavenotyetlearnedtheavailablesearchquerysyntaxandwouldliketorefinethekeywords, languages,andpropertyrestrictionsincludedinasearchresultset,theAdvancedSearchpageprovidesa setofoptionsforbuildingmoreadvancedqueries. TheAdvancedSearchpagecanbeaccessedbyalinkontheAllSitessearchcenterpriortoentering aninitialqueryorfromtheAllSitessearchresultspageafterenteringaquery.Dependingonthesettings madebytheadministrator,itmayalsobepossibletoaccesstheAdvancedSearchpagebyalinknextto thequeryboxorsitesearchresultspage(Figure5-37).
Figure5-37.Advancedsearchlink
161
CHAPTER5■THESEARCHUSERINTERFACE
IftheusernavigatedtotheAdvancedSearchpagefromaresultset,thequerythatwasalready enteredwillbecopiedintothefirstfieldoftheAdvancedSearchpageinSharePoint2010.Ifadditional non-queryrestrictionswereenteredintotheresultset,suchasarefinement,itwillnotbecarriedinto theAdvancedSearchpage.AsshowninFigure5-38,withoutcustomizations,thispageallowsforusers toworkintwoprimaryareas.Theseareasinclude“Finddocumentsthathave…”and“Addproperty restrictions…”
Figure5-38.AdvancedSearchpage
KeywordsontheAdvancedSearchPage Thetwocategoriesofquerymanipulationarealignedwithsearchsyntaxdiscussedinthelastsection. Thefirst,“Finddocumentsthathave…”,iswherethekeywordsforthequeryareentered.Thesefields allowtheusertoexecuteoperatorsotherthantheANDoperatorbyenteringthesearchterminthe correspondingfreetextfield.Byenteringasearchtermintoafreetextfield,theoperatorindicatedby thefield’sdescriptionwillbeexecutedbehindthescenes.Thefieldscorrespondtotheoperatorsin Table5-4.
162
CHAPTER5■THESEARCHUSERINTERFACE
Table5-4.SearchQuerySyntaxOverview
Field Title
Operator
Allofthesewords
AND
Theexactphrase
""
Anyofthesewords
OR
Noneofthesewords
NOT
Allofthetermsthatshouldbeinthesearchresultareenteredinthefirsttextfield,titled“Allofthese words”.TheANDoperatorwillautomaticallybeinsertedbetweenthewordsenteredintothisfield.Any phrasesthatcontainmultiplewordsthatneedtooccurinaspecificordernexttoeachothercanbe enteredintothesecondfield,titled“Theexactphrase”.Thephrasewillbetreatedasifithadquotation markssurroundingit.Forexample,SharePointExpertwillreturnresultswiththisexactphraseinthe orderthetermsareentered,unlikethe“Allofthesewords”field,whichwouldreturnresultsthatinclude “SharePoint”andtheseparatedterm“Expert”.Noquotationmarksarenecessarywhenenteringa phraseintothisfield.Thethirdfield,titled“Anyofthesewords”,willtreatallenteredtermsasifthey wereseparatedbytheORoperator.Wordsthatcanbutdon’thavetobeinthesearchresultareentered intothisfield.Theinclusionofone,butnotall,ofthetermsinthisfieldissufficienttoindicateadesired searchresult.Thefinalfield,titled“Noneofthesewords”,allowsfortheexclusionofthetermsentered intothetextfield.Searchresultswillnotincludeanyofthetermsenteredintothisfield. The“Finddocumentsthathave…”sectionalsonowincludeslanguagerestrictionsandresulttype refinements.Selectingthecheckboxnexttooneofthelistedlanguagesnarrowstheresultstoinclude onlyitemsthatwereauthoredinthechosenlanguage.Bydefault,thelanguagefieldofanitemisnot factoredintoitsavailabilityasaresult.Alllanguagessupportedbytheinstalledlanguagepacksare searchedon.Whenalanguagerestrictionischosen,SharePointwillexcluderesultsnotauthoredinthe chosenlanguage(s). Thelastoptioninthissectionistorestrictthesearchresultsbyaresulttype.Thisfunctionalityis identicaltotheresulttyperefinementonthesearchresultspagefortheavailablerefinements.By selectingaresulttypefromthedrop-downlist,onlyitemsmatchingthechosenresulttypewillappearin thesearchresultset.Whenchoosingaresulttype,SharePoint2010willincludeallversionsofthe format.Forexample,whenWordDocumentisselectedastheresulttype,fileswiththeextensions.doc, .docx,.dot,.docm,and.odtwillallbereturned.Theresulttypesavailableforselectionwithout customizationoftheAdvancedSearchpagecanbeseeninFigure5-39.
Figure5-39.Advancedsearchresulttyperefinement
163
CHAPTER5■THESEARCHUSERINTERFACE
PickingPropertyRestrictions Thesection“Addpropertyrestrictions…”allowsfortheabilitytocreatestringsofpropertyrestrictions fromaseriesoftwodrop-downboxesandafreetextfield.Usingthisoption,userscanstringtogether querieswithseveralpropertyrestrictionswithoutlearninghowtoenterthemintothesearchbox.Just likeapropertyrestrictionenteredasquerysyntax,eachpropertyrestrictionhasthreesections,which includethepropertyname,thepropertyoperator,andthevalue.Whenmultiplepropertyrestrictions arebuiltintotheadvancedsearch,afourthfield,whichallowsforrestrictionstobecombinedusingthe ANDoperatorortheORoperator,appears.Toaddorremoveadditionalpropertyrestrictions,simply selectthe+or–icontothefarrightofthepropertyrestriction. Thefirstdrop-downafterthephrase“Wheretheproperty…”islabeled“(PickProperty)”andallows theusertochoosethepropertythatwillberestricted(Figure5-40).Bydefault,thepropertiesshownin thefollowingfigureareavailablewhensearchingallresulttypes.Additionalpropertiesaremade availabledependingontheselectedresulttype.
Figure5-40.PickPropertyoptions Theseconddrop-downallowstheusertoselecttheoperatortobeusedinthepropertyrestriction. Dependingontheselectedpropertytype,theavailableoperatorswillchange.Ifthepropertyisatext,or string,thenthe“Contains”,“Doesnotcontain”,“Equals”,and“Doesnotequal”operatorswillbe available.Ifthepropertyisaninteger,then“Equals”,“Doesnotequal”,“Greaterthan”,and“Lessthan” operatorsareavailable.Ifthepropertyisatimeordate,thenthe“Equals”,“Earlierthan”,and“Later than”operatorsbecomeavailable.Table5-5liststheavailableoperatorsandtheircorresponding symbolforuseinsearchquerysyntax.
164
CHAPTER5■THESEARCHUSERINTERFACE
Table5-5.AdvancedSearchPropertyRestrictionOperators
Field Title
Operator
Contains: Doesnotcontain
Equals= Doesnotequal
NOT
Greaterthan
>
Lessthan
50MB.
Figure5-42.ConfiguringaquerytoreturnonlyWorddocumentsover50MBauthoredbyJoshNoble
166
CHAPTER5■THESEARCHUSERINTERFACE
ThesearchinFigure5-43willreturnresultsforanyEnglishPowerPointpresentations,nomatterthe extension,thatcontainthephrase“SharePointSearchExpert”.Thissearchistheequivalentofentering thequery(DetectedLanguage="en") (FileExtension="ppt" OR FileExtension="pptx" OR FileExtension="pptm" OR FileExtension="odp") AND SharePoint Expert.
Figure5-43.ConfiguringaquerytoreturnonlyEnglishPowerPointpresentationscontainingthephrase “SharePointExpert” Forusersthatwouldliketolearntheavailablesearchquerysyntaxandbecomelessreliantonthe AdvancedSearchpage,trythis. BuildasearchqueryintheAdvancedSearchpage.Makesuretoincludethepropertyrestrictions andkeywordsyntaxyouwouldliketolearnhowtoentermanually.Executethesearchandtakenoteof thecontentproducedinthesearchfieldatthetopofthesearchresultspage.Figure5-44showsan exampleofpartofanadvancedquerysyntaxthatwouldbeproducedbyspecifyingascope,last modifieddate,andfileextensionontheAdvancedSearchpage.
Figure5-44.AdvancedsearchsyntaxafteraqueryfromtheAdvancedSearchpage
167
CHAPTER5■THESEARCHUSERINTERFACE
Thissearchsyntaxalsocontainsallofthekeywords,property,andscoperestrictionsbuiltintoan advancedsearchquery.ThissyntaxcanalsobeenteredintoanySharePointsearchfieldtoreproduce thesameresults.Thesyntaxisalsousefultolearnthestructureofsearchstrings,operators,and propertyrestrictions.Takingnoteofthissyntaxwillguideyourknowledgeofthesearchsyntaxthrough repetition.Eventually,youwillnotneedtonavigatetotheAdvancedSearchpageforyourcommonly enteredexpressions.
ThePeopleSearchPage Workingwithdocuments,lists,andwebpagesisonlyoneofthemanyreasonsSharePoint2010is attractiveasaportalandcollaborationplatform.AnotherpartoftheequationisSharePoint’sabilityto connectpeoplewithotherpeoplethroughitsformofsocialnetworking.Peoplehavedifferentskills, competencies,resources,andnetworksthataremostlikelynotimplicitlyknowntoeveryoneinan organization.TheaggregationofknowledgeaboutpeopleiswhathasmadesocialnetworkingInternet sitessuchasFacebook,MySpace,andLinkedInsuchcoreexperiencesinsideandoutsideoftheoffice. Thevalueofparticipatinginthesesitesisnottofindinformationstoredwithindocuments,buttofind informationstoredwithinandaboutpeople. Withinacompany,peoplearearguablythemostvaluableresource.Knowingwhocanprovidethe rightexpertise,whoknowswhom,andwhoworksforwhomcanprovideanswersthatacompany directorycannot.Knowledgeaboutpeople’scompetencieswithinanorganizationcanproducegreater efficienciesbydirectinganswerseekerstoknowledgeableexperts,insteadofreproducingresearchand answers.SharePoint2010canprovidetheplatformforconnectingpeoplewiththisinformation.Ifauser needsalistofemployeesthatknowhowtomanufactureawidget,orcreateaspecializedspreadsheet,or reviewalegalagreement,SharePoint2010canprovidethoseanswersthroughthePeoplesearchpage.
■NoteThissectionisnotabouthowtodirectSharePointtocrawldataaboutpeople,butinsteaditisabouthow toretrievethatdataonceitiscrawled.ForfulldetailsonhowtocrawlandindexMySites,blogs,andcollaboration sites,pleaserefertoChapter3.
Ifsetup,thePeoplesearchpagecanprovideaccesstodatasuchasthatfoundinMySites,user profiles,ActiveDirectory,websites,collaborationsites,aswellaspersonalandprofessionalblogs.This informationcanalsoberestrictedbyprivacyprotectionrulessuchasLDAPandActiveDirectory securitytrimmingonaperuserbasis,asdiscussedinChapter3. ThePeoplesearchpagecanbeaccessedthroughthesamepathwaysasanAllSitessearchpage.To review,thesepathwaysincludenavigatingtothesearchcenterandselectingthePeopletab,orentering asearchinthequeryboxandselectingthePeoplesearchscope.Figure5-45showstheselectionofthe Peoplescopeifthisoptionisenabledonthequerybox.
168
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-45.Peoplescopeonthequerybox
PeopleSearchOptions SimilartotheAllSitessearchpage,navigatingthethePeoplesearchtabprovidesafewoptionsnot availablebydefaultfromthequerybox.TheseincludealinktothePreferencespageandalinktoopen thesearchoptions.ThePreferencespageisbydefaultidenticaltothePreferencespageforAllSites search.SelectingSearchOptionsopensupthePeoplesearchequivalentofadvancedsearchoptions. UnliketheAdvancedSearchpagefoundontheAllSitessearch,however,selectingSearchOptions simplyopensasetoffreetextfieldstoenteradditionalparameterstothequery.Thedefaultfieldsfor SearchOptionsareshowninFigure5-46.
Figure5-46.Peoplesearchoptions ThesearchfieldsthatdirecttowardaPeoplesearchresultspageworkjustlikeanyothersearch field.Aqueryisentered,inthiscaseforaperson,skill,jobtitle,keyword,etc.,thequeryisrun,andthe resultsarereturnedonthePeoplesearchresultspage.AsseeninFigure5-47,thelayoutofthissearch resultspageisfairlysimilartotheAllSitessearch,withafewexceptions.
169
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-47.Peoplesearchresultspage ThesearchfieldandthePreferencespagestillappearatthesamelocation.TheSearchOptionslink replacestheAdvancedSearchpagelink,butsimplyopensupanadditionalsetofoptionsbelowthe queryfield.Theseoptionsarethesameasafreetextpropertyrestriction.TheLastNameandFirstName fieldsallowausertosearchforaperson’sfirstorlastnamerespectively.Searchqueriesarenotcasesensitive,sothereisnoneedtocapitalizethefirstletterofafirstorlastnameinthequery.TheLast NameandFirstNamefieldswillsearchforexactmatchestotheenteredquery,soifauserentersthe query“Sand”intotheLastNamefield,itwillnotreturnresultsforauserwiththelastname “Sanderson”.ToindicatethataqueryenteredintotheLastNameorFirstNamefieldsisintendedtobe partofaname,andnotanexactmatch,theusermustenterthewildcardcharacter,“*”.Itisimportantto notethatjustlikesearchinginAllSites,partialwordsearchesarerestrictedtoprefixmatchinginPeople search. TheJobTitleandKeywordsearchfieldswillalsomatchonlyanexacttermunlessthewildcard operatorisinserted.Unlikefirstandlastnames,however,thesefieldsinaresultmayincludemorethan oneterm.Consequently,theenteredkeywordorjobtitlemustmatchexactlyonetermintheresult,but theresultdoesn’tneedtomatchonlytheenteredquery.Asaresult,enteringpartofajobtitle,suchasa queryfor“sales”,wouldreturnpeoplewiththejobtitle“Sales”,“RegionalSalesManager”,or“Sales Director”,sinceeachcontainsanexactmatchfortheterm“sales”. Asmentionedearlier,theSearchOptionssectionfunctionsjustliketheAdvancedSearchpageand morespecifically,propertyrestrictions.Justlikepropertyrestrictionsfordocuments,notalluserswillbe concernedwithlearningtousepropertyrestrictioninPeoplesearch,especiallyconsideringthatsearch optionsoccurasadrop-downinsteadofacompletelydifferentpage.Itmaybeuseful,however,for someusersandadministratorstoknowthepropertynamesforthefieldsinthissection.Thereasonfor thisisthatthefieldsinthesearchoptionsdonotallowformultiplepropertyrestrictionsonthesame propertyasintheAdvancedSearchpage.Ifauserenterstheterms“JoshRobert”,“JoshORRobert”, “Josh;Robert”,oranyothercombinationthatmayseemlogicalinadifferentsearchenginetodenote twoseparateterms,thedesiredresultswillnotbereturned.Thismeansthatifauserwishestoreturn resultsforuserswitheitherthefirstname“Josh”or“Robert”,theuserisunabletodosowithout manuallyenteringthepropertyrestrictionsyntaxshownhere. FirstName:"Josh" OR FirstName:"Robert"
170
CHAPTER5■THESEARCHUSERINTERFACE
Whenmultiple,differentfieldsorpropertyrestrictionsontheSearchOptionsarecompleted,each fieldwillbeseparatedwiththeANDoperator.Thismeansthatthequerywillreturnonlyresultsthat matchthetermsenteredinallfields,butwillnotreturnresultsthatmeetaportionofthequery.Toassist inthebuildingofbroaderPeoplesearchqueries,thedefaultpropertynamescanbefoundinTable5-6. Table5-6.PeopleSearchPropertyNames
Property Name LastName FirstName JobTitle Responsibility Skills Interests
StandardWebPartsinPeopleSearchResults ThePeoplesearchresultspagedoesallowfortheAlertMe,RSS,andSearchfromWindowsactions providedintheAllSitessearch.ThesefeaturesoperatethesameinPeoplesearchastheydoinAllSites search.ThissearchpagealsoallowsforfacetedsearchrefinementsthatfunctionjustlikeAllSitessearch, butthepagealsoallowsforfilteringonpropertiesrelevanttothepeoplescope.Thedefaultrefinersin PeoplesearchincludeViewandJobTitle,buttheseoptionscanbeexpandedbytheadministrator dependingonthemanagedpropertieswithanenvironment.Viewallowsforuserstospecifyiftheresult wasreturnedduetoaquerymatchintheperson’sprofileorname.Dependingonthetypeandamount ofinformationprovidedwithinaperson’sprofile,thisprovidesausefultooltospecifywhetherauseris lookingforaspecificperson,orsomeonethatworkswithorknowsaperson.RefiningbyJobTitleis usefulforlargerresultsetsinwhichtheusergenerallyknowsthetitleofthepersonheorsheislooking for,butmaynotbeabletobespecificenoughtoenterasearchforJobTitleintheSearchOptions. InformationaboutmappingadditionalmanagedpropertiestoPeopleisdiscussedinChapter3,and informationaboutaddingadditionalrefinementsisprovidedinthefollowingchapter.
UsingPeopleSearchResults AswiththeAllSitessearchtab,Peoplesearchprovidesaclusterofinformationaboutapersonand highlightsthequeriedkeywordwithintheresult.AnindividualitemfromthePeoplesearchresultsis showninFigure5-48.
171
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-48.IndividualsearchresultinthePeoplesearchresultspage Bydefault,eachitemintheresultsprovidesaperson’sname,title,department,andother informationaboutthedisplayedperson,suchascontactinformation.Thenameofthepersonis actionableand,whenclicked,willbringtheusertothepersonal“MySite”ofthatperson.Unlikethe standardAllSitessearchresult,however,therearemanymoreactionsthatcanbetakenonPeople results.Ifconfigured,aperson’sMySiteactsasahubofinformationaboutthatuserandincludes expandedinformationsuchascontactinformation,hisorherorganizationalchart,sharedcontent,tags andnotesonsites,colleagues,andparticipatingmemberships,suchase-maildistributionlists.Muchof thisinformationisaccessibledirectlyfromtheremainderofthesearchresult. Ifapersonhasuploadedaprofilepicture,itwillbedisplayedontheresult.Betweentheperson’s nameandpicture,asmallsquarebox,actingasalink,providesaccesstotheuser’sprofilecontactcard. InSharePoint2010auser’sprofileisalsocalledapresence.Ifauserisonline,thisboxwillturngreen. Clickingtheboxwillprovideanadditionalsetofoptionssuchascontactinformation,theabilityto initiateane-mail,instantmessage,orphonecall,orscheduleameetingdirectlyfromtheresultspage. ThedefaultactionsthatareavailablewhenclickingthecontactcardareshowninFigure5-49.
Figure5-49.Peoplesearchcontactcard
172
CHAPTER5■THESEARCHUSERINTERFACE
TakingActiononResults OnadefaultPeoplesearchpage,belowthenameandcontactinformationofaperson,therearethree links.Theselinksallowtheusertotakeactionontheresult.ThefirstavailableactionistheAddtoMy Colleagueslink.Eachuser’sMySitehasapagethatsupportsthisaction.Theendresultoftakingthis actionisthattheselectedpersonwillbeaddedtoauser’sColleagueslistonhisorherprofile.The ColleagueslistisasharedlistofcolleaguessimilartoconnectionsonLinkedInorfriendsonFacebook. Whenchoosingtoaddacolleague,theuserisnavigatedtoapagethatallowstheusertoselectthe settingoftherelationship.Thesettingsthatcanbemadeincludeselectingthecolleague,addinghimor hertoateamorgroup,andsettingthegroupsthatcanseetherelationship.TheAddColleaguespageis showninFigure5-50.
Figure5-50.Addinganewcolleague SelectingtheoptiontoBrowseinOrganizationalChartwillnavigatetheusertotheselected person’sOrganizationtabonhisorherMySite(Figure5-51).Iftheorganizationalchartisestablishedfor theselectedperson,theusercanviewotherpeopleintheperson’sverticalandlateralhierarchy. Managerstheyreportto,thepeoplethatreporttothem,andpeopleatthesamelevelofthehierarchy aredisplayed.Peoplehigherintheorganizationalhierarchyareshownabovethecurrentperson’s contactcard,peopletheyworkwithatthesamelevelareshowntotheleftandrightofthecontactcard, andpeoplewhoreporttothepersonareshownbelowthecontactcard.Usingtheselectedperson’s contactcardasastartingpoint,userscannavigatethroughthecontactsrelatedtothepersonandview hisorhercontactcards.Userscancontinuetofollowthisstructureoforganizationalhierarchyaway fromtheinitiallyselectedpersonuntiltheyfindtherelatedcontactstheymaybesearchingfor.
173
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-51.Organizationchart Thelastoptiononeachresultallowstheusertoseeabrieflistofitems“about”thepersonaswellas itemsauthoredbytheperson.Whenclicking“Byperson”,awindowopensonthepagethatdisplaysa listoffiveitemsfromtheAllSitessearchandprovidestheabilitytoshowmoreresults“about”the personfromAllSitessearch.Thelistshownunder“person”isthetopfiveresultsthatwouldbereturned ifthefollowingquerywasenteredinto“AllSites”search. person author:"person" Forexample,ifthepersonbeingactionedintheresultwasnamedJoshNoble,thetopfiveresultsfor thesearchquery(JoshNobleauthor:“JoshNoble”)wouldbereturned.Thisqueryreturnsresultitems wheretheperson’snameistreatedasakeywordandheorsheisoneoftheauthors.Iftheoptionto showmoreresultsisselected,asecondwindowappearsandasearchresultspageisshownforthefull listofresultsonthecorrespondingquery.TheresultspagecanbetreatedjustlikeanyAllSitessearch resultspage.Ifausertabstomoreby“person,”thenthesameactionsoccurbutinsteadforthefollowing query. author:"person" Thisqueryskipslookingforitemsthatincludethepersonasakeywordandreturnsonlyitems wherethepersonisanauthor.Bothoftheseoptionsallowforaconvenientsocialnetworkingfeatureto finditemsrelatedtopeople,teammates,andcolleagueswithinanSP2010environment.
ExpertiseSearch SharePointhasonefinalandextremelyinterestingfeatureinSharePoint2010PeopleSearch.Usersnow havetheabilitytoexecuteanexpertisesearchforthemselveswithaspecialsetofcontent.Expertise search,whichismorecommonlyreferedtoas“vanitysearch,”issimilarto“googlingyourself.”Ina strongefforttobuildoutthesocialnetworkingfeaturesinSharePoint2010,whenausersearchesforhis orherownprofile,afewuniquefeaturesarereturnedinadditiontothestandardPeopleresultcontent. ThesefeaturescanbeseeninFigure5-52.
174
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-52.Vanitysearchresult WhenviewingyourownPeoplesearchresult,youcanfindyourAboutMeandAskMeAbout “blurbs”totherightoftheresult.The“AboutMe”sectioniswhereyoucanprovideapersonal descriptionofyourself.The“AskMeAbout”sectiontellspeopleaboutyourinterests,skills, responsibilities,andbusinessspecialties.Bothofthesesectionsareessentiallyanelevatorpitchof yourselftoallotherSharePointusers.Keepingthisinformationuptodateisessentialfororganizations thatrelyonSharePointtoconnectpeoplewitheachother.Ifyourprofileisoutofdate,thenotherusers maycontactyouaboutprojectsyouarenolongerinvoledwithormaynotbeabletofindyouforthe projectyouarecurrentlyworkingon.ThecontentforboththesesectionscanbeeditedonyourMySite profile. WhenreturningyourownPeoplesearchprofileasaresult,youwillalsobepresentedwithauniqe boxbelowtheresult.Thisbox,convenientlytitled“Helppeoplefindme”,containsafewhelpfultools andinformationtoaidotherSharePointusersinconnectingtoyourprofile.Ontheleftsideofthisboxis alinktitled“UpdateMyProfile”,whichlandsonyourMyProfileeditpage.Belowthislinkarethe statisticsonthenumberoftimesotherSharePointusersexecutedsearchesthatreturnedyourprofileas aresult.Statisticsarepresentedforsearchesoverthelastmonthandthelastweekbydefault. Therightcolumnofthe“Helppeoplefindme”boxisheadedbyanotherlinktoyourMyProfileedit pagetitled“UpdateMyKeywords”.Justlikedocumentsearching,keywordsarestructuredproperties thatSharePointusestoconnectsearchqueriestorelevantresults.Consequently,creatingaccurate keywordsforyouruserprofilewillhelpotherusersreturnyourprofileintheirsearchresultswhen appropriate.Keepingyourkeywordsup-to-dateisaneasywaytoimproveyourprofile’srelevancy.To aidinthiskeywordcreation,anoverviewofthekeywordsthatotherusershaveenteredthatledtoyour profilearepresentedbelowthe“UpdateMyKeywords”link.
175
CHAPTER5■THESEARCHUSERINTERFACE
ThePreferencesPage ThefinallinkthatcanbeselectednexttothequeryfieldonboththeAllSitesandPeoplesearchpagesis thePreferencespage.Thispageallowsuserstosetuserprofile-specificsettingsforsearchingsuchas whethersearchsuggestionsappearandthelanguagesthatareused.Theuser-selectedsettingsmadeon thissiteareappliedtoauser’sentireSharePointsearchexperience,disregardingwhichcomputerthe userusestoaccessSharePoint.SettingsaretiedtoauserprofileandnotanIPaddressandarethesame acrossallwebapplications.ThePreferencespageisaccessedbyclickingthePreferenceslinktotheright ofthesearchfield(Figure5-53).
Figure5-53.Preferencespagelinklocation AfterclickingthePreferenceslink,theuserisnavigatedtothePreferencespage,showninFigure554.TheSearchSuggestionssettingenablesordisablessearchsuggestionsfromthesearchboxforthe currentuser.ThisisespeciallyusefuliftheuseraccessesthesearchboxviatheInternetonaconnection withhighlatency.Thiswouldinsomecasescausesignificantdelaywhenshowingsearchsuggestionsor otherwisedisturbtheuserexperienceofthepage—thereasonbeingtheround-tripbetweenclientand serveristakingtoolongwhenenteringtextintothesearchbox. TheLanguagesettinginthePreferencespageisusedtodefinethestemmersandwordbreakers usedforsearching.Sincedifferentlanguagesincludedifferentstemmersandwordbreakers,specifying thesetthatSharePointutilizes,ifmorethanoneisavailable,canhelptoprovideincreasedrelevanceto userssearchingoninternationalinstallations.
■NoteManuallyselectinglanguageshelpsovercometheprobleminMOSS2007,wherethecurrentbrowser languagesettingwoulddictatewhichstemmerandwordbreakerwereused.Modifyingthepreferencesoverrides thebrowserlanguagesetting,thusprovidingasolutiontothisproblem.
176
CHAPTER5■THESEARCHUSERINTERFACE
Figure5-54.Preferencespage Theusercanturnsearchsuggestionsonandoffforthelogged-inuserprofilebycheckingand uncheckingthecheckbox.ThissettingisignoredifSearchSuggestionsareturnedoffontheSearchBox WebPart.Tospecifyspecificlanguagestobeappliedtothesearchquery,theusercanselecttheradio buttonnextto“Searchusingthefollowinglanguages”.Theusercanselectuptofivelanguagestouse duringsearchforthelogged-inuserprofilebycheckinganduncheckingthecorrespondingcheckboxes.
Summary Forusers,theabilitytoquicklyandefficientlyconnectwithinformationisthemetricbywhichasearch interfaceismeasured.ThischapterhaspresentedathoroughexplorationoftheSP2010Searchuser interface.Thechapterexploredthebasicwaysofexecutingqueries,eitherthroughthesearchquerybox orthesearchcenter.IthasexplainedthefeaturesandWebPartsavailableintheAllSitesandPeople searchresultspages.TheSharePoint2010querylanguagehasbeenoutlinedindetailtoexplainhow userscanexpandandrefinesearchesfromthequerybox.Finally,theAdvancedSearchandPreferences pageswereexplainedtoguideusersonhowtofurtherrefinesearches.Atthispointinthisbook,you shouldunderstandthebasichistoryandterminologyaroundsearchinSharePoint,beabletoplanthe infrastructureofadeployment,setupthecrawlerforvariouscontentsources,deployasearchcenter, andnowusethesearchuserinterface.Thenextchapterwilldeviatefromthefront-enduserinterface andexplorehowtomanipulatetheexperiencesoftheuserinterface.
177
CHAPTER 6
■■■
Configuring Search Settings and the User Interface Aftercompletingthischapter,youwillbeableto •
UnderstandandeditsettingsonsearchWebParts
•
Understandadministrativeaspectsofuserpreferences
•
Createandeditfederatedlocations
•
Understandthebehaviorofstemmers,wordbreakers,phonetics,andnicknames
•
Managekeywordsandsynonyms
•
Createandmanagesearchalerts
•
Understandandmanagesearchsuggestions
•
Addandmodifysearchscopes
•
Managesearchtabsandsearchpages
EverydeploymentofSharePoint2010bringswithitadifferentsetofsearchrequirements.For example,theinformationthatisimportanttoanengineeringcompanyisverydifferentthantheneeds ofafinancialinstitution.Theneedsofvarioususergroupswithinacompanyarealsoquitediverse. Usersfromhumanresources,marketing,andmanufacturingwillallnavigatetoasearchcenterwitha differentsetofgoalsandexpectations.Tocatertothisdiversity,SharePointhasbeendesignedtocreate flexiblesearchexperiencesbasedontheneedsofanorganization. Thepreviouschapterprovidedathoroughoverviewofthefront-endcomponentsofthesearchuser interface.ItexplainedthevariousWebParts,querysyntax,anduser-sidefunctionalityofsearchin SharePoint2010.However,thechapterdidnotdiscussmanipulationofthesearchuserinterfacefroman administrativepointofview.Itdidnotdiscusshowtoconfigureasearchuserinterface;itdetailedonly howtouseonethathadalreadybeensetup.Infact,asnotedthroughoutChapter5,manyofthe featuresthatwerediscussedarenotenabledonthesearchcenterbydefaultandmustbesetupbythe administrator.ThischapterpicksupwhereChapter5leftoffbydiscussingconfigurationsettingsforthe searchuserinterface.Aftercompletingthischapter,youwillbeabletoconfigurethesearchexperience ofyourSharePoint2010searchcenterandsites.
179
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
■NoteTheexplanationWebPartfeaturesareprovidedinthischapteronlyasareview.Forfulldetails,please refertothepreviouschapter.
Throughoutthischapter,thefocusisonunderstandingsearch-relatedsettingswithinthesearch userexperienceinSharePoint2010.Becauseofthelargenumberofsettingsthatcanbemade,wedonot discusseverysettingforeverycomponent,butinsteaddiscussthemostimportantsettingsofeach.The firstpartofthischapterdiscussestopicsinvolvingthesearchbox,suchassettingscopes,redirecting queries,configuringsuggestions,andcreatingfixedqueryterms.Thisisfollowedbyafocusonthe presentationofsearchresults,thelocationtheyarepulledfrom,thepropertiesthataredisplayedinthe resultset,andhowtoshowresultsfromexistingfederatedlocations. Thechaptercontinuestodiscussthevarioussettingsoftherefinementpanel.Sincethisisa significantnewfeatureinSPS2010,wediscusstopicssuchasgeneralsettingsandhowtoaddnew refinementcategoriesindetail.Weproceedtodiscusstheadministrativeconsiderationsregardingthe Preferencespageandphonetics.Wethenlookintohowtoestablishkeywordsandbestbetsinorderto pushcontenttousers.Anexplanationofalertsettingsisprovidedbeforeadeepdiveintoscopes.The chapterconcludesbyexplaininghowtocreatenewsearchtabsonasearchcenter. Manytimessearch-relatedsettingscanbehardtofind,andtweakscancauseunforeseen complexities.Whendescribingsearchsettings,wegivespecialattentiontoimplicationsrequiring possiblepitfallsandproviderecommendationsfordiagnosingandavoidingcommonproblems.In addition,wheneversettingsdependonconfigurationsdoneattheSearchserviceapplication(SSA)or sitecollectionlevel,areferencetotheappropriatesectionswillbenoted.
WebParts SharePoint2010containsnewWebPartsaswellassignificantimprovementstoexistingWebPartsin SharePoint2007.WhatisimmediatelyclearfromlookingattheWebPartsettingsishowXSLtemplate managementandincludedpropertiesconfiguration(calledcolumnsintheWebPartsettings)havebeen changedtobecentrallymanagedbydefaultfromCentralAdministration.ThisiscoveredinChapter7. Thissupportsbothcentralmanagementofthelookandfeelaswellasthenewfederatedstructure. AnothernoticeablethingaboutsearchWebPartsisthenewLocationsselector.InSharePoint2007,the architecturewasbasedonSharedServicesProviders.NowitisbasedonSearchserviceapplications (SSA),whichareconstructedaroundafederatedmodel.EvensearchinglocationsinSharePoint(the SharePointsearchindexandpropertystore)isafederatedsearch.ThisisreflectedinthenewWebPart settings.Federatedsearchiscoveredinmoredetaillaterinthischapter.
WebPartSettings WebPartsettingsarestoredindividuallyforeachinstanceofaWebPart.Theyarealsoconfigured directlyfromtheWebPartitself.TostarteditingWebParts,clickthePagetabontheribbonandclick Edit(Figure6-1).ThiswillchangethepagetoEditmode.Iftheribbonisnotshowing,itcanbeenabled fromtheSiteActionsmenu.
180
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-1.RibbonwithPagetabactive OpentheappropriateWebPartcontextmenu,andchooseEditWebPart(Figure6-2).Thiswillopen theWebPartsettingsmenu.NotethattheWebPartsettingsmenuislocatedintheupperrightcornerof theWebPartpageandthatthepagedoesnotautomaticallyscrolltothatlocation,soitmightbe requiredtomanuallyscrolltothetopofthepagetofindthesettingsmenu.
Figure6-2.AccessingWebPartsettings TheWebPartcontextmenualsocontainsoptionsfordeletingtheWebPartorexportingit.Web Partsthatareexportedpreservetheirconfiguration.ThismeansthataconfiguredWebPartcanbe exportedandlaterimportedagaineitherinthesameplaceoronadifferentWebPartpagewiththesame configuration.Thefollowingsectionswillcoverthesettingsmostadministratorsshouldknowor considerchangingwhenplanningtoutilizesearchinSharePoint.
SearchBox TheSearchBoxWebPartisusedtoreceivetheuserqueryinputandforwardtheinputtoasearchresults page.Inthissection,wewilllookatthefollowingsearch-relatedsettings(Figure6-3)ofthesearchbox: Scopes,QueryRedirection,QuerySuggestions,andAdditionalQueryTerms.
181
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-3.SearchBoxsettings AswithallWebPartsinsearchcenters,boththesearchpagesandthesearchresultpagescontaina SearchBoxWebPart.Thoseareconfiguredindependently.Thisisespeciallyuseful,asthesearchdialog WebPartonmultiplesearchpagescanredirecttothesamesearchresultpage.Thisallowsacustomized look,feel,andbehaviorofthesearchdialogslocatedondifferentsearchandsearchresultpages, withoutthehassleofcreatingmultipleresultpages.
Scopes Thesearchboxcanbeconfiguredtousescopesinanumberofdifferentways(Figure6-4).Eithera scopecanbeusedimplicitlyorascopedrop-downcanbeconfiguredtobedisplayed.Thisallowsthe usertoselectwhichscopetosearch.Itispreferabletoprovideadescriptionforthedrop-downlabelto helpusersidentifythepurposeofthescopes.Real-lifeexperienceshowsthatusersareoftenreluctantto useadvancedsearchfeatures,suchasscopes,ifitisnotverycleartothemwhytheycanbenefitfrom them.
Figure6-4.Choosingascopevisibilitymode FromtheScopesdrop-down(Figure6-5),youcanconfigurewhichscopesshouldbedisplayed.This waythesearchboxcanbeconfiguredtoeitherusehard-codedscopesettingsortoreceiveitsscope settingfromtheURLparameter.
182
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-5.Possiblescopevisibilitymodes “Contextualscope”meansthedisplayedscopeselectorwillshowscopesdefinedforthecurrentsite context.Thedefaultsettingistousethedefaultscopeofthetargetresultspage.Otheroptionsaretouse theURLparameter,whichcouldberelevantifthequeryisredirectedfromanothersearchcenter,or anotherexternallinkfromwhereaspecificscopeshouldbesetasdefault.
QueryRedirection Queryredirection(Figure6-6)enablestheperformedquerytoberedirectedtoasearchresultspageon anothersearchcenter.Redirectionisespeciallyusefulforwhenputtingsearchdialogsoncustompages outsidethesearchcenters.Thiswaythecreatorcanchoosewhichsearchcentershouldhandlethequery whilestillallowingthesearchtobeperformedusingaspecificscope(giventhattheresultspageis configuredtousethescopefromtheURLparameter).Queryredirectionsareconfiguredbyspecifying the“TargetsearchresultpageURL”.TheURLshouldbeenteredasarelativepath.
Figure6-6.Settingqueryredirectiontoaspecificresultspage Thescopedisplaygroupdefinesthegroupofscopesthatshouldbedisplayedtotheuser.Managing scopesisdescribedindetaillaterinthischapter.Thiswaythecreatorofthesearchcenterorthepage containingthesearchdialogcanchoosewhichsubsetoftheavailablescopestoenableforthegiven searchbox.
183
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
QuerySuggestions Querysuggestions,orsearchsuggestionsastheyarecommonlycalled,areshownasadrop-downonthe searchboxastheusertypesinsearchterms.Searchsuggestionsareshownas“search-as-you-type,”if anysuggestionsexistthatmatchthetextinthesearchbox.However,turningonthisfeature(Figure6-7) butselectingtheShoqquerysuggestionscheckboxdoeshavesomesignificantdrawbacksthatneedto beconsidered.First,thescopefromwhichsuggestionsaregeneratedisfarm-wide,whichmeansthat certainsearchtermsmighthaveadifferentmeaningfordifferentdepartmentsinanorganization.Alsoit isnotalwaysdesiredthataspecifictermshouldyieldasearchsuggestioninallsearchcenters.An examplecouldbethatsearchingfortheword“tax”shouldyieldsearchsuggestionsoncurrenttaxrelatedissuesinafinancedepartment,whereasinthesalesdepartmentitshouldyieldsuggestionson taxrelatedtodifferentproductgroupsandmarketsinstead.Anotheraspectissecrecy.Itmightnotbe desiredthateverybodyhaveaccesstosuggestionsofsearchesperformedbymanagement.These searchesmighthaveaprivatenature.Forthesereasons,itshouldbeconsideredwhethersuggestionsare feasibleforagivenorganizationorcorporation.
Figure6-7.Enablingquerysuggestions Turningonquerysuggestionsintroducessomeoverhead,asnewrequeststothewebapplication andinturntothesearchdatabasearemadeeachtimetheuserentersnewtext.Thiscanbemitigatedto somedegreebyintroducingasuggestiondelayandbyrestrictingthenumberofsuggestionstodisplay. Ifasearchboxhasheavytraffic,itcanbeagoodideatoturnoffquerysuggestionstoimprove performance.
■NoteUserscandisablequerysuggestionsontheUserPreferencespageonthesearchbox.Userscannot enablequerysuggestionsontheUserPreferencespageiftheyhavebeendisabledontheSearchBoxWebPart.
AdditionalQueryTerms IntheQueryTextBoxsettingspanel(Figure6-8)itispossibletospecifyadditionalqueryterms. Additionalquerytermsallowthesiteadministratortodefineadditionaltermstobeappliedtothe
184
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
search.Thiswaythesearchboxcanbetargetedtospecificqueriesthatarefeasibleinthegivencontext ofthesearchbox.Inorganizationsthiscouldbeusedtofurtherscopetheresultsofaspecificsearch page.Foranorganizationthathasapublic-facingwebsitewithalotofsubsiteseachrelatingtoa specifictopic,itmightbeusefulthatqueriesperformedinthesearchboxorsearchcenterofthatsite returnonlyitemsrelevanttothatparticularsite,butnotlimitedtospecificcontentbythenormalscopes group.Anexamplecouldbeahelporganizationthathascountry-specificsites.Itcouldlimitthesearch resultsetofqueriesperformedoneachcountry-specificsitetoyieldonlyresultsthatcontainthat particularcountryname,disregardingtheactuallocationoftheresult.
Figure6-8.Augmentingthequery Ifthetermsinfoandlocalarespecified,asinFigure6-8,thesearchresultsetwillnowbedependent ontheseadditionaltermsbeingpresent.Itisrecommendedtousethe“Additionalquerydescription label”andthe“Queryboxpromptstring”togivetheuserhintsaboutthepurposeofthegivensearch box,asshowninFigure6-9.
Figure6-9.Exampleofhintswhenusingqueriesaugmentedwithafixedkeyword Itisimportanttounderstandthataddingquerytermstolimitthesearchresultsreturneddoesnot replacepropersecuritytrimming.Itshouldbeusedonlyincaseswherethecontextofthesearchmakes itrelevanttoappendquerytermstonarrowdownsearchresults.
185
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
SearchCoreResults TheSearchCoreResultsWebPartisusedtoexecuteanddisplaysearchresults.Thequeryitselfis specifiedasURLparameters.Thequerycanbeaugmentedand/ormodifiedbysettingsontheWebPart. Inthissection,wewilllookatconfiguringthefollowingsearch-relatedsettings(Figure6-10)ofthe SearchCoreResults:LocationProperties,Fixed/AppendedQueryTermsandLanguage,andMetadata andSorting.Also,onthisWebPartthelayoutofthesearchresultscanbecustomizedusingXSLT,which isatemplatethatinSharePointisusedtotransformtheXMLoutputoftheWebPart(settingsandsearch results)intoHTML,whichisthendisplayedtotheuserinthebrowser.Someexamplesofhowtomodify theXSLToftheSearchCoreResultsWebPartaregiveninChapter7.
Figure6-10.SearchCoreResultssettings
LocationProperties PerdefaulttheSearchCoreResultsWebPartisunscoped,asshowninFigure6-11,butitusesthescope definedbytheURLparameter“s”ifdefined.Youcanconfigureadefaultscopetouseifno“s”parameter isgiven.The“s”parameterisespeciallyusefulincaseswhereadirectlinktothesearchresultspageis given.Suchscenarioscouldbealinkonacontentpagewherethelinkthenincludessearchtermsand scopesforaspecifictopicrelatedtothatpage.Forinstance,anorganizationcouldhavealinktoa Peoplesearchresultspageforpeopleinaspecificdepartmentinsteadofhavingtomaintainthat informationonthepageitself.Tosetahard-codedscope,enterthescopenameintheScopetextbox.
186
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-11.Choosingasearchlocation TheLocationproperty(Figure6-12)isusedtoallowselectionbetweenlocalandfederatedlocations. TheselectedLocationpropertyalsoaffectswhichmetadatapropertiescanbeincludedinthesearch resultsWebPart.
Figure6-12.Possiblefederatedsearchlocations Localoptionsincludethefollowing: •
LocalSearchResults:Thisisusedfornormalsearching.
•
LocalPeopleSearchResults:Theonlyhard-codedscopeinSP2010;people searchingincludesspecialfunctionalitytosupportbettersearchingforsimilar spellednames,etc.
•
LocalFASTSearchResults:ThisisusedfornormalsearchingwithFAST.
187
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Federatedoptionsincludethefollowing: •
InternetSearchResults:FederatedsearchreturningresultsfromMicrosoft’sLive Search
•
InternetSearchSuggestions:Federated-relatedsearches(suggestions)from MicrosoftLiveSearch
•
CustomFederatedLocations:Anycustom-definedfederatedlocationswillalso showupasaselectableoption.
■NoteNewlocationsareaddedusingtheFederatedLocationspageontheSSA,asdescribedlaterinthis chapter.
Fixed/AppendedQueryTermsandLanguage TheResultsQueryOptionsdialog(Figure6-13)hasoptionsfordefiningbothfixedqueriesandautoappendingpre-definedquerytermstotheuser’squery.Italsohasasettingformodifyingthequery behaviorbyspecifyingaquerylanguage.
Figure6-13.SettingquerylanguageandaugmentingthequeryofSearchCoreResultsWebPart
QueryLanguage Oneofthemostimportantandoftenignoredoptionsisthequerylanguage.Allmodernbrowsersallow theusertodefineabrowserlanguage.Thisisnotthelanguageofthebrowserinterface,butthelanguage preferencesubmittedtowebsites.TheresultsetreturnedbySharePointormostfederatedlocationsis affectedbythelanguagepreference.Acommonconfusionforendusersiswhycertainresultsarenot
188
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
returnedorwhytheygetdifferentresultsreturnedwhenperformingthesamesearchondifferent computers.Settingadefaultlanguageforcesthesearchtobeexecutedusingaspecificlanguage,word breaker,noisewordtable,andstemming(ifenabled).
FixedSearches TheFixedKeywordQuerysettingisaneasywaytodefinespecificsearchesthatdonotrequireuser input.TheSearchCoreResultsWebPartcanbeplacedonanypage.Ifafixedkeywordqueryisdefined, theresultsviewwillautomaticallybepopulatedwiththecorrespondingresultswhentheuserenters thatpage. Themainreasonthisissuchapowerfuloptionisthatitalsoacceptscomplexqueries.Itispossible tosetthefixedkeywordquerytoalwayssearchanddisplaynewsfromaspecificdepartmentinagiven timeframeusingadepartmentmanagedpropertyandoneofthedatepropertyvalues.
AppendedSearches Itisalsopossibletoappendtexttotheexistingquery(similartotheSearchBoxWebPart).Thisallowsall queriesredirectedtothegivenpagecontainingthisSearchCoreResultsWebParttobeaugmentedby thisappendedtext.Therelevancyis,forexample,ifthesearchcenteristargetingspecificcontent.Thus theappendedtextactsasaresultsetfilter.
MetadataandSorting TheCustomcolumnssetting,whichisconfiguredbyeditingtheFetchedPropertiestextbox(Figure614),isusedtospecifythemetadatatooutputtothesearchresultXML.Thisallowscustompropertiesor metadatatobedisplayedbymodifyingtheXSLTtemplate.InChapter7,anexampleisgivenofhowto addratingsmetadataanddisplayitbymodifyingtheXSLT.
189
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-14.Configuringsearchoutput TheLocationproperty,whichspecifiesthelocationtofetchpropertiesfrom,affectswhichmetadata propertieswillbeavailable.Fortheselectedlocation,onlypropertiesrelevanttothislocationare available.TherelevantpropertiesaredefinedatSearchserviceapplicationlevelifitisaSharePoint location.ForotherlocationsoutsideSharePoint,theyarenot. IfUseLocationVisualizationisselected,thefetchedpropertiesareautomaticallypopulatedandthe sectionisgrayedout.Ifitisrequiredtoeditwhichcolumnstofetchandoutput,deselectUseLocation Visualization.Thismakesthefetchedpropertiestextboxeditable.IftheFetchedPropertiesare configuredtoincludeapropertythatisnotavailablefromthelocation,thatpropertywillnotbe includedintheXMLoutputfromtheWebPart,whichmeansthatithasnoeffectwhenusedinanXSLT template. Toeditthelocationvisualization,gototheSearchserviceapplicationandopenLocalSearch ResultsFederatedLocation.HereanewsectionfortheCoreSearchResultsmetadataisadded. Thebenefitisthatitallowsaconsistentlookandfeeltobedefinedforsearchresultsonallsearch centersonthefarm.AsmentionedthiscanbeoverriddenlocallybyuncheckingtheUseLocation Visualizationcheckboxanddefiningwhichcolumnstooutput. ToaddacustomcolumnanddisplayitintheSearchCoreResultsWebPart,dothefollowing:
190
1.
Checkforcrawledproperty:Makesurethecustompropertyiscrawled.This canbedonebysearchingforitinthecrawledpropertiescollectiononthe relevantSearchapplication.
2.
Createmanagedproperty:Createanewmanagedproperty,andmapthis managedproperty’scustomcolumncrawledproperty.
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
3.
AddpropertytoWebPartoutput:OntheDisplayPropertiesgroupofthe SearchCoreResultsWebPart,addthenewpropertytotheColumnssectionby typingthenewcolumnnameas.
4.
AddpropertytoXSL:AddthecolumnforthecustompropertytotheXSL templatesuchthatitgetsrendered.ThisisdonebyclickingtheXSLEditor button,whichopensthebrowser-basedXSLtexteditor.Locateandapplythe appropriaterenderinglogicinside: .
AnotherimportantoptionistheDefaultResultsSortingsetting.InstandardSharePoint2010Search, itisnotpossibletoconfiguresortingforpropertiesotherthanRankingandModifiedDate.Thisis possibleinFASTsearch,wheresortingcanbeconfiguredforallmetadataproperties,includingcustom properties.
■NoteCrawledpropertiesareprefixedbyanacronymforitstypename.Ifthecustompropertyisoftypestring andthenameis“custom_property”,thecrawledpropertywillbe“ows_custom_property”.
TopFederatedResults TheTopFederatedResultsWebPartsettings(Figure6-15)areusedtoexecuteanddisplaysearchresults fromfederatedlocations.TheycontainthesamesearchsettingsastheSearchCoreResultsWebPart withtheexceptionoftheLocationproperties.AnotableadvantageofthisWebPartistheoptionto aggregateresultsfromseverallocations.Inthissection,wewilllookatthefollowingsearch-related settingsoftheTopFederatedResults:choosingafederatedlocationandusingtheasynchronousAjax options.Howtocreateandeditlocationsiscoveredlaterinthischapter.
Figure6-15.TopFederatedResultssettings
191
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
ChoosingaFederatedLocation Touseanynewfederatedlocation,chooseitfromtheLocationdrop-down.Alternativelythepre-defined InternetSearchResultslocationcanbeselected.Thissearcheshttp://bing.comusingtheOpenSearch 1.1standardandRSS.Tocompletetheconfiguration,followthesesteps.TheresultsareshowninFigure 6-16. 1.
Afterselectingalocation,clickApply,andthenOK.
2.
ClickStopEditingontheribbon,andtestthenewsettingswithaquery.
Figure6-16.Exampleoftopfederatedresults
UsingtheAsynchronousAjaxOptions Oneoftheimportantbutoftenoverlookedfeaturesistheoptiontouseasynchronousloadingof federatedsearchresults(Figure6-17).Somefederatedsourcesmayrespondslowly,causingtheuser interfaceinSP2010toseemunresponsive.
Figure6-17.Asynchronousloadingofexternalcontent
192
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Perdefault,theuserinterfacewillnotrenderuntiltheentirepageisready,whichincludesfetching allfederatedsearchresults.Toavoidthis,itisrecommendedtousetheEnableAsynchronousLoad optionforfederatedlocationsoutsideyourcompany’scontrol.
RefinementPanel AnewWebPartinSP2010istheRefinementPanelWebPart,alsoknownastherefinementpanel.The WebPartallowsuserstodrilldownthroughthesetofsearchresultsbaseduponmanagedproperties, metadata,andothercriteria.OnethingtopayattentiontoisthatrefinersinSharePoint2010arenot deeprefiners.Theyarebasedonanalysisofasubsetofthefullresultset.OnlyFASToffersdeeprefiners. Inthissection,wewilllookatthefollowingsearch-relatedsettings(Figure6-18)oftherefinementpanel: “Generalrefinersettings,”“Addingcustomrefinementsfrommanagedmetadatacolumns,”and“Adding customrefinementsfrommanagedproperties.”
Figure6-18.RefinementPanelsettings TotheleftofFigure6-19,thesetofrefinementsthatisavailableoutoftheboxisshown.Theseare allpreconfiguredinSharePoint2010.Thereareanumberofrefinementsbuiltin,includingfiletype,site, author,modifieddate,andtaxonomykeywords(ifanyareavailable).
193
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-19.ExampleofdefaultrefinersinSP2010
GeneralRefinerSettings TherefinerWebParthassomepowerfulsettings(Figure6-20)allowingeasyimplementationofcustom refinementcategoriesbasedonmanagedmetadatacolumnsandmanagedproperties.
194
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-20.Refinementconfiguration TheFilterCategoryDefinitionpropertyisaXMLfieldwhereeachcategoryisspecified.We’llalso lookatthatlaterinthechapter. Theaccuracyindexisthenumberofresultsitlooksattodeterminethingstorefine.Whatthisdoes meanisthatifthereissomethinguniquetorefineonbutitdoesn’toccuruntilresultnumber51,thenit willnotbeincluded.Theaccuracyindexhasahard-codedupperlimitof500toavoidexcessiveresource usage. Themaximumnumberofcategoriestodisplaycanbespecified.Thisissettosixby default.ExclusionwillbeperformedbytheorderingofthecategoriesintheFilterCategoryDefinition. TheUseDefaultConfigurationcheckboxcontrolsifdefaultorcustomvalueswillbeused.
■NoteTheUseDefaultConfigurationcheckboxmustbeuncheckedwhenmodifyingthefiltercategorydefinition andothersettings.Otherwiseanyeditedsettingswillnottakeeffect.
AddingaRefinerCategoryfromManagedMetadataColumns Itisveryeasytoaddanewrefinercategoryifthecolumntypeismanagedmetadata.Inthiscase,the SharePointsearchenginewillautomaticallycreatemanagedpropertiesoutofthecrawledproperties. TheonlymanualstepincludedistoaddtheappropriateXMLtotheRefinementPanelFilterCategory DefinitionXMLfile.ItispossibletosetmanymoreoptionsthantheonesshowninListing6-1.
195
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Listing6-1.XMLforManagedMetadataColumn
ThesearetheminimumrequiredoptionsintheXML. •
Titleisthenameofthecolumnorfieldthatthemanagedmetadataismappedto. TypehastobesettoTaxonomyFilterGeneratorforManagedMetadatafields.The mappedpropertyforManagedMetadatafieldshastobesetto ows_MetadataFacetInfo.
UnchecktheUseDefaultConfigurationoption,andexecuteasearchthatyieldsmultiplevaluesfor theaddedmanagedmetadatacolumn.InthedefaultFilterDefinitionConfigurationfile,twocategories areperdefaultdefinedinthisfashion.TheseareManagedMetadataColumnsandTags.Thedifference betweenthetwoisthattheTagscategoryisusedfortheenterprisekeywords,whiletheManaged MetadataColumnscategoryisusedformanagedmetadatacolumns.Thismeansthattherefinement panelpresentstwodifferentsourcesofdata.Themanagedmetadatacolumnsareforfilteringbasedon thedatacomingfromtheresultset,whereasthetagsareusedfornarrowingthesearchbasedon keywords.
AddingaRefinerCategoryfromManagedProperties Ifametadatacolumnisnotmanaged,thecrawlerneedstobeconfiguredtoindexthiscolumninorder tomakeitavailableforsearching.Toaccomplishthis,anewmanagedpropertymustbecreatedas follows: 1.
GotoCentralAdministration➤ManageServiceApplications➤SearchService Application➤MetadataProperties.
2.
Createanewmanagedproperty.Addamappingtothecrawledpropertyfor yourcolumn(e.g.,ows_custom_0x0020_property),andperformafullcrawlon theappropriatecontentsources.
■NoteSeehttp://technet.microsoft.com/en-us/library/ee424403.aspxfordetailsonmanaged metadata.
3.
196
Thecrawledpropertyisnowmappedtoamanagedpropertyandcanbeused intherefinementpanelbymodifyingtheFilterCategoryDefinitiononthe RefinerWebPart.
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
4.
AddtheXMLinListing6-2totheRefinementPanelFilterCategoryDefinition XMLfile.UnchecktheUseDefaultConfigurationoption,andexecuteasearch thatyieldsmultiplevaluesfortheaddedmanagedproperty.
Listing6-2.XMLforManagedProperty
ThefollowingisabriefdescriptionofeachlineinListing6-2. •
Title:Thisisthenameofthecategorytodisplay.
•
Description:Thisisthetexttobeshownasahintforthefilters.
•
Type:ThishastobesettoManagedPropertyFilterGeneratorformanaged properties.
•
MetadataThreshold:Thisistheminimumrequiredpossibleoptionsreturnedfor thisfilterbeforethecategorywillbedisplayed.
•
NumberOfFiltersToDisplay:Thisisthemaximumnumberofpossibleoptionsto showforthiscategoryindefaultview.
•
MaxNumberOfFilters:Thisisthemaximumnumberofpossibleoptionstocollect forthiscategory.
•
ShowMoreLink:Whetheralinkshouldbedisplayedifmorethan NumberOfFiltersToDisplayisreturned
•
MappedProperty:Formanagedproperties,thisisthenameofthecolumnorfield thatthemanagedpropertyismappedto.
■NoteIfUseDefaultConfigurationischecked,thechangeswillnotbereflectedintherefinementpanel.Thisisa typicalsourceoffrustration.Also,checkingitagainwilloverridewhateverchangeshavebeenmade,soalways backupanyconfigurationmadetoXMLfiles.
197
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
WhyAretheRefinersNotShowing? Whentherefinersarenotshowingasexpected,thisisoftencausedbyoneofthefollowing: •
Afullcrawlhasnotbeenexecutedafterthemanagedpropertyhasbeencreated.
•
Theresultsetisnotbigenoughtocontaindatafortherelevantcolumntomake therefinermeaningful.
•
TherefinersareshownintheordertheyaredefinedintheXML.Forexample,if thenewrefinercategoryisplacedascategorynumber7,buttherefinementpanel isconfiguredtoshowonlythefirstsixcategories,itwillnotbedisplayedinthe panel(ifthefirstsixcategoriesareshown).
■NoteTheconceptofrefinersorfacetedsearchisnotpartofSharePoint2007,althoughasignificantnumberof searchcentersactuallyhaverefinersbasedoneitherthefacetedsearchWebPartfromCodePlexorthemore complexsearchcenterofferedbytheOntolicaproductfromSurfRay.Thelatteractuallyincludesnumbered refinersforbothSP2007andSP2010.
FederatedSearch Previouslyinthischapter,itwasshownhowtoselectalocationtosearchontheSearchCoreResults WebPart.LocationsarecentraltothenewwaysearchworksinSharePoint2010.Now,thesearch frameworkiscenteredaroundfederationandfederatedlocations. Thissectionfocusesonunderstandingwhatfederatedlocationsareaswellasbestpracticesonhow tousethem.Italsogivesadetaileddescriptionoftypicalmanagementtasksrelatedtofederated locations.
FederatedLocations SharePoint2010comeswithapreconfiguredsetoflocations(Figure6-21),whichincludeslocal locationsthatareindexedandsearchedbytheSharePoint2010searchengine.Itis,however,sometimes requiredthatcontentisindexedoutsideSharePoint.Thelistoflocationscanbeexpandedtoinclude otherfederatedlocationsaslongastheysupporttheOpenSearch1.0orOpenSearch1.1standards. Examplesofwhenfederationisfeasibleincludethefollowing:
198
•
Largeexternalcontentsourcesthatarealreadyindexedelsewhere;Wikipediaisan exampleofthis.
•
WhenthescheduledcrawlerinSharePointisnotoptimal—forinstance,when contentchangesrapidlyandneedstobeimmediatelyavailable.Forthesecasesa customcrawlerandindexarebetter.
•
SecuritysetuprequiresacontextnotavailableinSharePoint.Thiscould,for example,bewhencontentisstoredonadifferentisolateddomainandthesearch needstobeperformedusingadifferentsecuritycontext.
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
•
Thecontentisindexedexternallyandonlysearchedforrarely,whichmakesit overkilltoindexitinSharePoint.
•
Thelimitationof500contentsourcesinSharePointforcestheuseoffederated locations.
Insomecases,however,itisnotfeasibletousefederation.Examplesofthisincludethefollowing: •
BandwithbetweentheSharePointfarmandthefederatedlocationistoosmall suchthatcrawlingandindexingarenotpossiblewithareasonableperformance.
•
Thecontenttobeindexedischangingraplidlybutdoesnotneedtobe immediatelyavailable.
•
Itisnotpossibleorfeasibletoindexthecontentexternally.
•
Itisnotpossibletomakethecontentsearchablethroughthesupported OpenSearchspecifications.
FederationisconfiguredfromtheSearchserviceapplication.Toopenthefederationpage,goto CentralAdministration➤SearchServiceApplication➤FederatedLocations.
Figure6-21.FederatedLocationspage
199
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Anewfederatedlocationcanbecreatedinthreeways: •
ImportLocation:ItwillpromptforanFLD(FederatedLocationDefinition)file. Thisfilecontainsallinformationrequiredtoautomaticallyconfigurethelocation.
•
NewLocation:Allsettingsmustbespecifiedfromscratch.
•
CopyLocation:Optionavailableonthedrop-downofexistinglocations;thiswill duplicatethatlocationanditssettings.
Whichmethodshouldbechosendependsonthescenario.ForcaseswhereanFLDfilealready exists,thisoptionisbest.EveniftheFLDfiledoesnotcontaintheexactconfigurationneeded,itismuch easiertomodifyanexistingdefinitionthantocreateonefromscratch.Thesamethingappliesifa definitionthatissimilartothenewoneexists.ThenitisalmostalwaysabetterchoicetousetheCopy optiontoduplicateanexistinglocationandthenmodifyitasneeded.Thisisgenerallythebestpractice withSharePoint.Startwithsomethingthatworks,andthenmodifyit.AlotofdevelopersandIT professionalshavespentcountlesshourstryingtosolveproblemsthatarehardtoidentifybecausethey attemptedtoconfigurefromscratchinsteadofmodifyingsomethingthatworks.SharePointisnot alwaysgenerouswithitserrormessages.
■NoteFederatedlocationsmustsupporttheOpenSearch1.0/1.1standards.
ImportLocation Theeasiestwaytoaddanewfederatedlocationistousethelocation’sFLDfileforSharePoint2010(if oneexists).FLDfilesaretypically15–50kilobytes.TheFLDfilecontainsalltherulesandmarkup requiredtomakeitshowintheSharePointfederatedsearchWebPart.
■NoteMicrosofthaspublishedasetoffederatedsearchconnectorsonhttp://technet.microsoft.com/enus/enterprisesearch/ff727944.aspx.
ToaddaconnectortoSP2010(Figure6-22),followthesesteps:
200
1.
Openthefederationpage:CentralAdministration➤SearchService Application➤FederatedLocations.
2.
ClickImportLocationtoopenthefiledialog.
3.
BrowsetotheFLDfile,andclicktheOKbutton.
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-22.LoadingFLDfile AfterimportinganFLDfile,apromptwillbeshownwiththeimportresult(Figure6-23).Itisnot possibletoimportmalformedFLDdocuments.Theimportantpartofthismessageisthenotethatthe locationmustbeaddedtoapropertyontherelevantWebPartinthesearchcenter.
Figure6-23.FLDfileloadedresult AftersuccessfullyimportingtheFLDfile,itnowshowsasanitemintheFederatedLocationslist (Figure6-24).
201
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-24.FederatedLocationspagewithnewlocations
NewLocation Newfederatedlocations(Figure6-25)canbecreatedforboththeexistingSP2010indexorforexternal searchindexes.SP2010offersgreatfunctionalityforeasingtheconfigurationofaddingexternal federatedsourcesanddisplayingresultsfromthem. ToaddanewfederatedlocationtoSP2010,dothefollowing:
202
1.
Openthefederationpage:CentralAdministration➤SearchService Application➤FederatedLocations.
2.
ClickNewLocationtoopentheCreateLocationpage.
3.
Entertheappropriateinformation,andcontinuetothenextsection.
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-25.Locationcreation—generalsettings Chooseatriggerforthefederatedsearch(Figure6-26).Inmostcases,thiswillbesettoAlways. Filterscan,however,beappliedtoprovidelogicforwhenthefederatedlocationshouldbequeried.
203
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-26.Locationcreation—triggersettings SelecttheappropriateLocationinformation(Figure6-27).Toqueryexternalsearchindexes,they mustsupportOpenSearchversion1.0or1.1.Thisisnotrequiredfortheinternalsearchindex.
Figure6-27.Locationcreation—locationtype ThequerytemplatedefinestheURLtoqueryandthefilterstobeappliedtothequery.Forlive search,thiscouldbehttp://search.live.com/news/results.aspx?q={searchTerms}&format=rss,as showninFigure6-28.
204
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-28.Locationcreation—querytemplate The“MoreResults”LinkTemplatebox(Figure6-29)definesthenavigationURLthatallowstheend usertorequestmoreresults.ThisisperdefaultdisabledontheTopFederatedResultsWebPart.Forlive search,thiscouldbehttp://search.live.com/news/results.aspx?q={searchTerms}&mkt=enus&scope=&FORM=LIVSOP.
Figure6-29.Locationcreation—“MoreResults”LinkTemplatebox TheDisplaysettingdefineshowsearchresultswillbepresentedintheuserinterface(Figure6-30). SharePoint2010canshowresultsfromalmostallsourcesinanicelyformattedmanner.Somefederated locations,however,mightbenefitfromcustomizedformatting.AnexamplecouldbeYouTubevideosif YouTubeisselectedasafederatedlocation.
205
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-30.Locationcreation—TopFederatedResultsDisplayMetadataoptions Itispossibletorestrictusageoflocations(Figure6-31).Somesearchindexesrequireauthentication. SP2010offersoptionstouseeitheranonymousaccess,commonauthentication,oruserauthentication. Commonauthenticationisrelevantforsearchingsecuredinternalrepositoriesavailabletoall employees.Userauthenticationisrelevantwhennotallusersofthesearchcenterwiththefederated searchresultsarepermittedtoviewtheentiresourcedataofthesearchindex.
Figure6-31.Locationcreation—RestrictUsageandSpecifyCredentialsoptions
206
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
■NoteWhensearchingfederatedlocations,specialattentionmustbepaidtothesecurityimplicationsofallowing queriestobesenttoexternalsources.Mostsearchenginesstorequeriesformonthsoryears.Ifthequeries themselvescontainconfidentialinformation,thiswillbestoredatremotesites.Asinformationissenton unsecuredchannels,queriescanalsopossiblybeintercepted.Itisalwaysrecommendedtodoasecurityreview beforeusingexternalfederatedlocations.
CopyLocation Newlocationscanalsobecreatedbycopyinganexistinglocation(Figure6-32).Thisisusefulifthenew locationshouldbesimilartoanalreadyexistinglocation.Copyingfederatedlocationsisaneasywayto getstartedwithcreatinganewfederatedlocation.SP2010offersgreatfunctionalityforeasingthe configurationofaddingexternalfederatedsourcesanddisplayingresultsfromthem.
Figure6-32.DuplicatinglocationswiththeCopyLocationoption Tocopyanexistingfederatedlocation,dothefollowing: 1.
Clickthedrop-downforthelocationtoduplicate,andchooseCopyLocation. AfterclickingCopyLocation,theCreateLocationpageofthenewlocationwill open.
2.
OntheCreateLocationpage,allfieldswillbefilledoutwiththesamevaluesas thelocationthatisbeingduplicated,excepttheLocationNamefield(Figure633).Thisfieldmustbeuniqueandisthereforerequiredtobefilledbeforethe copyiscompleted.
207
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-33.Duplicatinglocations—specifyanewuniqueLocationName
ThePreferencesPage:AnAdministrator’sView Chapter5showshowthePreferencespageallowsuserstosetuserprofile–specificsettingsforsearching. Althoughthisisaveryusefulfeatureforusers,itisnotperfectanddoeshavesomedrawbacks.This sectiondiscussessomeoftheimplicationsadministratorsshouldbeawareof. AsmentionedinChapter5,thePreferencespageisaccessedbyclickingthePreferenceslink(Figure 6-34)totherightofthesearchbox.
Figure6-34.SharePoint2010EnterpriseSearchCenterdialog
UnderstandingWhythePreferencesPageImprovesSearch Lettingtheuserspecifysettingsregardingthesearchexperiencedirectlyfromthesearchcentersis generallyagreatidea,asusersoftenhavelittleknowledgeaboutwhatoptionsexistfortuningtheir SharePointexperience.ThisispartlyduetotheextensivesetofpossiblesettingsfoundintheSite settingspage(iftheuserhaspermissiontoaccessthis)andpartlyduetothesettingsinSharePoint generallybeinghardtofindifnotoftenused.HavingthisPreferencespagewillreducethetimerequired bytheadministratororsupportstafftoteachusershowtomodifythelanguagesettingintheirbrowsers andwhateffectithas.Nowthisismoreintuitive,andmostusersareexpectedtograspthegeneral conceptofwhatthisdoeswithlesstraining. AddingthePreferenceslinknexttothesearchdialogtextboxinsearchcentersmakesusers intuitivelyawarethattheycanmodifysearch-relatedsettingsandencouragestheuseofthem.The conceptisalsoknownfromtheGooglesearchpage,whichmostusersareassumedtobereasonably familiarwith. ThePreferencespageallowstheusertoenable/disablesearchsuggestionsandtospecifythesearch contextlanguage(s)tobeused.
PreferencesScope ThePreferencespageisavailablebothinBasicandEnterpriseSearchCenters.Thisisobviousasthe settingsonthePreferencespageinfluencesearchresultsfrombothtypesofsearchcenters.Preferences arepersonalizedbybeingboundtoauserprofile.Thiswaytheuserwillusethesamesettingsregardless ofwhichcomputerisusedtoaccessthesearchcenter.InSharePoint2007,thesearchcontextlanguage wasbasedonthebrowser’slanguage.PreferencesareappliedgloballythroughouttheSharePointfarm suchthattheywillbethesameforallsearchcentersonallwebapplications.
208
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
OverridingtheUser’sLanguageSettings SharePoint2010introducesphoneticsearchandnicknamesforPeoplesearch.Asbothoftheseare language-dependent,theLanguagesettinginfluencesthesearchresultsreturned.Thesearchis performedagainstallselectedlanguagesusingstemmers,wordbreakers,phonetics,andnicknamesin allselectedlanguages. InSharePoint2007,theadministratorhastheoptionofspecifyingthesearchcontextlanguagein thesearchcentertooverridethebrowser’sLanguagesetting.Eventhoughitisnowpossiblein SharePoint2010foruserstodirectlysetthelanguageonthePreferencespage,thiscanstillbe overriddenbytheadministrator.Butgiventhatmoreemphasishasbeenputonthissetting,the administratorneedstobeawareoftheimpactithasonsearchresults.Byeitheroverridingthelanguage forsearchorusingthefixedquerysettingandtheLanguagepropertytoaugmentthequerywithafixed language,thiswilleffectivelyoverridewhateversettingtheuserhasmade.Doingsomaycause confusionforuserswhoexpecttheirownLanguagesettingstoapply.Itissuggestedthatthisgets communicatedtousersiftheLanguagesettingisfixedbytheadministrator. Ontheotherhand,givingusersaccesstosettingssuchastheLanguagesettingthatdirectly influencesthereturnedsearchresultscanalsocauseproblemsfromanadministrativepointofview. Allowinguserstodefinewhichlanguagesareusedforsearchingreducestheadministrator’soptionsfor controllingthesearchbehaviorandresults.Thisissomethingthatanadministratorneedstobeawareof whenuserscomplainthattheycannotfindaspecificsearchresult.
IssuestoBeAwareOf AlthoughthePreferencespageaddsthesepreferencesdirectlywhereneededtomaketheuserawareof theirexistence,itdoesintroducesomeproblems.Thenumberofsettingsexposedthroughthe Preferenceslinkisverylimited.Itallowstheuseronlytoturnsearchsuggestionsonandoffandselect thelanguagecontextofthesearch. Oneimportantthingthatismissedisaneasywayforuserstolearnwhataspecificsettingactually does.Inthiscase,thisisactuallyasignificantissue,asboththesearchsuggestionsandtheLanguage settingcanbedifficultforuserstograspifnotrainingorinformationisprovidedtothem.Still,itiseasier thanchangingthebrowser’sLanguagesetting,asthisissomethingthattendstobeforgottenorignored. Asmentionedearlier,theSearchSuggestionsfeatureworksonlyifsearchsuggestionsareturnedon inthesearchcenter.Thisleadstoconfusionwhentheuserenablesthisfeatureandnothinghappens. Althoughthisfeatureisglobalforallsearchcenters,itwouldhavebeenusefultoshowawarning messagetotheuseronthePreferencespage,sayingthatthisfeatureisnotactivatedonthisparticular searchcenterasthesettingisaccessedfromthesearchcenterwhereachangeiswanted.Itmighthave beenagoodideatonotincludetheSearchSuggestionsfeature,asthisworksonlyifasiteadministrator hasenabledsearchsuggestionsinthesearchcenter. ThemostimportantsettingfromasearchperspectiveistheLanguagesetting.Itwouldhavebeen reallyusefultocreateapageonlycontainingthissetting.ThiswaythePreferencespagewouldinclude onlytheLanguageoption,andthePreferencespagecouldbenamedaccordingly.Theargumentforwhy thiswouldbeagoodideaisthattheLanguagesettinginfluencesthereturnedsearchresultset. Especiallyforsearchesthatcouldpotentiallyreturnsearchresultscontainingmultiplelanguages,this becomesanissue.Anoften-heardusercomplaintinSharePoint2007is:“Whyarethesearchresults differentonmyothercomputer?”Theanswerinmanycasesisduetoadifferenceinsearchcontext languagesettings,whichinSP2007weresetinthebrowser’sownLanguagesetting.AstheLanguage settingdoessolvethisissue,itwouldbepreferabletoexposeitmoredirectly.
209
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
StemmersandWordBreakers InSharePoint,stemmingisusedincombinationwiththewordbreakercomponent,whichdetermines wherewordboundariesare.Thewordbreakerisusedatbothindexandquerytime,whilethestemmer isusedonlyatquerytimeformostlanguages(exceptionsareArabicandHebrew).Astemmerlinksword formstotheirbaseform.Forexample,“running,”“ran,”and“runs”areallvariantsoftheverb“torun.” Stemmingiscurrentlyturnedoffbydefaultforsomelanguages,includingEnglish.Stemmersare availableonlyforlanguagesthathavesignificantmorphologicalvariationamongtheirwordforms.This meansthatforlanguageswherestemmersarenotavailable(suchasVietnamese),turningonthisfeature inthesearchresultspage(SearchCoreResultsWebPart)willnothaveanyeffect,sinceinsuch languagesanexactmatchisallthatisneeded. Wordstemmingisnotthesamethingaswildcardsearching,whichhastodowithdoingsearches with*inthequery.Thismeansyouareaskingthesearchenginetofindallwordsthatstartwiththetext stringandendwithanything,since*meansmatchanycontinuoustextstringtotheendoftheword, whichinmostlanguages(excludingmostEastAsianlanguages)isindicatedbyawhitespace.Soa searchqueryusing*suchas“Share*”willreturnresultsincluding“SharePoint,”whileasearchquery usingthewordbreakerandstemmerwouldbringback“sharing,”whichisaninflectionalvariantof “share.”Wildcardsearchingandwordstemmingareoftenusedtorefertothesamething,buttheyare, infact,separateanddifferentmechanismsthatcanreturndifferentresults—forexample: •
Searchingfor“run”wouldalsoreturnresultscontaining“runs,”“ran,”and “running.”
•
Searchingfor“page”wouldalsoreturnresultscontaining“pages,”“paged,”and “paging.”
Althoughitwouldseemobvioustojustturnonthisfeatureperdefault,itdoesimpacthowsearch behavesinwaysthatmightnotbedesired.Wordstemmingcanaffecttherelevanceofyoursearch query.Ifsometermshavelotsofstemmingandothershavenone,onewordmaynowdominateresults evenifitisn’tthepriorityinthecontextofwhatwaslookedfor.Stemmingcanalsonegativelyaffect performance—therewillbeadelaywhileexpandingthesearchquerytoincludestemming,andalarger setofresultswillbereturned.
PhoneticsandNicknames PhoneticsandnicknamesarenewadditionstothesearchfacilityinSharePoint2010.Theyaretargeted atPeoplesearchandoffersignificantimprovementstotheuser’sabilitytofindotherpeopleinsideor outsidetheorganization.Thisisespeciallycompellingformultinationalcompanies,whereincorrectly spellingnamesorknowingcolleaguesbynicknamesonlyiscommon.
PhoneticSearch PhoneticsearchingconsidersalternativespellingsandmisspellingsofanameinthePeoplesearch results.Morespecifically,phoneticsearchingtakesintoaccountthatmanytimesusersknowhowtosay anamebutdonotknowthecorrectspellingforit.AlthoughthisfeatureiscurrentlyisolatedtoPeople search,itisthesearchcenterthatgenerallypresentsthelargestroadblockstospelling.
210
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
AssumethatauserneedstofindcontactinformationforacolleaguenamedGeoffPetersen.The userdoesnotknowhowhisnameisspelledandinsteadtypesJeffPetersoninthesearchdialog. AlthoughneitherGeoffnorPetersenisanexactmatchforJeffPeterson(notevenawildcardmatch), SpeechServerinSharePoint2010willreturnGeoffPetersenasasearchresult,thusallowingtheuserto findhimbasedonthecombinationoffirstnameandsurname.
■NotePhoneticsearchingconsidersonlyalternativetermsbasedonSharePoint2010’sthesaurus.Cuttinga queryshortandsearchingforthetermMaynwillnotnecessarilyreturnresultsforthepersonwiththelastname Maynard.Forthisquerytofunctionproperly,thewildcardcharactershouldbeenteredattheend—Mayn*.
ThebehaviorofphoneticsearchisinfluencedbytheLanguagesetting.Althoughthephonetic alphabetislanguage-independent,asitisbasedontheInternationalPhoneticsAlphabet(IPA),the pronunciationofnamescandifferbetweenlanguages.
NicknameSearch NicknamesaddanothernewfacettoPeoplesearch.Aswithphoneticsearch,itislanguage-specific,but insteadofphoneticmatching,itworksbylookup.Assumeauserissearchingforacolleaguenamed Michael,withthesearchcontextlanguagesettoEnglish,buttheuserknowshimonlybythenickname Mike.PerformingaPeoplesearchforMikewouldthenreturnresultsforMikeandMichaelbecauseof thenewNicknamesfeature. Asmentioned,theNicknamesfeatureislanguage-specific,whichmeansthatnotallnicknamesare validforalllanguages.TheforegoingexamplewithMikeworksforthe“en-US”LCID(locale/language ID),whichis1033,butnotfortheDanish“da-DK”LCID,whichis1030. ThenicknamemappingscanbefoundinthetablecalledMSSLanguageResources,whichislocatedin theSearch_Service_Application_DBdatabase(ifthedefaultnameisusedfortheSearchservice application). ToseeallnicknamesforMichael,thefollowingquerycanbeexecutedinMicrosoftSQLServer ManagementStudio(databasenamemightdiffer): SELECT [Phrase],[Mapping],[Locale] FROM [Search_Service_Application_DB_].[dbo].[MSSLanguageResources] WHERE Mapping ='Michael' GO Table6-1showsthequeryresults.Thefirstcolumnisthenickname.Thesecondcolumnisthe nameitmapsto(Michaelinthisexample).ThethirdcolumnistheLocaleID(LCID)orlanguagevariant forwhichthenicknameapplies.
211
z
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Table6-1.QueryResults
Nickname
LCID
michami
chael
1031
michimi
chael
1031
mischami
chael
1031
michalmi
chael
1033
michalemi
chael
1033
michealmi
chael
1033
michelmi
chael
1033
mickmi
chael
1033
mickeymi
chael
1033
mickymi
chael
1033
migimi
chael
1033
miguelmi
chael
1033
mikemi
chael
1033
mikelmi
chael
1033
mikeymi
chael
1033
mikimi
chael
1033
miquelmi
chael
1033
mitchmi
chael
1033
1043
gielmi
chael
1043
machielmi
chael
1043
chielmichael
212
Mapping Name
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Nickname
Mapping Name
LCID
maikelmi
chael
1043
michaimi
chael
1043
michalmi
chael
1043
michelmi
chael
1043
michielmi
chael
1043
mitchellmi
chael
1043
Onethingtobeawareofisthatnicknamesmightapplybothways,suchthatMichaelisalsoa nicknameforMike.Thesamequeryjustmentionedcanbechangedtoviewthesebychangingthe mappingintheSQLquery: SELECT [Phrase],[Mapping],[Locale] FROM [Search_Service_Application_DB_].[dbo].[MSSLanguageResources] WHERE Mapping ='Mike' GO ItispossibletoaddandremovenicknamesusingthenewSharePoint2010PowerShellcmdlet.To addthenicknameMikeforMichaelandviceversatotheDanishLCID,thefollowingcanberun: New-spenterprisesearchlanguageresourcephrase –Name Michael -Language "da-DK" –Type "Nickname" –Mapping Mike -SearchApplication 988218e4-b4f5-4042-b545-c5a6230aab24 New-spenterprisesearchlanguageresourcephrase –Name Mike -Language "da-DK" –Type "Nickname" –Mapping Michael -SearchApplication 988218e4-b4f5-4042-b545-c5a6230aab24 Itmighttakeawhileforthenewnicknamestotakeeffect,astherequiredjobnamed“Preparequery suggestions”mustrunbeforetheygetapplied.Thejobrunsevery24hours. Likewordbreaking,whichwasoutlinedinChapter1,nicknamesandphoneticsearcheswork differentlyforeachlanguage.Aslongasthecorrespondinglanguagepackisinstalled,thelanguageused foraquerycanbesupportedbythesefeatures.Ifauserisattemptingtosearchonalanguageotherthan hisorhercurrentbrowserlanguage,theuserwillneedtospecifythelanguageonthePreferencespage. Uptofivelanguagescanbequeriedbythesearchengineatonetime.MoredetailsonthePreferences pageareprovidedlaterinthischapterandinChapter5.
SearchKeywords Keywordsareusedtoconfigurearelationshipbetweenakeyword,synonyms,andamanuallydefined resultsetcalledbestbets.Manycompanieshavecontentwheresometermsareespeciallyimportantor haveaspecialmeaning.Thisthenleadstoaparticularquerynotreturningaparticularsearchresultor thewantedsearchresultistoofardowninthesearchresultset.
213
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Searchkeywordsareaveryusefulfeatureinthesetypesofscenarios.Theycaneitherbeusedto definesynonymsforparticularkeywordsortoadd/emphasizespecificsearchresultsonthesearch resultspageusingbestbetsandtheBestBetsWebPart. EventhoughthisfeatureisalsoavailableinSharePoint2010,itisespeciallyusefulinSharePoint 2010duetothesearchstatisticsavailable.Nowanadministratorcanfindoften-searched-forquery termsandaugmentthesearchresultsofthesewithspeciallyselectedbestbets.
ManagingSearchKeywords Thesearchkeywordspageisusedtocreatethemappingbetweenkeywordsandsynonyms.Additionally bestbetscanbeconfiguredforeachkeyword,asshownhere.Thesearchkeywordspageisaccessed fromSiteActions➤SiteSettings➤SiteCollectionAdministration➤SearchKeywords. Thefirstpagethatispresentedisthekeywordsoverviewpage(Figure6-35).Thispagedisplaysa searchableandsortablelistofalldefinedkeywords.Thelisthascolumnsshowingthekeyword,best bets,synonyms,expirydate,andcontact.Asitdisplaysalmostallrelevantinformationofthekeywords, itiseasytogetanoverviewoverthekeywordcorpus.
Figure6-35.SharePoint2010SearchKeywordslist NewkeywordsarecreatedbyclickingtheAddKeywordbutton.Existingkeywordscanbeeditedor deletedbyclickingthekeyworditselfandchoosingtheappropriateoptionfromitscontextmenu. ChoosingAddKeywordortheEditoptionopensthekeywordseditorpage(Figure6-36).Thispage allowsadministratorstosetthefollowing:
214
•
Keywordphrase
•
Synonyms
•
Bestbets
•
Description
•
Contact
•
Publishingandreviewdates
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-36.SearchKeywordscreationpage Onceakeywordhasbeencreatedoredited,itisavailableforsearch.Nocrawlingisrequiredfor keywordstotakeeffect.Thisenablesthecreatortoimmediatelytestthekeywordandsynonymsto confirmthebehaviorisasexpected.
KeywordsandSynonyms Thekeywordphrasedefinestheassociatedsearchterm.Nootherkeywordorsynonymcanusethis phrase.Forthisreason,itisveryimportanttoplanwhichkeywordstouse.Inthecasewhereakeyword candidateisalsoasynonymforotherkeywordcandidates,anotherkeywordshouldbeusedinsteadto avoidambiguouskeywordsandsynonyms.Thesynonymsdefinetermsthatusersmightsearchforwhen lookingforthekeyword.SharePointknowsifatermhasalreadybeenusedasakeywordorsynonymand preventsitfromaccidentallybeingusedmultipletimes.
■NoteSearchingforasynonymtoakeywordisnotequivalenttosearchingforthatkeyword.Thesynonymwill returnonlythebestbetsforthekeywordsthatthesynonymisassociatedwith,notresultsthatthekeywordwould otherwisereturn.Asearchforasynonymisthereforeequivalenttoanormalsearchbutwithaddedbestbetsfor thekeywordsthathavethissynonymdefined.
215
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
BestBetsandDescription Bestbetsareamanuallydefinedsetofresultsthatwillbereturnedwhensearchingforeitherthe keywordoranysynonymforthekeyword.ThedefaultpresentationisshowninFigure6-37. BestbetscanbedisplayedtotheuserintheBestBetsWebPart,disregardingwhatsearchresults normallywouldbereturned.Thiswayspecificresultsnotfoundinthesearchcanbedisplayedtothe userdependingonthequery.Anotherbenefitistheabilitytoemphasizethesetotheuserusingeither thedefaultpresentationasshownhereorcustomstylingtechniques.Bestbetsdonotreplaceanyother searchresultsthatwouldnormallybereturned.Trimmingofthenormalsearchresults,however,does takeplacesuchthatthenormalsearchresultsetdoesnotincluderesultsfromthebestbetsset.For moreinformationonhowtoconfiguretheBestBetsWebPart,seeChapter5.
Figure6-37.Exampleofsearchkeywords Adescriptionofthekeywordcanbeadded.Thisdescriptionwillbeshownonthesearchresults page.Thedescriptionisusedtodisplayadditionalinformationaboutaspecifickeywordandits synonyms.Forthekeywordjustshown,thedescriptionisusedtoprovideinformationaboutaparticular person’sjobtitle.Thiscouldalsobeusedtoshowadditionalinformationaboutaspecificproductname orguidanceifsearchingforkeywordsknowntoproducepoorresults.
ContactandPublishing IntheContactfield,theuserprofileoftheusertocontactwitheventsforthekeywordisspecified.This wayausercanbesetasowneroradministratorofthekeyword.Giventherequiredpermissionstoedit searchkeywords,itissuggestedthatthisbethecreatorofthekeyword,orthattheContactbegranted permissionstomanagekeywords.Itwillcomplicatemaintenanceifathirdpartywithnopermissionsto editthekeywordgetsthenotifications. Keywordsallowforastartdateandenddatetobespecified.Thestartandenddatesenable keywordstobecreatedbeforetheytakeeffectandtoautomaticallyexpireatagivendate.Searchesfor thiskeywordoranyofthesynonymswillnotreturnbestbetsoutsideofthestartandenddateinterval.
216
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Thisisusefulif,forinstance,thekeywordisrelevantonlyforatime-limitedcampaignorforother reasonsistime-dependent.Italsofacilitatesmanagementifthekeyworddoesnothavetobecreatedat theexacttimeitwilltakeeffect.Anotherusefortheenddateistoavoidhavingtodeletekeywordsif,for somereason,theyarenotwantedforaparticularperiodbutmightbeusefulinafuturescenario.Then thekeyworddoesnothavetoberecreatedwhenitbecomesrelevantagain.Simplychangethestartand enddatestoreactivateit. Keywordsalsohaveareviewdatesetting.Whenthesetreviewdateexpires,theuserdefinedinthe Contactfieldwillgetanotificationtoreviewthekeyword.Thismechanismisespeciallyusefulincases whereakeywordisrelevantforalimitedtimeonly,buttheexactenddateisnotknown.Thiswaythe Contactcanberemindedtoreconsidertheenddateorsetanewreviewdate.
Maintenance Oneofthebiggestchallengeswithsearchkeywordsistheamountofmanualmaintenancerequired. Administratorstendtoputalowpriorityonmaintainingameaningfulandusefulcorpusofsearch keywordsaftersometime.Itisthereforeimportantthatthistaskreceivesfocusduringnormal SharePointmaintenanceplanning. Keywordsaregenerallybestmaintainedbynon-technicalstaff.Keywordmanagement,however, doesrequiresitecollectionadministratorprivileges,andnormalnon-technicalstaffisalmostnever grantedthisrole.DecidingwhoshouldbetheContactandgenerallymanagekeywordsmusttakethis intoaccount. Enddatesareoftenleftblank,whichmeansthatthesearchkeywordwillneverexpire.Thereare manysituationswherethisisuseful(e.g.,forcompanynamealiases,etc.).Often,however,keywords mightberelevantonlyfortime-limitedproducts,campaigns,etc.,whichcausesthemtoexistyearsafter theiractualrelevancy.Evencompanynamesandaliasessometimeschangeafteralongerperiod. Creatingapolicyforusingthereviewdatesettingcancounterissueswithoutdatedkeywords. Onereasonthereviewfunctionalityofkeywordsoftenisnotutilizedisthatitisnotclearwho shouldreceivenotificationsandwhenitrequiresreview.EspeciallyiftheContactleavesthecompany, thisbecomesanissue,asthereviewnotificationsthenmightnotbecaught. AnotherchallengewithsearchkeywordsistheirdependencyonfixedURLsforassociatedbestbets. Whenadocumentorsitethatisreferencedbyabestbetismovedordeleted,thecorresponding keywordshouldalsobeupdatedsuchthatitdoesn’treflectthisbrokenURLinitsbestbetsanymore. Forthereasonsjustmentioned,periodicmanualinspectionofkeywordsshouldbeincludedinthe maintenancepolicy.
SuggestedUsesforKeywords Planninghowandwhentobestusekeywordscanbeachallenge.Akeywordisnotveryusefulbyitself. Theobvioususeofkeywordsistoemphasizespecificfilesorsites,buttheycanalsobeusefulina numberofotherscenarios. Announcementscanbecreatedusingkeywords.Forinstance,auserwhosearchesforaspecific personorproductnamecanbenotifiedthatthepersonhasleftthecompanyorthattheproductname haschangedtosomethingelse. Ambiguity,wherewordsmeanseveralthings,canbeexplainedtotheuser,usingthedescriptionto explainthedifferentmeaningsandpossiblygivelinkstoapagewithmoredetailsonthedefinitions. Topicpoliciescanbecommunicatedtousers.Asearchfor“expenses”couldinformtheuserto contactthefinancedepartmentforallexpense-relatedinformation.Thesamecouldbethecasewith profanity,wheresearchesforpre-definedobscenewordscouldgiveawarningandlinktoapage containingaprofanitypolicy.
217
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Linkstoexternalpagesusingbestbetsthatmakesenseforakeywordbutarenotindexedby SharePointareusefulforassociatingkeywordstosistercompanies’websitesorotherrelevantexternal resourcesoutsidedirectcontrolofthecompany.Anotheruseoflinkstoexternalpagesistoassociatea keywordsuchasacustomernamewithlinkstoallrelevantsubpagesonthatcustomer’swebsite. Forcompaniesthatchargeforreferences,sponsoredlinkscanbecreatedtoallowcustomersofthat companytogettheirreferencesemphasizedinthesearchresultslistatanadditionalcost.Thisisnot unlikewhatmostlargersearchengineslikeGoogledo.
SearchAlertsAdministration SearchalertsinSharePointareamechanismtoenableuserstobenotifiedoralertedbye-mailorSMS textmessagewheneveraspecificquerywouldreturnnewresultsorwhenthecontentofexistingresults haschanged.Alertsarepersonalandcanbeconfiguredandviewedonlybytheuserwhocreatedthem. SearchalertshavetworequirementsfortheSharePointfarmconfiguration: •
SearchalertsmustbeenabledontheSearchserviceapplication.
•
Outgoinge-mailmustbeconfigured.
Bydefault,searchalertsaredeactivatedfortheSearchserviceapplications(Figure6-38).Toenable searchalerts,youmustuseanaccountthathasadministrativerightstotheSearchserviceapplication.
Figure6-38.Togglingsearchalerts
218
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
ToactivatesearchalertsforaSearchserviceapplication,dothefollowing: 1.
GotoApplicationManagement➤Manageserviceapplications.
2.
ClicktheSearchserviceapplication.
3.
Locate“Searchalertsstatus”,andclicktheEnablebutton.
WhenperformingtheResetIndexoperationfortheSearchserviceapplication,SharePointwillaskif searchalertsshouldbedisabledforthisoperation.Thisisrecommended,asdoingthisoperation otherwisewouldfireallconfiguredsearchalertswherethe“alertonchanges”optionisset,whichit almostalwaysis.
■NoteChangesthattriggersearchalertsarebasedonthecrawledcontent.Analertcanthereforeneverfire moreoftenthanthecrawlintervalsofthecontentsourcesthatyieldthesearchresultsforthespecificsearchalert.
SearchSuggestions Searchsuggestions(calledquerysuggestionsontheSearchBoxWebPart)worksimilarlytotheBing searchdialog,byprovidingalistofsuggestedsearchtermsbelowthesearchboxwhileaqueryistyped, asshowninFigure6-39.
Figure6-39.SharePoint2010EnterpriseSearchBoxwithsearchsuggestions Searchsuggestionsareoneofthetopicsthatoftencauseconfusionandaredifficulttotryoutintest environments.Thisispartiallybecauseofthewaysearchsuggestionsareactivated,andpartially becausetheycannotbemanagedthroughtheSharePointuserinterface. Themostimportantthingtounderstandaboutsearchsuggestionsiswhentheyareadded.Only searchtermsthatyieldresultsthatactuallygetclickedwillgointothesearchsuggestionpool.A minimumofsixclicksperyearisrequiredforthetermtoshowupasasearchsuggestion. Itispossibletoaddandremovesearchsuggestionsmanually.ThiscanbedonebyusingPowerShell commandsthroughtheSharePoint2010ManagementShell.
ViewingSearchSuggestions Tolistexistingsearchsuggestions,youcanrunthecommandsinListing6-3fromtheSharePoint2010 ManagementShell.
219
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Listing6-3.ListingSearchSuggestions $app=Get-SPEnterpriseSearchServiceApplication Get-SPEnterpriseSearchQuerySuggestionCandidates –SearchApp $app
AddingSearchSuggestions Toaddnewsearchsuggestions,youcanrunthecommandsinListing6-4fromtheSharePoint2010 ManagementShell. Listing6-4.AddingSearchSuggestions $app=Get-SPEnterpriseSearchServiceApplication New-SPEnterpriseSearchLanguageResourcePhrase –SearchApplication $app –Language en-US -Type QuerySuggestionAlwaysSuggest –Name “SharePoint Search” Thiswilladdthequery“SharePointSearch”tothesearchsuggestionslist. ThesearchsuggestionwillshowupinthesearchdialogonlyafterthePrepareQuerySuggestions timerjobhasexecuted.Perdefaultitisscheduledtorundailybetween1a.m.and11p.m. Togetthesearchsuggestionstoshowupimmediately,runthecommandsinListing6-5fromthe SharePoint2010ManagementShell. Listing6-5.RunningthePrepareQuerySuggestionsTimerJob $timer=Get-SPTimerJob|? {$_.Name –eq “Prepare Query Suggestions”} $timer.RunNow()
RemovingSearchSuggestions Toremovesearchsuggestions,runthecommandsinListing6-6fromtheSharePoint2010Management Shell. Listing6-6.RemovingSearchSuggestions $app=Get-SPEnterpriseSearchServiceApplication Remove-SPEnterpriseSearchLanguageResourcePhrase –SearchApplication $app –Language en-US -Type QuerySuggestionAlwaysSuggest –Identity “SharePoint Search” Thiswillremovethequery“SharePointSearch”fromthesearchsuggestionslist.Thesearch suggestionwillberemovedfromthesearchdialogonlyafterthePrepareQuerySuggestionstimerjob hasexecuted.Perdefaultitisscheduledtorunbetween1a.m.and11p.m.Togetthesearchsuggestions removedimmediately,runthefollowingcommandsinListing6-7fromtheSharePoint2010 ManagementShell.
220
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Listing6-7.RunningthePrepareQuerySuggestionsTimerJob $timer=Get-SPTimerJob|? {$_.Name –eq “Prepare Query Suggestions”} $timer.RunNow()
SearchScopes Searchscopesareusedtolimittheresultsetbyapplyingrule-basedrestrictionstothesearch.Scopesdo notrequirebeingasubsetofalargerresultset.Theycandefineindividualpossibleresultsets. Thebenefitofusingscopesistheabilitytheyprovidetocreateadefinitionforasubsetofsearchable contentorcontentinthesearchindex.Scopescanthenbeusedbyusersasaneasywayoftrimmingthe possiblesearchresults.Scopescanbemadeeasilyaccessibleforusersbyeithercreatingasearchtab withaspeciallyscopedsearchandresultspageorbyaddingthescopeselectoronasearchpageand resultspageitself.Examplesoftypicalscopescouldbedepartment-specificcontent,pre-definedtopics, specificcontentsources,orgroupsofpeopleinanorganization.Itisalsopossibletocreateaggregate scopesthatencompassanumberofotherscopes. YoucansetsearchscopesatboththeSearchserviceapplicationlevelandatthesiteadministration level.SearchscopessetattheSearchserviceapplicationlevelareavailabletoallsitesandsitecollections withintheserviceapplication.Thesescopescannotbemodifiedordeletedatthesiteadministration level. SharePoint2010nowincludesthenewrefinerWebPart,whichisdescribedearlierinthischapter andinChapter5.TherefinerWebPartdoesoffertheusersimilarfunctionalitytothescopes.For instance,therefinercanallowtheusertorefinethesearchresultsbysourcessuchassitesorby propertiessuchasauthors.Whenplanningwhichscopestocreate,thisshouldbetakeninto consideration,asopposedtoplanningscopesforSharePoint2007.
■NoteToavoidhavingtowaitforSharePointtoupdateitsscopes,gototheSearchAdministrationpage,and startanupdateforthescopesmanuallybyclicking“Startupdatenow”.
ManagingScopes ScopescanbedefinedateithertheSearchserviceapplicationlevelorsitecollectionlevel.Theonly differencehereistheavailabilityandgroupingofscopes.Availabilitymeansthatscopescreatedatthe SSAlevelareavailabletoallsitesandsitecollectionsthroughoutthefarm.Scopescreatedatthesite collectionlevelareavailableonlytoallsiteswithinthatsitecollection.Groupingispossibleonlyonthe sitecollectionlevel.Itallowsthesitecollectionadministratortodefinegroupsofscopesthatmakesense asawhole.ThesegroupscanthenbeappliedtosearchWebPartswherefeasible.Scopescreatedatthe SSAlevelcannotbechangedatthesitecollectionlevel.
ScopesatSSALevel TomodifyscopesontheSSAlevel,gotoCentralAdministration➤SearchServiceApplication➤Scopes. ThisopenstheScopeslist,asshowninFigure6-40.
221
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
ScopesdefinedattheSSAlevelareaddedtoascopepoolcalledShared.Thesescopesarealways availableatthesitecollectionlevel.AttheSSAlevel,itisalsopossibletoviewallscopesdefinedatthe sitecollectionlevel.
Figure6-40.ScopeslistpageattheSSAlevel
ScopesattheSiteCollectionLevel Tomodifyscopesonthesitecollectionlevel,gotoSiteActions➤SiteSettings➤SiteCollection Administration➤Searchscopes. ScopesinheritedfromSSAaremarkedasShared,asshowninFigure6-41.Withtheexceptionofthe preconfiguredscopes,thesescopesarenotaddedtoadisplaygroup(describedlaterinthissection),but placedinaseparategroupcalledUnusedScopes.Alsonewscopescreatedatthesitecollectionlevelare placedintheUnusedScopesgroupunlessotherwisespecifiedduringcreation.
222
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-41.Scopeslistpageatthesitecollectionlevel
CreatingNewScopes Scopecreation(Figure6-42)isalmostthesameonboththeSSAandsitecollectionlevels.ClicktheNew ScopelinktogototheCreateScopepage.Onthispage,thescopesettingsaredefined.Ascoperequires auniquetitle,whichisusedtoidentifythescope.Itcanalsohaveanoptionaldescription. Onthesitecollectionlevel,itcanbeselectedwhichdisplaygroupsthescopeshouldbepartof.This DisplayGroupssectionisnotavailablewhencreatingscopesfromanSSA.Thelistofdisplaygroups reflectsthedisplaygroupscreatedbythesitecollectionadministrator.Ascopedoesnothavetobe mappedtoadisplaygrouptobeavailableforsearch,asitcanbespecifiedonthequerystring,butit mustbemappedtoadisplaygrouptobeavailableforselectionbyusers. TheTargetResultspagecanbesettousethedefaultsearchresultspage,oraspecificpagecanbe assigned(incaseofcross-sitecollectionsearches).Forsomescopes,itwouldmakesensetocreatea specialsearchresultspagecarefullydesignedtoshowsearchresultsofaspecialtype.Anexampleofthis isthePeoplesearchpage.
223
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-42.Creatingascope
ScopeRules ScoperulescanbecreatedbyapplyingAND,OR,NOTrulesforaselectionofproperties.Theruleset allowstheadministratortospecifythetrimmingofthesearchindexthatthisscoperepresents.As mentionedearlier,thiscanbeeithercontentsourcerestrictionsortopicfiltering.Thefollowingtypesof rulescanbecreated: •
Webaddress
•
Properties
•
Contentsource(notavailableonthesitecollectionlevel)
•
Allcontent
WebAddress Rulesforwebaddressesarespecifiedbyfoldername,hostname,ordomainname(Figure6-43).The effectofspecifyinganaddressisthattheresultswillbelimitedorexcluded,basedontheaddress.
224
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-43.Scoperules—webaddresses
PropertyQuery Themostoftenusedscoperuleisthepropertyquery(Figure6-44).Thispotentiallyallowsan administratortocreatescoperulesforallmanagedpropertiesaslongastheyareallowedtobeusedin scopes.
Figure6-44.Scoperules—propertyquery
225
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Anoftenrequiredscopetocreateisadocumentscope.Unfortunatelythisisnotpossiblewithout performingsomeadditionalsteps,astheIsDocumentpropertycannotbeusedinscopesperdefault.The IsDocumentpropertydefineswhetheracontenttypeisadocument. ThefirstthingtodoistoallowtheIsDocumentpropertytobeusedinscopes.Thisisdoneonthe Searchserviceapplication.FollowthesestepstoenabletheIsDocumentpropertyforscopes: 1.
GototheMetadataPropertieslistintheSSA,andopentheIsDocument property(Figure6-45).Checkthe“Allowthispropertytobeusedinscopes” checkbox.
2.
Thensavethechanges.
Figure6-45.EditManagedPropertypageforIsDocumentproperty NowtheIsDocumentpropertycanbeusedinscopes.Thenextstepsaretocreateadocumentscope andconfigureittousetheIsDocumentproperty.
226
1.
GototheScopeslistintheSSA,andclicktheNewScopebutton.
2.
CreateanewscopewiththenameDocuments(Figure6-46).Optionallygiveit asuitabledescription.ThenclickOK.
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-46.Scopeoverviewpagefordocumentscope WiththeIsDocumentpropertyconfiguredandthedocumentscopecreated,arulemustbecreated onthescope(Figure6-47)tomakeitusetheIsDocumentproperty. 1.
ClicktheNewRulebutton.
2.
SelectthePropertyQueryoptionfortheScopeRuleType.
3.
EntertheIsDocumentproperty,andgiveitavalueof1inthePropertyQuery setting.
4.
LeavethebehaviorsettingasInclude,andclickOK.
Figure6-47.ScoperulepagewithIsDocumentruleapplied
227
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
NowthedocumentscopeiscreatedandcanbeusedonsearchandresultWebPartstogivetheuser anoptiontoquicklyfiltercontentbasedonwhetheritisadocument.
ContentSource Thisrulelimitsorexcludescontentfromthespecifiedcontentsource.Contentsourcesaretheones definedontheSearchserviceapplication,includingthedefaultcontentsourcenamedLocalSharePoint Sites(Figure6-48).Ifcontentsourcesaretobeusedinscoperules,caremustbetakentomakethem fine-grainedenoughtofulfilltherequirementsofthedesiredrules.Thiswouldtypicallymeanthata contentsourcewillbecreatedperfileshareorgroupsinafileshare,website,orsimilarentity.
Figure6-48.Scoperules—contentsource
AllContent Thisisthescoperuleusedbydefaultinsearchcenters(Figure6-49). Forexample,ifthegoalistosearchallcontentsourcesexceptasingleone,forthegivenscope,use thisruletoincludeallcontentandthenuseasecondruleforthegivenscopetoexcludetheappropriate contentsource.
Figure6-49.Scoperules—AllContentselection
228
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
DisplayGroups Forscopestobeusableinsearchcenters,theymustbeaddedtoadisplaygroupinthesitecollection. 1.
ClicktheDisplayGroupslinktoopentheDisplayGroupsettingspage(Figure 6-50).
2.
Tocreateanewdisplaygroup,clickNewDisplayGroup.Thiswillopenthe CreateDisplayGrouppage.
3.
Toeditexistingdisplaygroups,simplyclicktheappropriategroupname.
Figure6-50.Scopedisplaygroups OntheScopeDisplayGrouppage(Figure6-51),itispossibletodefineoneormorescopestoshow inaspecificdisplaygroup.Itisalsopossibletosetthedefaultscopeandgivethegroupameaningful titleanddescription. 4.
Selectwhichscopestoincludeinthegroupanddefaultscope.ThenclickOK. Thiswillcreatethenewdisplaygroup.
229
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-51.Editingscopedisplaygroups ThenewlycreateddisplaygroupwillnowbeshownontheDisplayGroupspage,asshowninFigure 6-52.Italsoshowshowmanyscopesareincludedinthedisplaygroup.
Figure6-52.Scopedisplaygroupswithcustomgroup
230
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
5.
Tousethenewdisplaygroupinasearchcenter(asdescribedinthe"Search CoreResults"section),setthedisplaygroupoptionofanyrelevantWebPartto theappropriategroupname.TheWebPartwillnowusetheselecteddisplay group,asshowninFigure6-53.
Figure6-53.Exampleofsearchboxwithcustomscopeandscopegroupenabled
AddingSearchScopeSelectortotheSearchBox Mostsitescontainasearchbox.UnlikeinSharePoint2007,thesearchboxdoesnotincludeascope drop-down.Itcontainsonlythe“Searchthissite”searchbox,asshowninFigure6-54.
Figure6-54.Thedefaultsitesearchbox Toenablescopeselectiondirectlyfromthesearchbox,dothefollowing: 1.
GotoSiteActions➤SiteSettings➤SiteCollectionAdministration➤Search Settings.Thiswillopenthepageformanagingthesearchboxesonthissite collection,asshowninFigure6-55.
231
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-55.Searchsettingsonthesitecollectionlevel 2.
FromtheSiteCollectionSearchDropdownModesection,selectthe“Show anddefaulttocontextualscope”option.
3.
ClickOKontheSearchSettingspage,andvalidatethatthesearchboxnowhas ascopeselector,asshowninFigure6-56.
Figure6-56.Thesitesearchboxwithscopeselectordrop-down
SearchTabsandPages SearchtabsareawebcontroldisplayedontheEnterpriseSearchCenter.Thepurposeofsearchtabsisto alloweasynavigationbetweendifferentsearchpages,eachwiththeirownsearchWebParts,layout,
232
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
configuration,andscope.PerdefaultSharePointcreatestheAllSitesandthePeopletabsinEnterprise SearchCenters,asshowninFigure6-57.
Figure6-57.Searchtabs Thetabsthemselvesarelistitems.Separatelistsexistforthefollowing: •
Tabsshownonthesearchpages
•
Tabsshownontheresultspages
Thebenefitofsearchtabsbeinglistitemsisthatitmakesallsearchpagessharethesametabs, withoutaffectingthetabsdefinedfortheresultspagesandviceversa.ThiswaythesearchpagesforAll Sites,People,andanyothersearchpagesharetabs.SimilarlytheresultspagesforAllSites,People,and anyotherresultspagesharetabs. Toaddoreditexistingtabs,selectthePagetabfromtheribbonandclickEdittoputthepageinEdit mode(Figure6-58).Asmentionedbefore,thetabseditorisnotaWebPartbutawebcontrol.Onthe searchdialogpages(andalsoontheresultspages),thiscontrolisdisplayedatthetopofthepage.The locationcanbechangedbyeditingthepage’smarkup.
Figure6-58.SearchtabseditcontrolonpageinEditmode Toview,add,oreditexistingtabs,clicktheEditTabslink,whichopensthelistofexistingtabs.The listshowsthedefaulttabsforanEnterpriseSearchCenter.Adding,editing,andremovingtabsisjustlike managingitemsinanyotherlist. Onthesearchpages,threetabsarecreatedperdefault,butonlytwotabsarevisibleontheSearch dialogpage(Figure6-59).ThetwotabswiththetabnameAllSitesareactuallypointingtodifferent pages.Thefirstoneispointingtodefault.aspx,whichisthesearchpagenormallyviewed.Thesecond onepointstoadvanced.aspx,whichisthepageforadvancedsearch.Thefinaltabpointstopeople.On resultspages,onlytwotabsarecreatedperdefault.
233
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-59.Searchtabslist Fornewtabstobemeaningful,anewsearchpageorresultspageshouldbecreated.Tocreateanew searchpage,dothefollowing: 1.
Gotoanexistingsearchpage.
2.
ClickSiteActions➤MoreOptionstoopenthelistofpagetypes.Thefiltersin theleftmenuareusefulforquicklyfindingortrimmingdowntheoptionsto choosefrom.
3.
Usingthepagefilter(Figure6-60),threeoptionsaredisplayed,asshownhere. Dependingonwhetherpublishingisdesired,choosethecorrectpagetypeand clicktheCreatebutton.
Figure6-60.Creatingapublishingpage
234
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
AfterchoosingapagetypeandclickingtheCreatebutton,theCreatePagedialogopens(Figure661).Hereitispossibletoapplysomestandardinformationtothenewpage.Thetitlewillbedisplayedat thetopofthepageaswellasinthetitlebarofmostbrowsers.Thedescriptionisdisplayedjustbelowthe titleinsmallerlettersandgivesusersmoredetailedinformationontheintentandusageofthepage. TheURLNamespecifiesthefilenameofthepage.Thepageiscreatedinalocationrelativetothe siteonwhichitexists.Thepageswillalwaysbeoftype*.aspx.Itisnotpossibletocreateotherformatsof webpagesusingthisdialog. ThePageLayoutsectiondisplaystheavailablepre-definedlayoutsforthegivensite.Ifthenewpage tobecreatedisasearchpage,choose“Searchbox”or“Advancedsearch”fromthePageLayoutsection. Ifthenewpagetobecreatedisaresultspage,choose“Searchresults”or“Peoplesearchresults”from thePageLayoutsection.
Figure6-61.Choosingapagelayoutofnewpage
■NoteTheselectionofpagelayoutdictatesif“Tabsinsearchpages”or“Tabsinresultpages”willbeused.
Choosethedesiredpagelayout,andclicktheCreatebutton.ThenewpagewillopeninEditmode, asshowninFigure6-62.ForEnterpriseSearchCenters,thispagealsoincludetheTabswebcontrol. Noticethatthenewlycreatedpageisnotmappedtoaspecifictab.Thiscanbedonefromanyofthe searchpagesorsearchresultspagesinEditmode,dependingonthetargettabgroupforthenewpage.
235
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Figure6-62.NewsearchpageinEditmode Toaddthenewsearchpagetothesearchtabslist,clickAddNewTab.Thisisequaltogoingtothe searchtabslistandaddinganewitem.Onthenewtabitem(Figure6-63),givethetabameaningful nameandtooltip.Thenextstepistomapthepageitselftothenewtab.Todothis,copytheURLofthe newlycreatedpageintothePagesection.
Figure6-63.Linkingnewtabtoapage
236
CHAPTER6■CONFIGURINGSEARCHSETTINGSANDTHEUSERINTERFACE
Whenthetabname,tooltip,andURLofthetargetpageareentered,clicktheSavebutton.Anew searchtabisnowavailableforthenewcustomsearchpageandallotherpagessharingthesametabs list,asshowninFigure6-64.
Figure6-64.Searchdialogwithcustomtab Resultspagesandtabsinresultspagesarecreatedthesameway.Creatingnewtabsisanoptionto domorecomplexsearchconfigurationsandmakethemeasilyaccessibletousers.Insomescenarios,it mightbethattwotabsdifferonthescopetheyuseonlywhensearching.Someofthesearchsettings, suchasscopes,arealsopossibletodoonjustonepagebyincludingascopeselectorcontrol,but enablingthisasatabinsteadofascopeselectorissometimespreferred.Itdoesintroducesome maintenanceoverheadwhenaddingnewsearchpagesandsearchresultspages,butitalsoprovidesthe benefitofbeingabletofine-tuneeachpagetomeetspecificdemands.
Summary Inthischapter,welookedatconfiguringthesearch-relatedWebPartsettingsonthesearchWebParts. Thefocuswasonenablingtheadvancedfunctionalitythatistypicallyutilizedincorporationsand organizationsusingSharePoint2010.Thischapteralsodiscussedimplicationsrelatedtodifferent configurations,suchasperformanceissuesusingsearchsuggestions,etc. TheadministrativeinterfaceofSharePoint2010isvast.Thisisalsotrueforthesearch-related settings.Usersoftenexperiencethatitisdifficulttoaccomplishtasks,suchasscopeorlocations management.Thischapterassistedthereaderinfindinghisorherwayaroundthemultitudeofsearch settingsavailableinSharePoint2010.Wealsolookedathowtomitigatesomecommonproblemsthe usermightexperiencewhenconfiguringcertainsettings. ThereisnopossiblewaytodescribeeverypossibleconfigurationoftheSharePoint2010Search experience,butafterfinishingthischapteryoushouldbeequippedtounderstandkeyconcepts,predict possibleissues,docustomconfiguration,andleveragethemanyconfigurationoptionsofferedin SharePoint2010.
237
CHAPTER 7
■■■
Working with Search Page Layouts Aftercompletingthischapter,youwillbeableto: •
UnderstandmasterpagesinSharePoint2010
•
Applybestpracticesformodifyinglayoutsofsearch
•
Addandimprovenavigationinsearchcenters
•
Applycustombrandedlayoutstosearch
•
UseDocumentRatinginSearchandchange‘clickbehavior’ofdocumentresults
•
UnderstandandconfigurerefinersandtheRefinementPanel
•
Addingnumberedrefiners.
•
Understandlimitationsofrefiners.
SharePointsearchoffersendlessopportunitiesforextensionsandmodifications,butnotallare equallyeasytoperform.Thisistrueforeventhemostfrequentlyrequiredmodificationsorextensions. SharePoint2010layoutisbasedonmasterpagesandXSLT.Althoughitmightbetrivialtochange layoutitdoesintroducesomechallengeswhenitcomestotheSearchinterface.Atypicalextensionto thedefaultthatcorporationsrequireisimprovednavigationfromsearchcenters.Outofthebox, SharePointofferslittleintermsofnavigatingfromsearchcenterstoothersites.Thischaptertakesalook atdifferentwaystosolvethisshortcomingincludingmodifyingthemasterpage,aspxpagesorusinga customnavigationWebPart.Thetechniquesdescribedcanalsobeappliedtoachieveothergoals. Equallyimportanttonavigationisthebrandingandpresentationofnotonlythecontentsitesbut alsothesearchexperience.Addingbrandedmasterpagestosearchcentersisstraightforwardin SharePoint2010,butitdoesintroducesomequirksthatwillbeaddressedinthischapter.Oneofthe greatthingsaboutSharePointishowflexibleitis.Thisisdemonstratedthroughexamplesonhowto utilizethenewRatingspropertyandapplyingcustom‘clickbehavior’forsearchresults.Theseexamples aredesignedtointroducethereadertotwofundamentallydifferentapproacheswhenimprovingthe searchexperienceandshouldprovehelpfulwhenplanningforothersimilarimprovements. TherefinementpanelisanovelthingaddedtoSharePoint2010.Itispreconfiguredoutofthebox, butitsfullfunctionalityisnotexposed.Thischapterlooksatsomeoftheadvancedtopicsonenabling functionalityontherefinementpanel,withafocusonnumberedrefiners.
239
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Overall,thischapterintroducesbestpracticesonseveralwaystosolvecommontasksfacedby SharePointprofessionalsineasy-to-maintainways.Themethodsproposedshouldenablethereaderto applythemethodologiestootherkeyrequirementsaswellandunderstandpossibleconsequencesof differentconfigurationsoftherefinementpanel.
UnderstandingMasterPagesinSharePoint2010 Masterpagesprovidetheabilitytoseparatethelayoutoftherenderedpagefromthepagecontaining theactualcontent.MasterpageswerealsoamajorcomponentinSharePoint2007,andwhilebackward compatibilityhasbeenpreservedwithanumberofnewSharePoint2010masterpages,thosenew masterpageswiththeversion4labelattachedtothemarenotbackward-compatible.However,all version3masterpagesarecompatiblewithSharePoint2010,althoughsomefunctionalitywillbe missing.
■NoteThischapterdoesnotgointothedetailsofhowtocreatemasterpages.Thattopiciscoveredbyanumber ofotherbooksandblogs.Instead,thischaptertouchesonmanyofthenewmasterpagesprovidedwith SharePoint2010andafewgeneralpointersanddesignhintsthatareoftenoverlookedconcerningsolvingtypical requirements.
v4.master Thisisthedefaultteamsitemasterpageandtheonethatissuggestedasatemplatewhencreatinganew orcustombrandedmasterpage.ThismasterpageprovidesthenewribbonbaraswellasotherUI changes.AlsotheSiteActionsbuttonismovedinSP2010.Itnowappearsintheupperleftcorner.
default.master IfasiteisupgradedfromSP2007,itusesthismasterpageperdefault.TheSiteActionsbuttonislocated ontheupperrightside,andtheUImainlyisthesameasinSP2007.Thismasterpagedoesnotinclude theribbonbar.Thesitesusingthismasterpagecanbechangedtousethenewversion4masterpage, namedv4.master,oranycustombrandedmasterpagebasedonthis.
minimal.master Thismasterpageisclosetobeingthesimplestpossible.ItisusedonlybythesearchcentersandOffice WebApplications.Oneofthethingsmostpeoplequicklynoticewhenusingsitesbasedonthismaster pageisthelackofnavigation.Itisarguablyasignificantlackoffunctionality,andalthoughthepurpose istoprovidemorescreenrealestateforsearchresultsaswellasmakingthesearchcenterappear cleaner,itissomethingthatshouldbechangedinmostcorporatesites.Itdoesmakemoresenseforthe OfficeWebApplications,astheyhavetheirownUI.Inanycase,thisishowtheminimal.masterisinSP 2010outofthebox.
240
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
simple.master ThismasterpageisusedbythegenericSharePoint2010pagessuchasloginanderrorpages.Itisnot possibletouseanothermasterpageforthesepages.Theonlyoptiontocustomizethesepagesisto createareplacementpageandoverridetheexistingonesbysavingitinthe_layoutsdirectoryonthe server. Thefollowingpagesusesimple.master: •
Login.aspx
•
SignOut.aspx
•
Error.aspx
•
ReqAcc.aspx
•
Confirmation.aspx
•
WebDeleted.aspx
•
AccessDenied.aspx
OtherMasterPages SharePoint2010includesalotofothermasterpagesthataretypicallynotrequiredtobemanipulated whencreatingacustombrandedlayout.Itissuggestedtoleavethemunchangedunlessaspecialreason existsfornotdoingso.Thesemasterpagesare •
application.master
•
applicationv4.master
•
dialog.master
•
layouts.master
•
layoutsv3.master
•
pickerdialog.master
•
rtedialog.master
•
simple.master
•
simplev4.master
•
mwsdefault.master
•
mwsdefaultv4.master
•
admin.master
•
popup.master
241
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
ConsiderationsWhenCreatingaCustomMasterPage Thefirstprerequisitebestpracticeapproachbeforecreatinganycustombrandedmasterpageisto createaSharePointwebsite.Thesuggestedstandardsitetemplatetousewhencreatingasitecollection istheTeamSitetemplate.Usingawell-knownfullyfeaturedsitemakesiteasiertoevaluateifthepages showasexpected.Onceyouhaveawebsitecreated,youarereadytostartmodifyingit. Inanycase,whenitcomestoSharePoint,itisalwaysbestpracticetostartcreatingyourcustom brandedmasterpagebasedononethatalreadyworks.Experienceshowsthatthisreducesheadaches andavoidsspendinghoursonsolvingissuesrelatedtohard-to-finderrors.Usingthev4.masterthat comeswithSharePointasabaseandtrimmingitdownabitisusuallyagoodapproach.Theninitially applythecustombrandedtemplatetoonlyonesite,andignoreanyquirksthatyoumightexperienceif applyingittoyourothersites.Onlywhenthemasterpageisbehavingasexpectedonyourinitial baselinesiteshoulditbedeployedtotherestofyoursites. Oncethebasemasterpageforthecustombrandedmasterpagehasbeenextractedorcreated,itis bestpracticetogiveitameaningfulname.Remembertoincludev4inthebeginningofthemasterpage nameifitisbasedonav4masterpageforconsistencypurposes.Thencopyittotheall files/_catalogs/masterpagefolderoftheSharePointfarmusingSharePointDesigner2010. IfcustomCSSfilesarerequired,useSharePointDesigner2010tocreatenewCSSfilesratherthan changingtheexistingones.TheyshouldbesavedintheStyle Libraryfolder.NewCSSfileswillinstruct thewebbrowsertooverwritethedefaultSharePointthemewiththenewthemethatyouspecifiedin yourCSSfile,withthe!importantsyntax.BestpracticeistocreatefourseparateindividualCSSfilesfor header,footer,navigation,andcontentpage. TomakesurethenewCSSfilesworkasexpected,theyshouldberegisteredinthecustombranded masterpagewiththissyntax.
BegineditingthemasterpageandusingtheelementclassandIDnamethatweredeclaredinyour CSSfile,untilthemasterpagelookslikewhatyouwanted. Itisbestpracticetokeeplayoutconsistentthroughoutoursites.Itemsthatshouldstayconsistent onthesitesare •
Header,footer,andotherlayoutsegments
•
Navigationpanesandmainnavigationcontrolsonpages
•
Generallayoutandlookofthepage;thisincludesimages,borderstyles,table layouts,etc.
InSharePointthedefaultlayout(asisalsoagenerallyacceptedlayoutprinciple)containsthe contentinthemiddlebetweentheheader,footer,andnavigationpanes(Figure7-1).Thiswayitisthe centerpartofthepagethatwillbeupdatedwhennavigatingandnewcontentswillbedisplayedinthe middle.Inthemasterpages,thisisalsowherethemaincontentplaceholderislocated.
242
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Figure7-1.Pageorganization Themaincontenttagisformattedlikethis.
Whenanypageiscreatedusingacustommasterpage,WebPartzonesorcontentareasshouldbe addedonlywithinthiscustomplaceholderunlessaspecificreasonexistsfordoingotherwise. Onceyouhavefinishedcustomizingyourmasterpage,itisgoodpracticetocreateaSharePoint 2010solutionpackage,sothatyoucandeployyourcustomizedmasterpagetoaSharePointserverfarm andre-useitforothersitecollections.SolutionpackagescanbecreatedusingVisualStudio2010.More detailsonthistopicareavailableonhttp://technet.microsoft.com/en-us/library/cc262995.aspx.
AddingNavigationtotheSearchCenter Asmentioned,thesearchpagesusetheminimal.mastermasterpageperdefault.Thisisaverysimple masterpagewithnexttonothingonit,notevennavigation.Thisisalsooneofthemostfrequently recurringissuespeopleareexperiencing,asnavigationalmostalwaysisanessentialpartofacorporate website.TheOfficeWebApplicationsalsousethismasterpage,butforthoseapplications,itmakes sensenottoincludenavigation,becauseitprovidesmorescreenrealestate,whichisabiggerissuefor theapplications. Herewewilllookatdifferentmethodsformanipulatingthesearchcenter’slayout,exemplifiedby showinganumberofwaysofaddingnavigationtosearchcenters.Wealsolookathowtoapplyan alreadyexistingmasterpagetothesearchcenterandsomeissuesrelatedtothat.Thedifferent techniquesappliedtosolvethenavigationissuecanalsobeappliedtosolveotherlayoutand interaction-relatedproblems.
243
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Whichmethodtochooseforsolvingaparticularproblemisdependentonanumberofdecisions, especiallythefollowing: •
Isthechangerequiredthroughoutthefarmoronlyonasinglepageorsite?
•
Howoftenisthechangeexpectedtorequireupdatingorothermaintenance?
•
Shouldthechangeautomaticallyapplytonewlycreatedpagesorbeadded manuallybythesiteownersandadministrators?
Itshouldalwaysbeacarefullyconsidereddecisionwhichmethodtouse,asredoingitusingoneof theothersuggestedmethodscanrequiresignificantwork.Firstly,thetechniquesaresodifferentthat almostnothingisre-usable.Secondly,undoingalreadyappliedchangesbasedonemethodbefore applyingasolutionbasedonanothermethodcanbetediousandtime-consuming.Itshouldalsobe consideredthatsiteownersandadministratorsmightrequiretrainingdependingonthechange. Thefollowingaresuggestionsonwhentoapplytheproposedmethodsformodifyingthelayout,in thiscaseaddingnavigation: AddingacustomnavigationWebParttopages:Usingthismethod,itis commonlytheresponsibilityofthesiteowneroradministratortomanuallyadd theWebPart.Thismakesitaveryadministrative-heavysolution.Thiscanbe negatedbycreatingcustomsitetemplatesthatincludethisWebPart.Itdoes not,however,solvetheissuewithmaintenanceiftheWebPartistoberemoved atalatertime,asonlyfuturesiteswouldreflectthechange.Thisis,however, alsotrueforallstandardSharePointsites,soitisawell-knownissue.Inany case,thissolutionismostsuitableforsituationswherethechangeshouldbe appliedtoonlycertaintypesofsitesorspecificsites. Modifyingtheminimal.mastermasterpagetoincludenavigation:Making changesatthemasterpagelevelmakesthechangebotheasytomanage centrallyandeasytoalterandmaintain.Itdoes,however,removetheoptionto controlitatsitelevel,unlessspecificmasterpagesarecreatedfortherelevant sites.Inacorporationwheresitecontentandlayoutoftenneedsomedegreeof centraladministration,thisisthesuggestedmethod. EditingtheSearchMain.aspxpagestoincludenavigation:Editingthe.aspx pagesthemselvescangenerallyaccomplishthesamethingsaschangingthe masterpages.Itactuallyoffersmoreflexibilityandcontroloverthelayout.The benefitofthismethodisthatitallowsachangetobeappliedtoallpagesona specificsite,withoutaffectingothersites.Itisalsoeasytomaintainandupdate, asanychangeswillaffectbothexistingandfuturepagesonthatsite.Itdoes, however,removetheabilitytocentrallyadministratethechange,anditmakes farm-widedeploymentmoretime-consuming.
AddingHomeandBackButtonstotheSearchResultPage WhenyoucreateaSharePoint2010SearchCenter,oneofthefirstthingsyou’llnoticeisthatthereisno navigationtoallowtheusertogobacktowheretheusercamefromortogototheparentsiteortopsite asseeninFigure7-2.ObviouslytheBackbuttoninthebrowsercouldbeused,buttheusershouldbe abletodothisfromtheSharePointUIitself.
244
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Figure7-2.Searchingforsomething Manyusecasescanbethoughtofwhendeterminingifthisisarealissue.Themostcommoncaseis whentheusersearchesforsomethinganddoesnotfindanydesiredresults(Figure7-3).Thiscouldbe donefromeitherasearchpageorusingthesearchboxlocatedonmanysites,suchasTeamSites,etc.
Figure7-3.Navigationishidden. OnewayofsolvingthisistouseaContentEditorWebPartthatincludesHomeandBackbuttons thatareaddedtotheresults.aspxandpeople.aspxpages.Thistechniquecanalsobeusedforanumber ofotherpurposes,suchasprovidingquicklinksorhelpfulinfo,butherethefocusisonaddingdynamic navigationtogobackorhome. OntheResults.aspxpage,editthepageandaddaContentEditorWebPart.Thesuggestedlocation istoaddittotheleftWebPartzone.Giveitameaningfultitle(e.g.,Navigationbuttons),andsetthe ChromeTypetoNone.Addthenecessaryiconsandtexttomakeitlookasrequired.Forthetext,that couldbeGoHomeforthehomebuttonandGoBackforthebackbutton.Foreasierdeployment,usethe existingimagesfromtheSharePointlayoutsfolder.Thatcouldbe/_layouts/images/hhome.pngforthe Homeicon,and/_layouts/images/back.giffortheBackicon.
245
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
SettingtheURLfortheHomenavigationiseasy.Justsetitto“/”tosetittothesitehome.However, fortheBackbutton,alittletrickisrequired.Linkittohref="#",andsettheclickbehavioras onClick="history.go(-1)". NowthenavigationontheResults.aspxpageisfinished.ToavoidrepeatingthisonthePeople.aspx pageandotherpageswheretheHomeandBacknavigationWebPartisuseful,itcanbestoredasareusableWebPart. 1.
ExportthenewContentEditorWebParttoyourdesktop.
2.
UploadthesavedWebParttoyourWebPartgallery.(IntheSiteCollection Root,clickSiteActions,clickSiteSettings,andthenclickWebParts).
3.
GivetheWebPartausefulnameanddescription,andcategorizeit.
4.
EditthePeople.aspxpage,andaddaWebPart,butthistimechoosetheWeb Partthatisnowinyourgallery.
AnalternativewaytodeploythisWebpartistocopythefollowingWebPartmarkupinListing7-1 intoatextfile,changethefileextensionto.dwp,andthenuploadittotheWebPartgallerysoyoucanreuseit. Listing7-1.NavigationButtonsWebPartMarkup
Site Navigation Buttons None
true LeftZone 0 Normal
true true true true true true true
Modeless Default
Cannot import this Web Part. /_layouts/images/mscontl.gif
246
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c Microsoft.SharePoint.WebPartPages.ContentEditorWebPart
Home Back
]]>
ToaddtheWebParttoasearchresultpage,simplyclicktheWebPartzonewheretheWebPart shouldbeaddedandpickthenewlycreatedSiteNavigationButtonsWebPartasseeninFigure7-4.
Figure7-4.AddingnavigationWebParttosearchresultpage TheresultshouldlooksimilartotheoneshowninFigure7-5.RememberthatthisWebPartcanalso beusedonotherpagestokeepauniformlookandfeel.
247
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Figure7-5.Results.aspxpagewithproperdisplayedresult
AddingNavigationtoSearchCenterMasterPage Althoughthemasterpageminimal.masterhasnonavigation,itispossibletoaddit.Thisis recommendedformostcorporations.Assumeauserexecutesasearch,getssomesearchresults,and thenwantstojumpbacktotherootsite.TheonlywayisfortheusertomodifytheURLmanually,which isnotreallyafeasibleoption. Toaddnavigationtotheminimal.master,firstlocatethissectioninthemasterpage.
AddthefollowingmarkupfromListing7-21justbeforetheforegoingmarkup.Thisplacesthe navigationinthecorrectlocationforittoshowproperly.
1
Microsoft,KolbyH.,“changethemasterpageofthesearchcenter”,http://social.technet.microsoft.com/ Forums/en/sharepoint2010customization/thread/cd568f4b-6372-480a-b393-ad3d9ab1db84,January13th2010.
248
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Listing7-2.Navigationinminimal.masterMasterPageMarkup
Thenlocatethissectionintheminimal.master.
Addthisjustbeforetheforegoing.
Afterthesechanges,theminimal.masternowincludesnavigationasseeninFigure7-6.Asitisonly thesearchcenterthatusestheminimal.master,itissuggestedthatthismasterpageisdeployed throughoutthefarmtosolvethemissingnavigationissueforallsearchcenters,bothcurrentandthe onescreatedlater.
249
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Figure7-6.Navigationaddedtominimal.masterscreendump
AddingNavigationtotheSearchMain.aspxPage Insteadofchangingthemasterpagenamedminimal.master,itisalsopossibletoaddthetopnavigation bardirectlytothelayoutofthepage.Thiscanbedonebyaddingthefollowingcodetothe SearchMain.aspxpagelayout. BegintoeditthepagebyselectingEditinAdvancedMode(usingSPD2010).Thenlocatethis sectionintheSearchMain.aspxpage.AlsodothesameforSearchResults.aspx.
AddthemarkupshowninListing7-3justafterthemarkupshownpreviously.Thiswaythe navigationisaddedintherightplacetomakeitshowexactlyasifitwereaddedtothemasterpageusing thepreviouslydescribedmethod. Listing7-3.NavigationMarkupAddedtoSearchMain.aspxPage
Intheforegoingsample,alltheCSSstylescomefromtheSharePointCSSfilenamedcorev4.css. Thesecanbechangedtofitotherrequirementsforthelookofthepage.Afterthesechanges,the SearchMain.aspxandSearchResults.aspxpagesnowincludenavigationasseeninFigure7-7.Asitis onlythesearchcenterthatusesSearchMain.aspxandSearchResults.aspx,itissuggestedthatthispage isdeployedthroughoutthefarmtosolvethemissingnavigationissueonceandforall. Alsonoticethattheendresultfromauser’sperspectiveisexactlythesameaswhenadding navigationdirectlytothemasterpage.
Figure7-7.NavigationaddedtoSearchMain.aspxscreendump
251
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
ApplyingaBrandedMasterPagetoaSearchCenter Manycorporationsprefertoaddbrandingtothefront-endlayoutoftheirSharePointfarm.Usuallythis isdoneonthemasterpages.Specificallythev4.masterisoftentheonethatcorporationschange.Thisis allfinefornormalsites,butinmanycasesspecialattentionneedstobepaidtothesearchcenter,asthe v4-basedmasterpagesbreakthesearchcenter.
SearchBoxIsHidingWhenBrandingaSearchCenter Figure7-8showsthestandardsearchpageinasearchcenter.Payattentiontothesearchbox,asthisis therootoftheproblem.
Figure7-8.Standardsearchcentersearchpage Normallyasitecollectioniscreatedwithasearchcenterunderneath.Alternativelythisisdoneby creatingapublishingportalthatalreadyhasasearchcentercreated.Thenextstepisusuallytoapply thecorporatecustombrandedmasterpagetoallsubsites.Forafictivecorporation,itcouldlook somethinglikeFigure7-9.
Figure7-9.Corporatecustombrandedmasterpagescreendumpfromsearchcentersearchpage
252
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Nowthesearchpagehasthecustombrandedlayout,butthesearchboxhasdisappeared.Thisis becausethesearchcenterdoesn’tsupportthev4masterpages.Thesearchboxisnotgone;itisactually hiddeninthebreadcrumbplaceholder. Thisworksjustfinewhenminimal.masterisapplied,butasmentioned,thelayoutproblem,shown inFigure7-10,happenswhentryingtoapplyanyoftheotherout-of-the-boxv4masterpagesora custombrandedmasterpagesimplybyclickingthe“applytoallsubsites”box.
Figure7-10.Browsebuttonclickedtoshowthesearchboxlocatedinthebreadcrumbplaceholder
MakingNavigationVisibleandShowingtheSearchBoxCorrectly Thiscanobviouslybefixedbycreatinganewcustombrandedmasterpagebasedontheminimal.master orbyadjustingthepagelayoutsinthesearchcentertousethestandardcontentplaceholders.Inthis case,itisrecommended,however,tocreateanewcustombrandedmasterpagebasedonthecurrent custombrandedmasterpage.Withminoradjustments,itcanbemodifiedtoworkwithsearchcenters. Thisapproachmakesiteasiertomaintainthemasterpagesinthefuture. InListing7-4,acopyofthev4.masterismodifiedtoworkwithsearchcenters.Thisisalsousefulif thepurposeisjusttoaddnormalnavigationtothedefaultSharePoint2010SearchCenter.Basic knowledgeaboutmasterpagesandSharePointDesigner2010isassumed. Makeacopyofv4.master,andgiveitanewnamelikev4_searchcenter.master.Theneditthenew masterpage.ThenfindandremovethetagnamedPlaceHolderTitleBreadcrumb.Nowthebreadcrumb willworkasexpectedwithoutitbeinglocatedinthedrop-downplaceholder. Listing7-4.RemovingContentPlaceHolderWrappingoftheBreadcrumb
Next,addthePlaceHolderTitleBreadcrumbbeforethePlaceHolderMain.Thiswillallowthesearch centertoinjectthesearchboxinagoodlocation:
MovePlaceHolderPageTitleInTitleArea(andanysupportingHTML)toahiddenpanelbecausethis placeholderisn’tusedthesamewayinthesearchcenter:
RemoveClusteredDirectionalSeparatorArrow and .Itwon’tmakesensetoshowtheseat thetopnow:
AddingCSSStyling Tomakethemasterpagelookcorrectforsearchcenters,someCSSneedstobeadded.TheCSSstylesin Listing7-5areaddedtothesectionofthemasterpage. Listing7-5.CSSstylingofnavigation
Finally,saveandpublishthenewmasterpage.Itshouldbesetonlyforsearchcenters.Theresult willbethatthesearchdialognowshowscorrectlyasseeninFigure7-11.
Figure7-11.Brandedmasterpage
255
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Afterthesechanges,thesearchcenternowreflectsthecustombrandedmasterpageinastilleasyto-maintainversion.Thistechniquescanalsobeusedtocreatemasterpageswithsearchcenter–specific branding.
ModifytheSearchResultsPresentation SearchresultsinSharePoint2010offergreatopportunitiesformodification.Manycanbedonethrough theUI,butsomechangesrequirealittlemoremodification.Thissectionofferssomeinsightintothe possibilitiesthroughexamplesofhowtoaddandremovesearchresultinformationandhowtomodify thebehaviorofsearchresults.
AddingAdditionalInfotoSearchResultswithXSLT WhensearchinginSharePointusingdefaultsearchcenters,onlyasmallportionoftheavailabledatais actuallypresentedtotheuser.OftenaddingnewinformationisaseasyasjustmodifyingtheXSLT templatetodisplayanotherpropertyvalue.Sometimes,however,someformofinteractivitywiththe searchresultsisdesired.ThissectionfocusesonhowtoenrichthesearchresultUIthroughanexample withratings.
EnablingRatings Togetstarted,obviouslyratingsneedstobeturnedoninatleastonelistorlibrary.Forthisexample,a documentlibrarycontaininganumberofPowerPointpresentationsandafewdocumentsisused.To enableratings,navigatetothedocumentlibraryandchoose“Listsettings”fromtheribbon.Fromthe DocumentLibrarysettingspage,choose“Ratingsettings”,whichopensapagewhereitispossibleto enableordisableratingsasseeninFigure7-12.
Figure7-12.Enablingratings Oncethissettingismade,anewcolumnisaddedtothelistandtothedefaultviewasseennextin Figure7-13.Atthispointuserscanstartratingcontent.
256
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Figure7-13.Ratingcontrolsdisplayedindocumentlibrary
■NoteWhenselectingaratingandthendoingapagereload,itcanhappenthatthepageisnotupdatedwiththe latestratingduetoadelayinprocessingratingsinSharePoint.
Asyouclickthestarsandaddarating,thisisloggedbySharePointthroughanasynchronousAJAX call.AnautomatedtimerjobinSharePointnamedSocialDataMaintenanceJobisresponsiblefor calculatingtheaverageratings.TheratingsarestoredintheSocialRatings_Averagestable.Therating informationiscomputedfromdatainthattable.
MakingRatingsSearchable Toallowdata(inthiscase,ratings)tobesearchable,itmustbeexposedasasearchableproperty.More precisely,thisisdonebycreatingamanagedpropertyinsearchtobeincludedinthesearchresults.To createthemanagedproperty,acrawledpropertyisrequired.Whenthepropertiesarefullyconfigured, performafullcrawlforthepropertiestobecomeavailableforsearching. Ifyouareuncertainifthesepropertiesalreadyexist,gototheSearchAdministrationpageinCentral Administration.ThereopentheMetadataPropertieslinklocatedonthenavigationbartotheleft,and clicktheCrawledPropertieslink.Searchfortheterm“rating.”asseeninFigure7-14.
257
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Figure7-14.Checkingpropertiesforrating Ifitalreadyexists,theresultshouldshowtwohits,oneforows_AverageRatingandanotherfor ows_RatingCount.Ifnohitsarereturned,makesurethatratingisenabledonadocumentlibrary,starta fullcrawlinsearch,andwaitforittocomplete. Whenthecrawledpropertiesexist,thenaddamanagedpropertyforeachofthetwocrawled properties.Beginwiththeows_AverageRatingandcreateamanagedpropertynamed“Rating.”asseenin Figure7-15.Thisvalueisofadecimaltype,andchoosetheows_AverageRatingcrawledpropertyforthe mapping.
Figure7-15.Addedmanagedpropertiesforrating
258
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Next,addamanagedpropertynamedRatingCountthesamewayaswiththeRatingproperty.It shouldbemappedtothecrawledpropertynamedows_RatingCountandhavethetypesettoInteger. Ensurebothofthecrawledpropertiesareincludedintheindex.Thisisdonebyselectingthe“Include valuesforthispropertyinthesearchindex”checkboxoneachcrawledproperty.Afterallofthese changeshavebeenmade,againdoafullcrawlofsearch.
■NoteAnincrementalcrawldoesnotupdatetheindexwhenchangingmanagedandcrawledproperties.When doingstructuralchanges,afullcrawlisrequired.Chapter3providesadditionaldetailsonmanagingproperties.
AddingRatingstoSearchResults Whenthemanagedpropertiesareaddedandafullcrawliscompleted,theXSLtemplatemustbe modifiedtoshowtheratinginthesearchresultsWebPart.Openthesearchresultspagethatneeds ratingsaddedtoit,andgotoeditmode.NowchangethefollowingthreesettingsoftheDisplay PropertiesonthecoresearchresultWebPart. FindtheUseLocationVisualizationsetting,andmakesureitisunchecked. Findthefetchedproperties.Heretwonewmanagedpropertiesmustbeadded.Itshouldbe expandedtocontainthese:
FindtheXSLbuttonandclickit.UpdatetheXSLtoincludetheratings.Anexampleofhowitcould lookiscoverednext.ItisgoodpracticetomakeabackupoftheexistingXSLbeforeeditingit.Thiswayit iseasiertogobacktoscratchincasetheXSLgetswronglyedited. Foreaseofuse,itissuggestedtoinsertacalltemplateblockintheXSLtemplate.Forthosenottoo familiarwithXSL,thisisjustaplaceholderthatdisplaystheXSLformattingtemplateblocktoapplyand whichvariablestouseinthetemplateblock.Itcanconceptuallybeunderstoodasamethodthatgets called. Twovariablesarerequired:RatingandRatingCount.Thesepropertiesareexposedtothe formattingtemplateblockwiththesamenamesforeasierreading.Theformattingtemplateblockis namedDisplayRating.
Rating: (rated times)
259
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
ThenextstepistoincludetherequiredmarkupintheXSLtemplatewheretheDisplayRating templateistoberendered,andtheconditionsunderwhichitshouldberendered.Asuitablelocationin thelayoutfortheratingtobedisplayedisjustbeforethehithighlightedsummary. Noticethatatestisperformedtoverifythattheratingishigherthan0.Thisisonlythecaseifthe item—inthiscase,documents—hasarating.Ifthedocumenthasarating,theDisplayRatingtemplate justshowniscalledandtheratingtextisrenderedintothelayout.
ViewingandSearchingforRatings Havingperformedallthechangesrequiredforratingstoshowupshouldyieldaresultpagelooking similartoFigure7-16.Itgivestheuserthepossibilitytoselectorignoreaspecificsearchresultbasedon recommendationsfromotherpeopleinyourorganizationdirectlyfromthesearchresultslist. Thisexampleofshowingratingsisverybasic.Moreadvancedgraphicaltemplatescanbeappliedto furtherenhancetheuserexperience.
260
CHAPTER7■WORKINGWITHSEARCHPAGELAYOUTS
Figure7-16.Ratingsshowinginsearchresults Itisalsopossibletosearchforresultswitharatinghigher,lower,orequaltoaspecificvalue.This canbedonebysimplysearchingfortheproperty. Rating>3 Rating
BuildanddeploythesolutiontoSharePointbyright-clickingtheprojectandchoosingDeploy.After itissuccessfullydeployed,thesolutioncanbeaccessedbyenteringthefollowingURLintothebrowser: http:///_layouts/ SearchApplicationPage/SearchApplicationPage.aspx. Atthistime,clickingtheSearchbuttonsdoesnotperformanyaction.However,youwillseealayout containingatextfieldforenteringsearchterms,abuttonforexecutingthesearch,andadatagridview WebPartfordisplayingsearchresults(Figure8-6).
291
CHAPTER8■SEARCHTHROUGHTHEAPI
Figure8-6.Simplesearchapplicationpagelayout
AddingCode-Behind Code-behindisthe.NETcode(C#isusedinthisbook)thatimplementsthelogicforthemarkup.Itis executedontheserverandcanalterthepropertiesofthelayoutpriortorendering.Addingsearch capabilitiestothisapplicationpageisveryeasy.First,theassembliesrequiredforthesearchAPImustbe addedasreferencestotheSearchApplicationPageproject(Figure8-7).Thisisdonebyright-clickingthe projectandthenaddingreferencestothefollowingassemblies: •
Microsoft.Office.Server
•
Microsoft.Office.Server.Search
BothassembliesareusuallylocatedintheISAPIfolderintheSharePointrootfolder.
292
CHAPTER8■SEARCHTHROUGHTHEAPI
Figure8-7.AddingreferencestothesearchAPI Withtherequiredreferencesinplace,onlythreechangesarerequiredinthecode-behindfileofthe applicationpage: •
Adding“using”statementsforthenamespaces
•
Aneventhandlerforthebutton
•
Amethodtoinvokefromtheeventhandlerthatexecutesthesearch
OpenthefilenamedSearchApplicationPage.axpx.cs,andaddthefollowingnamespacestothetop ofthefile: using using using using using
System; Microsoft.SharePoint; Microsoft.SharePoint.WebControls; Microsoft.Office.Server.Search.Query; System.Data;
ThefilecontainstheSearchApplicationPageclass,whichhasonlyonedefaultmethod.Thisisthe Page_Loadmethod.InsidethePage_Loadmethod,addaneventhandlerfortheSearchbutton.Eachtime theSearchbuttongetsclicked,themethodcalledsearchButton_Clickwillbeinvoked. protected void Page_Load(object sender, EventArgs e) { this.searchButton.Click += new EventHandler(searchButton_Click); } Last,butnotleast,thecodeforperformingthesearchisadded.Thisisencapsulatedinsidethe searchButton_Clickmethod.
293
CHAPTER8■SEARCHTHROUGHTHEAPI
AKeywordQueryobjectisinitializedforthecurrentsite.Thentheresultproviderisconfiguredas default,whichmeansthatitusesSharePoint2010Search.TheotheralternativeistouseFAST. Asthissolutionshowsdatainonlyonedatagridview,onlyresultsoftypeRelevantResultsare returned.TheimplicitoperatorformultiplekeywordsorsearchtermsissettoAllKeywords.Thismeans thatthereisanimplicitANDbetweenkeywordsifnothingelseisspecified.Finallythequerytextis added—thesearchtermsthattheuserentersintothetextfieldonthesearchapplicationpage.Nowthe KeywordQueryobjectisconfigured,andasearchcanbeexecuted. protected void searchButton_Click(object sender, EventArgs e) { using (SPSite site = new SPSite(SPContext.Current.Web.Site.Url)) { KeywordQuery query = new KeywordQuery(site); query.ResultsProvider = Microsoft.Office.Server.Search.Query.SearchProvider.Default; query.ResultTypes = ResultType.RelevantResults; query.KeywordInclusion = KeywordInclusion.AllKeywords; query.QueryText = searchText.Text; ResultTableCollection results = query.Execute();
}
if (results.Count > 0) { ResultTable relevant = results[ResultType.RelevantResults]; DataTable search = new DataTable(); search.Load(relevant); DataView view = new DataView(search); searchGridView.DataSource = search; searchGridView.DataBind(); }
} Ifexecutingthesearchyieldsanyresults,theRelevantResultsareextractedfromthesearchand loadedintoadatatable.Thisdatatableisthenusedasthedatasourceinadataview.Finallyadata bindingisappliedbetweenthedatagridviewwebcontrolandthedataview.Sinceithasalreadybeen determinedthatsomeresultsexist,thedatagridviewwebcontrolwillnowshowtheseresults.Keepin mindthatthedatagridviewisconfiguredtoshowonlythefirsttenresults. Nowdeploythesolutionagain.ClicktheSearchbuttontoperformasearchforthesearchtermsand displayanyresultsinthedatagridviewwebcontrol(Figure8-8).
294
CHAPTER8■SEARCHTHROUGHTHEAPI
Figure8-8.Searchapplicationpagewithsearchresults
Summary Onechallengewhenworkingwithsearchthatisoftenoverlookedishowtocreateproperqueries.When dealingwithsimpleone-ortwo-wordqueries,thisisfairlystraightforward,butwhenmorespecificor complexqueriesarerequired,itcaneasilybecomecomplicatedtodocorrectly.Thischapteroffered somemethodsforhandlingsuchqueriesandvalidatingtheircorrectness. FortruecodedextensionsofthesearchcapabilitiesinSharePoint,thesearchAPIandthesearch webserviceareintroducedwithworkingcodeexamplesofhowtousethem.TheAPIsavailable (keyword-andSQL-basedqueries)differinthelevelofcontroloverthequeryandhowitisconstructed. AsbothrequiretheSharePointdynamic-linklibraries(DLLs)tobepresentonthemachine,thisisnot alwaysfeasiblewhendoingapplicationsintendedforexecutiononclientmachines.Forthis,anexample isgivenofhowtousethesearchwebservicetoperformclient-basedsearchesandhowtocreatea search-enabledapplicationpage. Itisneitherpossiblenorintendedthatthistopiciscoveredindepthinthisbook.Rathertheintentis toofferthemeansforthereadertogetsufficientknowledgetodofurtherexploration.
295
CHAPTER 9
■■■
Business Connectivity Services Aftercompletingthischapter,youwillbeableto •
UnderstandtheBusinessConnectivityServicesarchitecture
•
UnderstandhowBCSintegratesbothinsideandoutsideSharePoint2010
•
CreateBCSsolutionsofsimpleandmediumcomplexities
•
Createcustom.NETconnectorsusingVisualStudio2010
•
ConfiguretheSecureStoreServiceforusebyBusinessConnectivityServices
•
AddbasicsecuritytrimmingusingVisualStudio2010
•
UnderstandthepotentialthatBCSexposesforyourorganization
BusinessConnectivityServices(BCS)makesitpossibletointegrateexternaldatasources—typically line-of-businessdata—withSharePoint2010.ThemostexcitingfeaturesinBCSforSharePoint2010are theSharePointDesigner2010(SPD2010)integration,itssearchcapabilities,andMicrosoftOffice2010 integration(whichisoutsidethescopeofthisbook). ThenewBCSofferssimilarfunctionalitytotheBusinessDataCatalog(BDC)inSharePoint2007.In contrasttotheBDC,theBCSisaccessibletoamuchwideraudienceduetoitsintegrationwith SharePointDesigner2010.ThiswasnotthecasewiththeBDCinSPD2007.Also,accessingand manipulatingLOBdataisnoweasy.WithBDCitwasrelativelyeasytoreadexternaldata,but manipulatingexternaldatapresentedanumberofcomplexities.ThenewBCSinterfaceinSPD2010 makesiteasytobothdefineCRUDoperationsandevenaggregatedatabetweendifferentcontenttypes acrossmultipledatasources. NowBCSisavailableinSharePointFoundation2010,whichmeansitisfree.Thisallowsforcreating complexbusiness-drivensolutionsatalowcost. Thischapterdescribesthehigh-levelarchitecture,capabilities,andcomponentsofBCS,witha specialfocusonsearch-relatedtopics.ExampleswillbegivenofhowtouseSPD2010tocreate declarativesolutionsandVisualStudio2010tocreatecustomcontenttypesusingC#andenable searchingofthesecontenttypes.
297
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
BCSArchitecture ThearchitectureofBCSiscomprehensivebutstillmakesiteasytouse.ConsideringthatBCScanbe usedforbothSharePointandtheMSOfficeclients,itoffersanexcellentframeworkthatenables administratorstoeasilyunderstandandsetupBCSsolutionsthatintegratecontenttypesfrommost typicalcontentsourcesallthewaythroughthepipelineofBCS,finallypresentingadatainterfaceinan intuitivewaytotheenduser.Furthermoreitallowsdeveloperstocreatenew,reusablecomponentsas either.NETconnectorsorcustomconnectors.BCScanbedividedintothreelayers:presentation,core components,andcontentsources,asshowninFigure9-1.
Figure9-1.BCSarchitecture
Presentation BCSpresentsdatathatcanbeconsumedormanipulatedbySharePoint2010andMSOfficeclients. SharePoint2010containsthreeprimaryconsumersofdataexposedthroughBCS.
298
•
Externallists
•
Out-of-the-boxWebParts
•
Search
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
ExternalLists SharePointcontainsanewlisttypenamedexternallists.Thislistactsasanyotherlist,withthe exceptionthatanexternalcontenttypemustbedefinedforthelist.Itdoesnotsupportversioninfoand alerts,however,asitsdataisstoredexternally.
WebParts BCSWebPartsaresimilartothosefoundinBDCforSharePoint2007.AlthoughBCSisincludedforfree inSharePointFoundation2010,BCSWebPartsareincludedonlyintheSharePoint2010Enterprise edition.IncludedWebPartsare •
BusinessDataActions
•
BusinessDataConnectivityFilter
•
BusinessDataItem
•
BusinessDataItemBuilder
•
BusinessDataList
•
BusinessDataRelatedList
BusinessDataActions ActionsareexecutedonsingleresultsfromBCS.Theconceptisalsoknownfromsearchcenterswith resultactions,whicharecontext-specificactions,suchasopeningdocumentsintheirnativeapplication oropeningawebpageinanewwindow—inshort,actionsthatdifferbasedonthespecificresult. ActionsareconfiguredbyspecifyingatargetURLofanHTTPhandler,.aspxpage,orsimilar.Byadding parameterstotheURL,anactioncanbeconstructedsuchthattheURLcaninvokeatranslationusing theBingtranslationservice,lookingupaddressesonBingMaps,oreveninvokespecialpurpose functionalityifacustomHTTPhandleror.aspxpageisimplementedanddeployed.Theconfigured actionsforaBCSresultaredisplayedintheBusinessDataActionsWebPart.
BusinessDataConnectivityFilter TheBusinessDataConnectivityFilterWebPartisusedtoperformdatafilteringofSharePointWebParts basedonvaluespassedfromtheBusinessDataConnectivity(BDC)FilterWebPart.Anumberoffilters areincluded,allowingmanualinputsuchastextordateandtime,valuespickedfromalistofchoices,or fixedvalueseitherdefinedforthesiteorpassedbyURL.Ifafilterexistsonapage,theConnections optionbecomesavailableontheEditpage.Thisallowsforcreatinganassociationorconnection betweenafilterand,forinstance,alistviewordataviewWebPart.Thiswayselecteddatacolumns willbefilteredbasedonthedefinedfiltervaluestoshowacustomviewforadepartment,user,KPI event,etc.
299
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
BusinessDataItem TheBusinessDataItemWebPartshowsasingleresultinaverticalview.Atypicaluseistoshowdetailed orexpandeddataofaparticularresultrowfromasummarizedBusinessDataListWebPart.The BusinessDataItemWebPartcanbeconnectedtotheBusinessDataListWebPartandrespondto selectedrows.
BusinessDataItemBuilder ThisWebPartisusedtopassauniqueidentifierfromtheURLparametertotheWebPartsonthepage. UsingthisWebPart,itispossibletopasstheuniqueidentifieracrosspagescontainingBusinessData ItemWebParts.
BusinessDataList ThisisagridviewWebPartandthecoredisplaymethodforBCSdata,allowinganoverviewoftheLOB dataobtainedfromaBCSsource.ThekeyfeatureistheconnectionoptionthatallowsthisWebPartto beconnectedtodetailedviewWebPartsandotherwiseusedforfilteringand/orcustomactionsby clickingaresultrow.
BusinessDataRelatedList Sometimesaparticularresultfromoneexternalcontenttypehasassociationstodatainanother externalcontenttype.TheBusinessDataRelatedListWebPartisusedtoshowthe“many”partofthe relationshipbyusingvaluesfromotherBCSWebPartsorURL-basedidentifierstolookupassociated datafortheexternalcontenttypedefinedfortheBusinessDataRelatedListWebPart.
Search SearchresultsoriginatingfromBCSaredisplayedinapagecalledtheprofilepage,whentheBCSresult itemgetsclickedoropened.Theprofilepageisan.aspxpagebuiltwithBCSWebParts.TheWebParts displaytherelevantBCSentitybasedontheentity’sID,whichispassedtotheprofilepageasURL parameters.Multipleprofilepagescanbecreatedtoaccommodatedifferentexternalcontenttypes. Profilepagesarenotcreatedautomaticallyforanexternalcontenttype.Perdefault,clickinga searchresultfromaBCSsourceyieldsthewell-known404error(pagenotfound).Theprofilepagemust becreatedandconfiguredfromtheSearchserviceapplication.
■NoteSearchingforexternalcontentusingBCSisavailableonlyinSharePoint2010StandardandEnterprise versions.
300
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
CoreComponents ThecoreofBCSistheabilitytoconnecttoalargesetofdatasourcesusingitsconnectorframework.By definingcontenttypesfromthedatasources,theruntimeengineisabletoexecuteCRUDoperationson thesecontenttypes.Thecorecomponentsare •
Runtimeengine
•
BCSRichClientCache
•
Connectors
•
Externalcontenttypes
TheruntimeengineisresponsibleforexecutingBCSoperationsonthecontentsources.The runtimeengineisintegratedintothesupportedofficeapplications,SharePointworkspace,InfoPath, and,ofcourse,SharePoint2010.Theintegrationintotheseapplicationsmakesthemindependentof SharePoint2010asamiddlelayerforusingBCStoconnecttocontentsources.
BCSRichClientCache BusinessConnectivityServicesofferscacheandofflinefeaturesthatalsosupportcache-based operations.ForusersthatworkwithsolutionsdeployedtosupportedOffice2010applications(Word, Outlook,SharePoint2010Workspace,etc.),theycanmanipulateexternaldata,evenwhentheyare workingofflineoriftheserverconnectivityissloworunavailable.Theoperationsperformedagainst cachedexternalentitiesaresynchronizedwhenconnectiontotheserverbecomesavailable.Italso providesaflexibleexternaldatacachingmechanismthatisastransparentaspossiblewhilestillenabling theuserorapplicationtohaveexplicitcontroloverthecontentofthecachewhenrequiredvia automaticandmanualcleanup.
Connectors TheBCSconnectorframeworkinSharePoint2010comeswithbuilt-insupportforcreatingexternal connectionstoSQL,WCF,and.NETassemblies.Ingeneralthiscoversthemajorityofconnection requirements.Itwouldhavebeennice,however,ifaflatfileor.xmlconnectorwasbuiltinaswell. FortunatelytheBCSconnectorframeworkisdesignedtobeextendablewitheithercustomconnectors orcustom-made.NETconnectors.Laterinthischapter,anexamplewillbepresentedofhowtocreatea .NETflatfileconnectorusingVisualStudio2010.
ExternalContentTypes ExternalcontenttypesaretheglueofBCS.Theydescribethemetadatadefinitionsoftheexternal contentdata,connectivityinformation,anddataaccesscapabilities.ThiswayanECTprovidesa reusableschematobeusedinSharePointlistsandWebParts. TheexternalcontenttypeiswhattheITprofessionalcreatesinSharePointDesigner2010.Atypical businessrequirementforanITprofessionalistocreateanECTforacustomerdatabase.Thisdatabase mightcontainnames,addresses,paymentinfo,andauniquecustomerID.WhentheITprofessional createsanECTforthisdatasource,theECTwillcontainboththecolumndefinitionsfortherequired fieldsaswellasnamesandoptionallycredentialsforthecustomerdatabase.Itwillalsocontain
301
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
informationonwhichCRUDoperationscanbeexecutedonthecustomerdatabase.FromtheIT professional’spointofview,anECTisamappingbetweentheexternaldatasourceandSharePoint2010. ThekeydifferencefromBDCinSharePoint2007isthattheECTnowalsocontainsthefullCRUD behavior,whereasinBDCithadtobeprogrammed. Behindthescenes,anECTisan.xmlgrammarfilecontainingmetadatathatdescribestheECT.For theECTtobeavailable,ithastobedeployedtothemetadatastoreinSharePoint(orthroughaclickoncepackage,e.g.,Outlook2010). Dependingonthecapabilitiesofthedatasourcesandconnectors,itispossibletocreateanECT thatprovideseasydataaccesswithcomplexlogic,suchasaggregatingdataacrossmultiplesources, providingcomplextransformations,evaluatingcomplexbusinesslogicorcustomsecurityrequirements, orcallingsystemsmultipletimesinordertoprovideasingleviewofdata.
■NoteThisbookusesthetermexternalcontenttype.Sometimesitisalsoreferredtoasanentity.Thisgenerally isthetermusedbydevelopers,asitisthenamegiventotheECTinVisualStudio2010.Theydo,however,mean thesamething.
ContentSources ContentsourcesaretheexternalpartofBCS.Theyareusedbythesearchenginetoindexexternaldata. Asmentioned,BCScomeswithbuilt-insupportforconnectingtocontentsourcesofthetypesSQL, WCF,and.NETassemblies.OftenthecontentsourceismadeavailablethroughinstallationofMicrosoft SQLServeroradataserverprogramthatcanbeaccessedandcontrolledthroughWCF.Inmore advancedcases,thecontentsourcemightprovidea.NETAPIforperformingtheseoperations. Onsomeoccasions,thecontentsourcedoesnotprovideanyoftheforegoingoptionsforinterfacing withthedata.Inthesecases,adeveloperhastodevelopeithera.NETAssemblyConnectororcreatea customconnectorforBCS.Bothoptionshavetheirownbenefitsandweakpointsthatthedeveloper shouldbeawareof,butitisoutsidethescopeofthisbooktodiscussthem.
BusinessConnectivityServicesDeploymentTypes UnderstandinghowandwhereaBCSsolutioncanbedeployedisfundamentalwhenplanninghowto leveragethisnewfunctionalityinSP2010.Withthenewtoolsupportandwiderangeofclientprogram support,BCSisastrongcandidatetoconsiderwhenanalyzingopportunitiestomeetbusiness requirements.ThissectiongivesanoverviewofwhereBCScanbedeployedandthegeneralcomplex levelsofdeployment.
FunctionalityforNormalUsers“Out-of-the-Box” SharePoint2010nowhasout-of-the-boxsupportforuserstodisplayexternaldatausingBCSina seamlessway.SimilarlyBCSintegratesMSWord2010,MSOutlook2010,andSharePointWorkspace withSharePoint2010toallowuserstouseitinawell-knownmanner.EspeciallythesupportforOutlook 2010wasamuchsought-afterfunctionalityinSharePoint2007.Littleornoadministratorinterventionis requiredforuserstoleveragelistdataintheseapplications.Inmostcases,thepermissionssetupisthe
302
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
mostimportantsteptobeconsciousaboutwhenpreparingtheSharePointlists,etc.forusebythese applications. Usingtheexternallist,BusinessDataWebParts,orthenewChartWebPartinSP2010,itiseasyfor userstodisplayexternaldata.Itisalsopossibletoextendexistingstandardlistsordocumentlibrariesby addinganexternaldatacolumn. ExternalcolumnscanalsobeusedinMSWord2010bycreatingaQuickPartforcontentcontrol. Thisisuseful,forinstance,whenadocumenttemplateistoreflectthelatestavailabledatafromthe SharePoint-basedintranet. MSOutlook2010andSharePointWorkspaceprovidespecialintegrationwithSharePoint.External listscanbetakenofflinefromtheSharePointserver.Thisway,userscaninteractwiththedatainthe externallistwithoutleavingtheclientprogram.Themajorbenefitisthattheintegrationbecomes transparenttotheuser,sincethelookandbehaviorarethesameasinOutlookandWorkspace.The requiredadd-inforOutlookisinstalledaspartofMicrosoftOffice2010. OnethingtobeawareofisthatofflinelistsinMSOutlook2010andSharePointWorkspacerequire synchronization.Thiscanbedoneeitherautomaticallyoronuserrequest.Ifautomaticsynchronization isactivated,thedefaultintervalisthreehours.Asthestructureoftheofflinelistcanchangeornewviews canbeaddedormodified,itisevenpossibletoupdatethestructureorviewautomaticallywithoutany userintervention. Theexternalcontenttypesandexternallists/columnsforthesetypesofsolutionsareusually createdbyanadministratorusingSPD2010.TheSharePointribbonhasbuttonstomakeaconnection betweenOutlook2010orSPWorkspace2010andtheexternallist/column.
FunctionalityforAdvancedUsersandAdministrators SomeusesofBCSrequiretheadministratororITprofessionaltoperformcertaintasks,suchas publishing,tomakeitavailabletousers.ItalsoallowstheITprofessionaltousecustomcode-based solutionsasreusablecomponents.Thisisparticularlybeneficialforthewaymanycompaniesoperate, asaconsultantcompanycanmakecomponentsthattheinternalITprofessionalscanuseandconfigure tomeetchangingdemands,withouthavingtogobacktothevendororconsultantthatprovidedthe customcode-basedsolutionforeverytinychangetohowthecomponentisused.ItmakestheBCS installationeasier,faster,andcheapertomaintain. InfoPathformspresentingexternaldatacanbecustomizedintermsoflookandfeel.Thiscanbe donebyaddingdeclarativerulesandbusinesslogic.Itisalsopossibletoaddcode-behindtotheforms. Theformispublishedtotheserverbytheadministrator. SharePointworkflowscanbeextendedwithnewcapabilitiesthroughSPD2010byaddingreadand writecapabilitiestoexternallistsorusingcustomworkflowactivitiesfromVS2010.Thesemustbe publishedinSharePoint. SiteadministratorscancreateWebPartpagesbasedonmultipleBusinessDataWebPartsandChart WebParts.BycreatingconnectionsbetweentheWebParts,itispossibletocreatehighlycustomized andinformation-richpageswithdatafrommostcommondatasources. WhenworkingwithexternallistsinOutlook2010,itispossibleforusersoftheOutlookclientto createnewcustomizedviewstoshowthisexternaldata.Thecustomviewcanthenbesavedbackto SharePoint.ThismakesitavailableasapublicviewforotherOutlookuserswhousethesameexternal listinOutlook. Microsofthasanumberofapplicationsforcreatingthesesolutions.Themostcommontoolsarethe InfoPathDesigner,whichisusedtocreateforms,andtheSharePointDesigner,whichisusedtocreate WebPartpagesandworkflows.WebPartpagescanalsobecreatedthroughthebrowser.FinallyMS Outlook2010canbeusedforcreatingcustomizedviewsspecificallyforOutlook.
303
x
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Code-BasedSolutions Code-basedsolutionsaresolutionscreatedinVisualStudio2010byadeveloper.Thesesolutionsenable thecreationofreusablecomponentsaseithera.NETAssemblyConnectortoaggregateortransform datafromexternalsystems,customWebParts,customworkflowactivities,code-behindforInfoPath forms,andcode-basedactionsorexternaldatapartsforuseinOutlookdeclarativesolutions.Codebasedsolutionsarenowmadeeasyfordeveloperswithbuilt-insupportinVisualStudio2010.In SharePoint2007,itrequiredadvancedcodingskillstodoanythingmorecomplexthandatareading. Nowthedevelopercanfocusonissuessuchasreusabilityinstead. Acode-basedMicrosoft.NETFrameworksolutioncreatedinatoolsuchasVisualStudiocanuse anyelementofthepublicBusinessConnectivityServicesobjectmodelandcanenableuserstointeract withexternaldata.ItcanregisterwiththeBusinessDataConnectivityservicebyusingtheBDCobject modeltopresentdatainSharePoint,anOffice2010applicationsuchasMicrosoftExcel,oracustom application.ThisobjectmodelandBCSruntimeisinstalledwithSharePoint2010andOffice2010. Externaldatacanberetrieveddirectlyfromtheexternalsystemwhileconnected,oritcanberetrieved locallyfromtheBCSRichClientCache,provideditisalreadyavailable,forinstance,fromanoffline externallistinSharePointWorkspaceorOutlook.ThistypeofsolutioncanalsobeusedtoextendBCSto MSOfficeapplicationsthatarenotintegratedwithBCS.TypicallythiswillbeExcelbutalsoPowerPoint. Alternativelyanentireend-to-endsolutionthatleveragesthepublicBusinessConnectivityServices objectmodelcanbecreated.Thedeploymentprocessis,however,moredifficult,andthereisnotool supportforthiscustomconnectorsolution. Inacode-basedend-to-endsolution,commonlyreferredtoasacustomconnector,thedeveloper controlsalloftheuserinterface,packaging,anddeployment.Thistypeofsolutioncannotmakeuseof theBusinessConnectivityServicesrichclientruntime,whichisusedbyintegratedanddeclarative solutionstointegratedata.
■NoteFormostpurposes,a.NETAssemblyConnectorissufficienttomeetbusinessneeds,anditisbyfarthe easiestwaytogo.
Byusing“clickonce”packages,itispossibletocreateanddeploynewtaskpanesorpresentexternal datainexternaldatapartsinMSOutlook2010.ThisrequiresanumberofXMLfilestobecreatedand useoftheBCSSoftwareDeveloperKittocreatethepackage.Thisbookwillnotgointomoredetailswith this,asitisahugetopiconitsown,butwilljustmentionthepossibilityofdoingso. ABCSprojecttypeisavailabletofacilitatethecreationof.NETAssemblyConnectors.Anexampleof aflatfile.NETconnectorisdescribedlaterinthischapter. WhenworkingwithBCS,creatingtheexternalcontenttypesisthekeytasktoperformbyIT professionals.WiththenewsupportforcreatingECTsinSPD2010,itissurprisinglyeasytodo.Thisis definitelyoneofthemostpowerfulnewadditionstoSharePoint2010.ItisalsopossibletocreateanECT fromtheSharePointsite,butSPD2010isthebetterchoicewhenavailable. TogiveanexampleofcreatinganECT,assumeadatabasewithcustomerinformation(Figure9-2) thatistobemadeaccessiblethroughanexternalSharePointlist.TheContactofficetypeischosento makeitintegratenicelyintoOutlookasanofflineexternallist.
304
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-2.Samplecustomerdata InSPD2010,connecttoasiteandopenExternalContentTypesfromtheNavigationmenu,asin Figure9-3.Onthispage,allcurrentECTsforthesitearedisplayed.Theribbonhasquickaccessbuttons forthetypicaltaskstobeperformed.
Figure9-3.ExternalContentTypeswindow
305
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Thefirststepistocreateanewexternalcontenttype: 1.
ClicktheNewExternalContentTypebutton.TheExternalContentTypedialog (Figure9-4)willbedisplayed.
2.
EnteraNameandDisplayNamefortheexternalcontenttype.Asthisexample containscontactinfo,selectContactasOfficeItemTypeintheExternal ContentTypeInformationsection.
3.
Clickthelinknamed“Clickheretodiscoverexternaldatasourcesanddefine operations.”ThisopenstheOperationDesignerdialog.
Figure9-4.CreateExternalContentTypewindow OntheOperationDesignerdialog,clickAddaConnectiontoconnecttothedatabase.Inthis example,itiscalledCustomersDatabase.Thiswillestablishaconnection,andthedatabasetableswillbe displayed.Inthisexample,ithasonlyonetable,namedCustomersTable. Tospecifythetypesofoperationsthatcanbeperformed,right-clickCustomersTableandselectthe optionCreateAllOperations,asinFigure9-5.ThiswillenableallCRUDoperationsonthedatabase tableandopentheoperationswizard.
306
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-5.OperationDesigner Usetheoperationswizard(Figure9-6)tomapcolumnstotherespectiveofficeproperties.Todo this,selecttheappropriatedatasourceelementssuchascompanyname,phonenumber,etc.inthe Propertieswindowandspecifythecorrespondingofficeproperty.Optionallyadisplayfriendlyname canbespecified.ThisnameiswhatisshowedlaterontheprofilepagefortheECT.Finallychoosethe columncontainingthevaluestobeusedasuniqueidentifiers.
307
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-6.Operationswizard Closethewizardwhendone,whichreturnstotheOperationDesignerwindow,showninFigure9-7.
■NoteThewizardgivesreal-timeinformationonsuggestedandmissingtasksintheErrorsandWarnings window.Theerrorsmustberesolvedbeforethewizardiscompleted.
308
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-7.OperationDesigner Aftercompletingthewizard,savetheECTbyclickingFileandSaveontheribbon.Thenew externaldatatypeissavedtothemetadatastoreandcanbeusedforcreatingnewexternallistsin SharePoint2010. NavigatetoSiteActions,andviewallsitecontent.SelectExternalList,andthenclickCreate.This openstheNewExternalListpage,showninFigure9-8.Enterthenameofthenewlist,selecttheExternal ContentType,andfinallyclickCreate.
309
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-8.Creatinganexternallist Beforeuserscanaccessthelist,theproperpermissionsmustbeconfigured.Gototheservice applicationfortheBusinessDataConnectivityservice.Selectthenewlycreatedexternalcontenttype andclickSetMetadataStorePermissions,asshowninFigure9-9.
310
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-9.BusinessDataConnectivityservicemainpage OntheSetMetadataStorePermissionspage(Figure9-10),entertheappropriateuserpermissions, andclickOK.Typicallyatleastoneadministrativeusershouldhaveallpermissions.Asadministration hereistime-consuminginthecaseofmanyusers,considerusinggroupsinsteadforeasiermaintenance.
Figure9-10.Settingmetadatastorepermissions
311
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
■NoteIftheECTistobeusedinsearch,makesuretograntthecontentaccessaccountappropriatepermissions. Inthisexample,thecontentaccessaccountissetastheauthor’saccount.
Thenewexternallistlooksandbehavesasanyotherordinarylist(Figure9-11),withtheexception ofnotsupportingversionhistoryorsettingupalerts.Itemscanbedisplayed,added,changed,and deleted—forexample,changingthePhoneNumberinthelistupdatesthevalueintheCustomersDatabase database.
Figure9-11.Theexternallistdisplayingexternaldata AkeyfeatureofBCSistheoptiontoindextheexternaldataandpresentitnicelyassearchresults. Therearesomerequiredconfigurationstepsforthistobeavailable.Thefollowingsectionsfocuson makingtheCustomersECT,createdintheprevioussection,searchable.
SettheTitleFieldintheExternalContentType Itisnotrequiredthatatitlepropertyisconfiguredfortheexternalcontenttypes,butthisisessentialfor achievingmeaningfulsearchresults.ItcanbeconfiguredinSPD2010. InSPD2010,connecttothesitecontainingtheexternalcontenttype.IntheFieldssection(shownin thebottomrightcorneronthesummarypageinFigure9-12),highlighttheNamefieldofthemost meaningfulfieldtouseasthetitle.ClicktheSetasTitlebuttonontheribbon,andsavetheexternal contenttypebyclickingFileandthenSaveontheribbon.
312
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-12.Settingtheexternalcontenttypetitle
CreatingaProfilePagetoDisplayBCSResults Theprofilepageisusedtodisplaysearchresultitemsfromexternalcontenttypes.OpenCentral AdministrationandnavigatetoCreateSiteCollections.Createanewblanksitetohosttheprofilepage, asshowninFigure9-13.Giveitameaningfulnameaccordingtotheexternalsourceitgetspairedwith. ItisimportanttowritedowntheURL,asithastobeenteredmanuallylater.
313
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-13.Creatingaprofilepage NavigatetotheManageServiceApplicationspageinCentralAdministration,andclicktheBusiness DataConnectivityserviceapplication.OntheEdittaboftheribbonatthetopofthepage,click Configure.ThisopensthedialogshowninFigure9-14.
314
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-14.Associatingtheexternalcontenttypewithaprofilepage EntertheURLoftheprofilepageintotheHostSharePointsiteURLfield,andclickOK.Selectthe Customersexternalcontenttype(oryourownECT)usingthecheckbox,andclickCreate/Upgrade.This willcreateanewprofilepageandViewactionfortheexternalcontenttype.ClickOKforthewarningin Figure9-15.
315
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-15.Warningpagewhencreatingaprofilepage ClickingOKtothewarningwillcreateanewdefaultactionpointingtotheprofilepage,withtheID passedasaURLparameteronthequerystring.Anotificationthattheoperationhassucceeded(Figure 9-16)willbedisplayed.
Figure9-16.Confirmingtheprofilepagehasbeencreated
316
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
ConfigureIndexing Nowtheexternalcontenttypeisfullyconfiguredandreadytogetindexed.BCSindexingiseasyin SharePoint2010comparedtoBDCinSharePoint2007.JustaddtheBCSdatasourceasanewsearch contentsourceintheSearchserviceapplicationbynavigatingtotheManageServiceApplicationspage inCentralAdministration.ClicktheContentSourceslinkinthenavigationpane,whichopensthe ManageContentSourcespage,showninFigure9-17.Thispageshowsalistofallcontentsources.
Figure9-17.Contentsourcespage ClickNewContentSource,andenteranappropriatenameforthecontentsource.ChooseLineof BusinessDataasthecontentsourcetype,andchoosetherelevantBCSapplicationandexternaldata source,asinFigure9-18.
317
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-18.CreatinganewcontentsourcefortheLOBdataECT Nowselect“Startfullcrawl”,andclickOK.Itusuallytakesafewminutesfortheindexertoupdate andstart.Whenitgoesbacktoidle,theexternalcontentsourcehasbeencrawled.
PerformingaSearch Inordertotestthesearch,asitethatisconfiguredtoperformenterprisesearchesisrequired(see Chapter4).GototheEnterpriseSearchCentersite,andsearchforacustomernameorothercontact detail(ifyoufollowedtheCustomersexample).ThesearchshouldnowreturnresultsfromtheBCS,as showninFigure9-19.
318
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-19.Searchresultsdisplayingexternaldata ClickingasearchresultfromtheBCSsourceopensitinthenewlycreatedprofilepage,asshown inFigure9-20.Theprofilepageautomaticallyshowsthemetadatapropertiesfromtheexternal contenttype.
Figure9-20.SearchresultsitemdisplayedontheprofilepagefortheECT Afterfollowingthiswalkthrough,itshouldbeeasytocreateandconfiguresearchingforother externalcontenttypesaswell.
319
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Creatinga.NETConnectorinVisualStudio2010 OneofthemajorstrengthsofBCSishoweasyitistointegratewithalmostanyexternaldatasource.This sectionintroducestheAPIandhowtouseVisualStudio2010tocreateasimple.NETconnector.This connectorexampleconnectsjusttoadatafilebutcanbeextendedtoconnecttomorecomplexdata sources..NETconnectorscanbediscoveredthroughtheDiscoverfunctioninSPD2010.
CreatingaSampleFlatFileDataSource Firstofall,weneedaflatfilewithsomedatainit.Startbyaddinga.txtfileonthispathonthe SharePointserver: C:\Shared\zipcodes.txt Inreal-lifescenarios,itislikelytobeonafileshare,butforthisexamplewekeepitsimple.Inthis example,thefilecontainscitynamesandzipcodes,separatedwithacommaandeachname/zippairon anewline.Forthisexample,Danishzipcodesareused.Thefileshouldlooklikethis: 2750,Ballerup 1810,Frederiksberg 1720,Copenhagen West ...
Creatinga.NETAssemblyConnectorProjectinVisualStudio2010 A.NETAssemblyConnectoriscreatedastheprojecttypeBusinessDataConnectivityModel(BDC Model)inVisualStudio2010.OpenVisualStudio2010,clickFile,selectNew,andthenselectProject. ChoosetheBusinessDataConnectivityModelprojecttype,andnametheprojectZipCodesModel,as showninFigure9-21.ThenclickOK.
320
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-21.SelectingtheBusinessDataConnectivityModelfromtheProjectswindow SpecifytheSharePointsitewherethemodelshouldbedeployed(Figure9-22),andclickFinish.
321
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-22.Settingdeploymentsite NotethatBDCMprojectscanbedeployedonlyasafarmsolution.Thisisbecausethemodelhasto bedeployedtothemetadatastore. TheBDCMprojecttypecreatesanumberoffilesautomatically.ThesefilesshowninSolution Explorer(Figure9-23)aretheminimumrequiredtomakeanewmodelanddeployit.IftheBDCMis partofathird-partysolution,itislikelythatanalternativedeploymentmethodisusedandthefeature filesandWSPpackagefilescanberemoved.
322
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-23.SolutionExplorershowingtheBDCmodel TherequiredreferencestotheSharePointassembliesareautomaticallyadded.Afeaturefor enablinganddisablingtheBDCMisincluded,andaWSPpackagecontainingthefeatureandmodelis added. TheBDCmodelitselfcontainsadefinitionofthedatasource,connectioninformation,andaccess layerinformation(queryandreturntypeinformation).TheBDCmodelcontainstwoclasses:aclassthat definestheentityorexternalcontenttypethatthisBDCmodelreturns,andaclasscontainingthecode usedtoconnecttothedatasource,queryit,andreturntheentitiesitcontains.
CreatinganEntity(ExternalContentType) Thefirstrealdevelopmenttaskistocreatetheentitytobereturned.Itisveryimportanttomakesure thattheentitycontainstheappropriatedatatofulfillthebusinessrequirementforthis.NETconnector. Todothis,theEntity1.csfilewillberenamedZipCodesEntity.csandmodifiedtomaptothezip codesfile. TorenamethefilecalledEntity1.cs,right-clickitinSolutionExplorerandselectRenamefromthe contextmenu.TypeinZipCodesEntity.cs,andclickYeswhenaskedifallreferencesshouldberenamed. Tomodifythemapping,opentheentityfilebydouble-clickingZipCodesEntity.cs.Deletethe existingproperties,andaddtwonewpropertiescalledZipCodeandCity.Theclassshouldnowlookas follows:
323
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
using using using using
System; System.Collections.Generic; System.Linq; System.Text;
namespace ZipCodesModel.BdcModel1 { public partial class ZipCodesEntity { public string ZipCode { get; set; } public string City { get; set; } } }
CreatinganEntityServiceClass Theentityserviceclassisthisexampleisusedtoquerythedatasource—inthisexample,thezipcodes textfile.TheoutputoftheentityserviceclasswillbeoneorallobjectsoftheZipCodesEntityclass, dependingontheoperationperformed. RenametheEntity1Service.csfiletoZipCodesEntityService.csaswiththeentityfile,andclickYes whenaskedtoupdateallreferences. InSolutionExplorer,double-clickZipCodesEntityService.cstoopenitincodeview. Asthedatasourceisatextfile,addtheSystem.IOnamespace,whichcontainstherequiredclasses forreadingfromthezipcodestextfile. using System.IO; Somemethodsarerequiredfortheentityserviceclasstofunction.Theentityserviceclassdefines theFinderandSpecificFindermethodsusedtoreturnentitiesfromthedatasource(zipcodestextfile). ReadList()istheFindermethodoftheBDCmodel.Inthisexample,itshouldreturnallzipcode/city pairsfromthedatasource.ThemethodreturnsanIEnumerablegenericcollectionofentities,which,in thiscase,isacollectionofZipCodesEntityobjects.Inthisexample,theobjectsarejustcreatedin memory,butadvancedstreamingschemesmightbeappliedifthedatasourcecontainslargerdatasets. TheReadList()methodcanbeimplementedasshowninListing9-1. Listing9-1.ImplementationoftheReadListMethod public static IEnumerable ReadList() { List zipCodesEntityList = new List(); TextReader textReader = new StreamReader(@"C:\Shared\ZipCodes.txt"); string zipCodeEntry; while ((zipCodeEntry = textReader.ReadLine()) != null) { ZipCodesEntity zipCodesEntity = new ZipCodesEntity(); string[] entityData = zipCodeEntry.Split(',');
324
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
}
zipCodesEntity.ZipCode = entityData[0]; zipCodesEntity.City = entityData[1]; zipCodesEntityList.Add(zipCodesEntity);
textReader.Close(); }
return zipCodesEntityList;
TheReadItem(string zipCode)methoddefinestheSpecificFindermethodfortheBDCmodel.In thisexample,itreturnsaZipCodesEntityobjectwiththezipcode/citypairmatchingthezipcode argument.TheReadItem()methodcanbeimplementedasshowninListing9-2. Listing9-2.ImplementationoftheReadItemMethod public static ZipCodesEntity ReadItem(string zipCode) { foreach (ZipCodesEntity zipCodesEntity in ReadList()) { if (zipCodesEntity.ZipCode == zipCode) return zipCodesEntity; } return null; } Itshouldnowbepossibletocompiletheassembly,whichcanbeconsidereda.NETAssembly Connectoratthispoint.NowtheBDCmodelwillbecreated,andtheconnectiontotherelevantdata source,querycapabilities,andreturnvaluetypearedefined.
BDCModelingTools Afterdefiningtheentityandservice,theBDCmodelcanbecreated.TheBDCmodeldefineshowto connecttothedatasourceandhowitcanbequeried.Italsodefinesthetypeofinformationitreturns. TheBDCExplorerandtheBDCDesignerareusedtodefinetheBDCmodel.BothofthesenewVS2010 componentsaredescribedahead.
325
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
BDCExplorer VS2010extendsthewindowslistwiththeBDCExplorer,showninFigure9-24.Thiswindowisusedto createoredittheBDCmodel.
Figure9-24.BDCExplorershowingtheBDCmodel JustlikewithSolutionExplorerandclassviewwindows,theBDCExplorerislinkedtotheProperties window.ItshowstherelevantpropertiesallowingthedevelopertoviewandedittheBDCmodel.Figure 9-25demonstratesthis.WhenIdentifier1isselectedintheBDCExplorer,thecorrespondingproperties aredisplayedinthePropertieswindow.
326
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-25.EntitypropertiesdisplayedbeneaththeBDCExplorer
BDCDesigner VS2010includestheBDCDesigner(Figure9-26).Thisdesignerwindowallowsthedevelopertocreate andeditaBDCmodel.TheBDCDesignerworksthesamewayastheBDCExplorerregardingthe Propertieswindow.
Figure9-26.ABDCentitydisplayedintheBDCDesigner
327
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
DefiningtheBDCModel DefiningaBDCmodelisessentiallytodefinethemappingbetweenyour.NETAssemblyConnectorand theBDC.Inthisseriesofsteps,themappingsbetweenthe.NETAssemblyConnectorandtheBDCare defined.Tocreatethemapping,double-clicktheBDCExplorertoopentheBDCModel1.bdcmfilein SolutionExplorer.TheBDCDesignerwillthenopenandbevisible.FromtheViewmenu,selectOther Windows.ThenclickBDCExplorertoopenthewindow.
ConfiguringtheBDCModelandLOBSystem RenametheBDCmodeltoZipCodesModel,asshowninFigure9-27.Right-clickthesecondnodefrom thetop,namedBdcModel1,andclickProperties.ChangetheNamepropertytoZipCodesModelinthe Propertieswindow.
Figure9-27.RenamingtheBDCmodel Thethirdnodefromthetop(theLOBsystem)shouldalsoberenamed.ChangetheNamepropertyto ZipCodesLOBSystemusingthePropertieswindow,asshowninFigure9-28.
328
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-28.RenamingtheLOBsystem Thefifthnodefromthetop(theLOBsysteminstance)shouldberenamedto ZipCodesLOBSystemInstancebyusingthePropertieswindowtochangeitsNameproperty,asshownin Figure9-29.
Figure9-29.RenamingtheLOBsysteminstance
329
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
TheShowInSearchUIpropertyontheZipCodesLOBSystemInstancemustbesettoallowthe ZipCodesLOBSystemInstancetobecrawledandsearchedbytheSharePointsearchservice.Ifthe LOBSystemInstanceshouldnotbecrawledorsearched,thispropertydoesnotneedtobechanged.To settheShowInSearchUIpropertyontheZipCodesLOBSystemInstance,clickthe ZipCodesLOBSystemInstancenodeintheBDCExplorer.ThenclickthebuttonintheCustomProperties rowinthePropertieswindow.UsethePropertiesEditortosettheShowInSearchUIproperty.Giveitthe datatypeSystem.Stringandsetthevaluetox,asshowninFigure9-30.ClickOK.
Figure9-30.AddingtheShowInSearchUIpropertytotheLOBsysteminstance
ConfiguringtheEntityandEntityMethods TheBDCmodelentityshouldberenamedtomatchtheentitydefinedinthe.NETAssembly Connector.ThisisdonebyselectingEntity1fromtheBDCExplorer.ThenchangetheNamepropertyto ZipCodesEntityinthePropertieswindow,asshowninFigure9-31.
Figure9-31.RenamingtheBDCmodelentity
330
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
TheRootFinderpropertyontheFindermethodmustbesettospecifytheFindermethodusedto enumeratetheitemstocrawl.IftheFindermethodshouldn’tbeusedforcrawling,thispropertycanbe ignoredandleftunset.TheRootFinderpropertyontheFindermethodissetintheBDCExplorerby clickingtheReadListnode.Afterthat,clickthebuttonintheCustomPropertiesrowintheProperties window.AddtheRootFinderproperty,withadatatypeofSystem.Stringandavalueofxinthe PropertiesEditor,asshowninFigure9-32.
Figure9-32.AddingtheRootFinderpropertytotheFindermethod Next,theidentifierfortheFindermethodreturnparameterissetfortheentity.Thisisdoneby selectingtheIdentifier1nodeundertheFindermethodreturnparameterfortheZipCodesEntity.Then, inthePropertieswindow,changetheNamepropertytoZipCode,asshowninFigure9-33.
Figure9-33.RenamingtheFindermethod Next,settheidentifierforthespecificFindermethodreturnparameterandtheinputparameterin theentity.Todoso,firstselecttheIdentifier1nodesunderthespecificFindermethodreturn parameterfortheZipCodesEntity.Then,inthePropertieswindow,changetheNamepropertytoZipCode, asshowninFigure9-34.
331
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-34.RenamingtheFindermethodreturnparameter Right-clickIdentifier1,andselectRenameintheBDCDesigner(Figure9-35).Changetheidentifier toZipCode.
Figure9-35.RenamingtheBDCmodelinDesignerview Themessageparametersarenotneeded,sotheyshouldberemoved.Right-clickthemessage parameterontheFindermethod,andselectDelete.ThisremovestheMessagenodefromtheBDC Explorer.RepeatthisonthespecificFindermethod.Alternativelydeletetheentity,andrecreateanew “empty”entity.
AddingParameterstoMaptheDataSource Parametersmustbeaddedthatmaptothedatainthezipcodestextfiledatasource.Inthisexample,the onlyparametertomapisthecityname.
332
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
IntheBDCExplorer,right-clickEntity1andselectAddTypeDescriptor.InthePropertieswindow, changetheNamepropertytoCityandtheType NamepropertytoSystem.String,asshowninFigure9-36. RepeatthisfortheFinderandtheSpecificFindermethods.
Figure9-36.AddingparameterstotheFinderandSpecificFindermethods
ConfiguringtheFinderMethodInstance ThemethodinstancepropertiesareconfiguredfromtheBDCMethodDetailswindow.Thiswindowis alsonewinVS2010.SelectingamethodintheBDCDesignerwilldisplaythecorrespondingmethod instancesintheBDCMethodDetailswindow,asshowninFigure9-37.
333
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-37.ConfiguringtheFindermethodinstance TheFindermethodisspecifiedbysettingtheRootFinderpropertyontheFindermethodinstance.It specifiesthatthisinstanceisusedtoenumeratetheitemstocrawl.IftheFindermethodinstanceisnot tobeusedforcrawling,thispropertycanbeignoredandleftunset.ClicktheReadListnodeintheBDC MethodDetailswindow.TosettheRootFinderpropertyontheFindermethodinstance,clickthebutton intheCustomPropertiesrowinthePropertieswindow.AddtheRootFinderproperty.Setthedatatype asSystem.String,andsetthevaluetox,asshowninFigure9-38.
Figure9-38.AddingtheRootFinderpropertytotheFindermethodinstance
334
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Ifthedatasourcecontaineddatasuitableforincrementalcrawls,theLastModifiedTimeStampField propertyontheFindermethodinstancecouldalsobeset.Thisisnotfeasibleinthisexample.
Deployment Deployingthe.NETAssemblyConnectorismadeeasyinVisualStudio2010.OpentheBuildmenuon thetopbar,andclickDeploySolution.NowVS2010beginstocompileandpackagesthe.NETAssembly Connectorcode,BDCmodel,andthefeature.FinallyitcreatesaWSP,whichisthepackagetypeusedfor deployingsolutionstoSharePoint. TheWSPpackageisthendeployedtothespecifiedSharePointsite.Thefeatureisactivated,which registerstheexternalcontenttypeassociatedwiththis.NETAssemblyConnector.
TheSecureStoreService TheSecureStoreServiceisusedtostoreaccountsinsideSharePointtousewhenauthorizingagainst databasesthatrequireauthorization,etc.Ittypicallystorescredentialsintheformofusernameand password,butitcanalsostoretokens,pinnumbers,etc. TheSecureStoreServiceapplicationworksbyaschemebeingdefinedprovidingauthentication information.Thentheuser-orgroup-levelpermissionstopasstothedatabasearemappedintheSecure Storeapplication.TheSecureStoreServiceallowsconnectionsusingthefederation,delegation,or impersonationlevel.IncasesofBusinessConnectivityServices,themappedcredentialsarepassedfrom theSecureStoretothedatasource.1
ConfiguringtheSecureStoreService Inthissectionandtheonesthatfollow,wewillgothroughtheprocedureofconfiguringtheSecureStore Service,whileexplainingtheindividualstepsandconfigurationoptions.Thefirststepistoensurethat theSecureStoreServiceisstarted:
1
1.
NavigatetoCentralAdministration➤ManageServiceonServer(Figure9-39).
2.
LocatetheservicecalledSecureStoreService.
3.
IftheSecureStoreServiceisnotstarted,thenstartit.
Looselybasedonhttp://lightningtools.com/blog/archive/2010/01/20/bcs-secure-store-services.aspx.
335
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-39.Servicesoverview WiththeSecureStoreServicestarted,itisnowpossibletoprovisionaSecureStoreService applicationasfollows:
336
1.
NavigatetoCentralAdministration➤ManageServiceApplication(Figure940).
2.
ClicktheNewbuttonontheribbon.
3.
ClickSecureStoreServicetoopenthedialogforcreatingthenewservice application.
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-40.ProvisioningtheSecureStoreServiceapplication TheCreateNewSecureStoreServiceApplicationdialog(Figure9-41)allowsadministratorsto specifyadatabasewherethecredentialsarestored.Thecredentialsareencryptedandaccessiblebythe SecureStoreServiceapplication.TocreatetheSecureStoreService,dothefollowing: 1.
Enterauniqueservicename.
2.
SpecifythedatabaseinstancenamewheretheSecureStoredatabasewillbe created.AlsospecifyanamefortheSecureStoredatabase.
3.
Chooseorcreateanapplicationpoolidentity,whichtheSecureStoreService applicationwillrununder.Itissuggestedtouseauniqueaccountforthis particularserviceapplicationforsecurityreasons.
4.
ClickOK.TheSecureStoreServiceapplicationandproxyshouldnowbe created.
337
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-41.ProvisioningtheSecureStoreServiceapplication WiththenewSecureStoreServiceapplicationcreated,itmustbeconfiguredwithapassphrase (Figure9-42)thatallowsittosecurelyencryptanddecryptthestoredcredentialsfromthedatabase.
338
1.
ClicktheSecureStoreServiceapplicationtobeginconfiguringit.
2.
IfitisthefirsttimetheSecureStoreServiceapplicationisbeingconfigured,a promptwillappear,askingforanewkeytobegenerated.ClickGenerateNew Keyontheribbon.
3.
Enterapassphrase,andclickOK.
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-42.SecureStoreServicekeygeneration
CreatingaSecureStoreServiceApplicationforImpersonating FortheSecureStoreServicetobeabletoapplythestoredcredentials,anapplicationmustbecreated thatusesthesecredentials.InSharePoint,thisiscalledaSecureStoreTargetApplication.Inessencethe impersonationofthesecurelystoredcredentialsisdonethroughthisapplication. 1.
GototheSecureStoreServiceapplication.
2.
ClickNewontheribbon,asshowninFigure9-43.ThisopenstheCreateNew SecureStoreTargetApplicationpage.
339
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-43.SecureStoreServiceapplicationoverview OntheCreateNewSecureStoreTargetApplicationpage,thetargetapplicationsettingsare specified.IntheexampleinFigure9-44,Groupischosenasthetargetapplicationtype.Thisallows memberstobedefinedwhoseaccountscanbeimpersonatedbyanotheraccount.Thisisthemostoften usedscenario.Otheroptionsincludeticketswithalimitedvalidlifetime.Onthetargetapplicationpage, dothefollowing:
340
1.
Enterauniquenamefortheapplication.Thisisnotchangeableafterthe applicationiscreated.
2.
Enterascreen-friendlynameandthee-mailaddressoftheadministrator, whichtypicallyisthecreator.
3.
ChoosetheTargetApplicationType,asdescribedbefore.
4.
SelectaTargetApplicationPageURL.AcustomURLcanbespecifiedtoallow mappingthisapplicationtoacustompageforuserstoassignaccounts,ifthere isanorganizationalneedfordoingso.
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-44.SecureStoreServiceapplicationcreation Toalterthefieldsandtherebyinformationusedbythisapplication,addadditionalfieldsthatthe userwillhavetofillouttoauthenticate.ThedefaultfieldsareWindowsusernameandpassword,as showninFigure9-45. 5.
Changefieldsasrequired.
6.
ClickNexttogotothecredentialsmappingpage.
341
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-45.SecureStoreServiceapplicationfieldmapping Ontheusermappingspage,theadministratorsandmembersareconfigured.Thesearethenthe membersandadministratorsofthetargetapplication.InFigure9-46,oneadministratorandtwousers areadded:SP_TestUser1andSP_TestUser2.Itwillbeexplainedhowtoaddspecificpermissionsto individualusersinthe“SettingPermissions”section.
342
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-46.SecureStoreServicecredentialsmapping FinallyclicktheOKbutton,andthetargetapplicationwillbecreated.SharePointnowautomatically navigatestotheSecureStoreServiceApplicationpagewherethetargetapplicationsareshown,asin Figure9-47.ItliststhetargetapplicationsbyID,theirtypes,anddisplayname.
343
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-47.SecureStoreServiceapplicationoverview
SettingtheApplicationImpersonationCredentials Now,theSecureStoreTargetApplicationisconfiguredandadministrators,members,andcredentials typehavebeendefined.Atthispoint,theapplicationimpersonationcredentialsareconfiguredforthe membersofthetargetapplication,asshowninFigure9-48.
344
1.
Provideoneormorecredentialowners,whicharethecredentialsthatmapto thecustomdefinedcredentials.
2.
EntertheWindowsusernameandpassword(s)tobeusedwhenimpersonating intheSecureStoreTargetApplication.
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-48.SettingtheSecureStoreTargetApplicationcredentials Witheverythingconfiguredrelatingtocredentials,theSecureStoreTargetApplicationcanbeused byBCSwhencreatingconnectionstoitsdatasources,asshowninFigure9-49. 1.
Selectaconnectiontype.
2.
Enterproperconnectiondetails(hereitisaSQLServerconnection,asshown inFigure9-49).
3.
Enterthetargetapplicationnameatthetimeofcreatingaconnectiontothe backend.Giventheexampledatausedinthesection“CreatinganExternal ContentType,”nowselecttheSecureStoreApplicationIDoptionandenter theapplicationname.
345
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-49.MapBCSconnectiontoSecureStoreApplicationID Asmentionedearlierinthisexample,twouserswereaddedasmembers.Theseuserscanbe delegatedindividualrights.Whentheseusersopenanexternallistbasedonthisexternalcontenttype, theyshouldbeabletoseethedatapulledfromtheBDCusingtheimpersonation.Forthistowork,the usersmustbemembersoftheBCSapplication,astheBCScheckspermissionsusingtheincominguser accountbeforedoingtheimpersonationandgettingthedatafromthebackend.Thismeansthatthe impersonationisnotforcommunicatingwiththeBCSapplicationitself,butforallowingBCStogetdata fromitsdatasource.Usersstillneedpermissionstoaccesstheexternalcontenttypeobjects.
SettingPermissions Basedonthedatasourcecreatedintheprevioussection,settingpermissionsonexternalcontenttype objectsisdonebydoingthefollowing:
346
1.
GoingtoCentralAdministrationsite➤Manageserviceapplications
2.
SelectingtheBCSserviceapplicationjustcreated
3.
Settingpermissionsontheexternalcontenttype,asshowninFigure9-50
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-50.Accessingexternalcontenttypepermissionssettings Inthiscase,theusersaregrantedEditandExecutepermissionsonthecustomersexternalcontent typeobject,asshowninFigure9-51.
347
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-51.Settingexternalcontenttypepermissions Atthispoint,theexternalcontenttypepermissionsarefullyconfiguredandcannowbeusedinBCS WebParts,externallists,etc.bypersonswiththeappropriatecredentials.
CreatingSecurityTrimmedCRUDOperationsonaSQL DatabaseUsingVisualStudio2010 Earlieritwasshownhowtocreateaflatfile.NETconnectorusingBusinessDataConnectivityDesigner inVisualStudio2010.Herewewillshowyouhowtopulldatafromanexternaldatabaseintoanexternal listandenableCreate,Read,Update,andDelete(CRUD)functionstotheexternallist.2Theexampleis basedonthesamecustomerdatausedearlier.
2
348
Looselybasedonhttp://www.facebook.com/note.php?note_id=338666619441.
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Thislistwillimplementsecuritytrimmingbyusingarightstablethatholdssecurityidentifiersfor eachrow.
ConnectingModeltoDataSource Tobeginwith,createanewBDCModelprojectandgiveitapropername.Hereitisnamed BdcCustomersModel.TomakeiteasytousethedataobtainedfromtheCustomersdatabase,thebest wayistoaddaLINQtoSQLmodel.LINQisnotthefastestimplementationmethodperformance-wise, soifperformanceiscritical,youmightprefertoimplementadedicateddataadaptorinstead. 1.
Selecttheprojectbyleft-clickingit.
2.
ClickAddNewItemontheprojectsmenutoopentheAddNewItemdialog.
3.
SelectDatatemplatesfromtheInstalledTemplatespanel.
4.
ChoosetheLINQtoSQLClassesprojecttypefromtheTemplatespanel.
5.
Givetheprojectapropername—hereitiscalled“Customer”—andthenclick Add.
6.
OpentheServerExplorer,andaddaconnectiontotheCustomersdatabase.
7.
DragCustomerstableanddropitontheCustomer.dbmldesignsurface.
Atthispoint,adesignerclassnamedCustomerDataContextisautomaticallyadded.Toallowa connectiontobecreatedusingacustomconnectionstring,anewclassshouldbeadded.Nametheclass CustomerDataContext.cs.Makethisclassapartialclass.Thenpasstheconnectionstringtothebaseclass throughtheconstructor,asinListing9-3. Listing9-3.DataContextforConnectingtoaDatabasewithaCustomConnectionString public partial class CustomerDataContext { private const string ConnectionString = @"Data Source=localhost\SQLEXPRESS;Initial Catalog=CustomersDatabase;Integrated Security=True;Pooling=False";
349
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
}
public CustomerDataContext() : base(ConnectionString, mappingSource) { OnCreated(); }
■NoteWemadetheconnectionstringaconstantinthecodeforexemplifyingit.Inaproductionenvironment,it shouldbeaddedtotheWeb.Configfileinencryptedformat.Whenusingyourowndatabase,theconnectionstring shouldbemodifiedtomatchyourdatabaseandcredentialrequirements.
MappingBDCModeltoDataSource Atthispoint,theBDCmodelshouldbemappedtothedatasource.Thisinvolvesmakinganumberof entitiesandspecifyingappropriatemethods.Thepurposeistocreatetheinterpretationlayerbetween thedatabaseandtheBDCmodel.Firstanentitywithanidentifierkeyneedstobecreated: 1.
Anentitynamed“Entity1”isautomaticallycreated.Deleteit.
2.
Createanewentity.Thiscanbedoneusing“DragandDrop”ontheEntity fromToolboxanddroppingitonthedesignsurface.
3.
Changethedefaultnameoftheentityto“Customer.”
4.
Createanewidentifiernamed,CustomerKey,ontheentity“Customer.”Thisis mosteasilydonebyright-clickingtheentityandselectingtheAddIdentifier option.Thisaddsanewidentifiertotheentity.
5.
Givetheidentifierthename“CustomerKey”.
Toaddfunctionality,anumberofmethodinstancesmustbeaddedtotheentity.Thisismosteasily donebyselectingtheentityandclickingthebuttonthatappearsintheMethodDetails panel.CreateaSpecificFindermethodontheentity.ThiswilladdtheReadItem,asshowninFigure9-52.
350
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-52.SpecificFindermethod AsshownintheMethodDetailspanel,theReadItemmethodhastwoparameters,namelyanIn parameter,whichtakestheidentifierkey,andaReturnparameter,whichisanobjectinstanceofthe identitytype.VS2010offerssomefunctionalityformakingiteasytocreatenewmethodsbycopyingtype descriptorsautomaticallywhenpossible.ThereforeitisagoodideatoconfigurethosefortheSpecific Findermethodbeforeaddingtheothermethods. Tocompletetheidentifierkeyconfiguration,thetypedescriptorforthereturnparameternamed CustomerKeyshouldbeadded. 1.
OpentheMethodDetailspanel.
2.
Choosethecommandfromthetypedescriptormenunamed CustomerKey.
3.
IntheBDCExplorer,addatypedescriptorbyright-clickingtheCustomerKey, asshowninFigure9-53,andchoosetheAddTypeDescriptoroption.Thiswill createanewtypedescriptor.
351
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-53.Addingtypedescriptors
352
4.
Renamethejust-createdtypedescriptorto“CustomerKey”,usingthe Propertiespanel.
5.
ChangetheIdentifierpropertytoCustomerKey,asinFigure9-54.Thisishow theBCSruntimeknowsthatthistypedescriptormapstotheCustomerKey identifier.
6.
ChangetheType NamepropertytomatchthetypefromtheLINQmodel.Inthis example,itisnotrequiredtochangeit.
7.
Repeatsteps1–6forallrequiredtypedescriptors.
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Figure9-54.Configuringtypedescriptors Whenalltypedescriptorsareaddedasinsteps1through7,thetypedescriptorsshowninFigure955shouldbevisible.ItisalwaysagoodideatocheckthespellingandType Namepropertiesatthispoint, asupdatingthemlateroncanbeapain.Refactoringdoesnotcurrentlysupportthis.
Figure9-55.Alltypedescriptorsconfigured
353
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Atthispoint,theothermethodsavailableneedtobecreatedthesameastheReadItem(Specific Finder)method.ThesearethemethodsthatsupporttheBDCoperationsthataretheCRUDoperations. Todothis,repeatthestepsinthissectionforeachofthefollowingmethods:ReadList,Create,Update, andDelete.AlsocountingtheReadItemmethod,atotaloffivemethodsshouldbedefinedfortheentity namedCustomer.Itis,however,mucheasiertocreatethelastfourmethods,asthetypedescriptorsof thereturnparametersareautomaticallydefinedthesamewayaswiththeReadItemmethod.TheBDC Designerautomaticallyappliestypedescriptorsdefinedintheothermethodsofanentityandcopies themtothenewlycreatedmethods. Withtherequiredtypedescriptorsinplaceforthemethods,theLOBsystem–qualifiedtypenameof thetypedescriptorCustomershouldbedefined.ThisisdonebyselectingtheCustomertypedescriptor intheBDCExplorerpanel.InthePropertiespanel,itsvalueshouldbechangedfromSystem.Stringto BdcCustomer.Customer, BdcModel1.Thisisnowtheunderlyingdatatypeofthedatastructurethatthe Customertypedescriptorreturns.
AddingCode-BehindtoAccessExternalDataSource ToimplementthelogicrequiredforperformingtheactualCRUDoperations,themethodbodyofthe methodsintheCustomerService.cscodefileshouldbechangedtomatchthecodeinListing9-4. Listing9-4.ImplementationofCRUDOperationsintheBDCMethodInstances public static Customer ReadItem(string customersKey) { CustomerDataContext context = new CustomerDataContext(); Customer cust = context.Customers.Single(c => c.CustomerKey == customersKey); return cust; } public static Customer Create(Customer newCustomer) { CustomerDataContext context = new CustomerDataContext(); context.Customers.InsertOnSubmit(newCustomer); context.SubmitChanges(); Customer cust= context.Customers.Single(c => c.CustomerKey ==newCustomer.CustomerKey); return cust; } public static void Delete(string customersKey) { CustomerDataContext context = new CustomerDataContext(); Customer cust = context.Customers.Single(c => c.CustomerKey == customersKey); context.Customers.DeleteOnSubmit(cust); context.SubmitChanges(); }
354
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
public static IEnumerable ReadList() { CustomerDataContext context = new CustomerDataContext(); IEnumerable custList = context.Customers; return custList; } public static void Update(Customer customer) { CustomerDataContext context = new CustomerDataContext(); Customer cust = context.Customers.Single(c => c.CustomerKey == customer.CustomerKey); cust.CustomerKey = customer.CustomerKey; cust.CompanyName = customer.CompanyName; cust.ContactPerson = customer.ContactPerson; cust.EmailAddress = customer.EmailAddress; cust.PhoneNumber = customer.PhoneNumber; context.SubmitChanges();
}
AddingSecurityTrimmingto.NETConnectors Beingabletodosecuritytrimmingisimportantinmanycorporations.Thiscanbeachallenge, especiallyiftheLOBdatasystemusescustomsecuritydescriptors.Extendingthedatabase.NET connectordescribedintheprevioussectionwillshowhowthiscanbeaccomplished.Herewewill assumeoneparticularformofsecuritydescriptor,butinrealityitcouldbeinanyformatthatsupports mappingbetweentheusercontextandthedescriptor. Firstarightstablemustbeaddedtothemodeltosupportsecuritytrimming.Herewehavecreateda CustomerAccessRightstablecontainingtheSecurityDescriptor,Rights,andCustomerKey.The SecurityDescriptorisabinaryuniquevalueforaparticularuser.Rightswillcontainasimplenumeric schemarepresentinguserrightstoaparticularrow.Italsocontainscreationrights. •
ReadAllowed
•
Read/Write/Update/DeleteAllowed
NoEntrymeanstheuserhasnorightstothisdatarowrepresentedbytheCustomerKey.Ina productionenvironment,adifferentandmorefine-grainedaccessrightsmappingmightbedesired,but thisshouldgiveagoodideaabouthowtoimplementsecuritytrimmingthatallowsmultipleuserswith differentaccesstothesamedatarows.Giventhecustomertablecontainsthisinformation,wecan createaCustomerAccessRightstablecontainingthesecuritymappings.TheSecurityDescriptorshould bebasedonthesamemethodusedbythemodeltotrimsecurity.Inthisexample,itisthe GetSecurityDescriptor()methoddisplayedinTables9-1and9-2.
355
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
Table9-1.CustomersTable
CustomerKey
CompanyName
PhoneNumber
EmailAddress
ContactPerson
2Microsoft
555-xxxxxx1 @ mail microsoft.comJohn Doe
5SurfRay
555-xxxxxx2 @ mail surfray.comJohn
Doe
555-xxxxxx3 @ mail apple.comJohn
Doe
555-xxxxxx4 @ mail ibm.comJohn
Doe
6Apple
7IBM
Table9-2.CustomerAccessRightsTable
Rights
CustomerKey
SecurityDescriptor
12
22
25
26
27
ToaddtheCustomerAccessRightstabletothemodel,addanewLINQtoSQLClassesitemtothe projectandnameitCustomerAccessRights.IntheServerExplorer,addaconnectiontotheCustomers databaseifitdoesnotalreadyexist.ThendragtheCustomerAccessRightstable,anddropitonthe CustomerAccessRights.dbmldesignsurface. NexttherequiredmethodforcomputingtheSecurityDescriptorisaddedasinListing9-5.This methodcanbeaddedtotheCustomerService.csclassthatalsocontainstheCustomermethods.This methodcomputesasecuritydescriptorintheformofabytearray. Listing9-5.ImplementationofMethodforGettingaSecurityDescriptor static Byte[] GetSecurityDescriptor(string domain, string username) { NTAccount acc = new NTAccount(domain, username); SecurityIdentifier sid = (SecurityIdentifier)acc.Translate(typeof(SecurityIdentifier)); CommonSecurityDescriptor sd = new CommonSecurityDescriptor(false, false, ControlFlags.None, sid, null, null, null); sd.SetDiscretionaryAclProtection(true, false);
356
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
//Deny access to everyone SecurityIdentifier everyone = new SecurityIdentifier(WellKnownSidType.WorldSid, null); sd.DiscretionaryAcl.RemoveAccess( AccessControlType.Allow, everyone, unchecked((int)0xffffffffL), InheritanceFlags.None, PropagationFlags.None); //Grant full access to specified user sd.DiscretionaryAcl.AddAccess( AccessControlType.Allow, sid, unchecked((int)0xffffffffL), InheritanceFlags.None, PropagationFlags.None); byte[] secDes = new Byte[sd.BinaryLength]; sd.GetBinaryForm(secDes, 0); return secDes; } HavingtheRightstableandthesecuritydescriptormethodinplace,thenextstepistomodifythe Customersmethodsforupdating,reading,etc.,suchthattheyaretrimmedbasedonthesecurity descriptor.Here(Listing9-6)theReadermethodsareupdatedtoapplysecuritytrimmingduringsearch. Listing9-6.AddingSecurityTrimmingtotheBDCMethodInstances public static IEnumerable ReadList() { CustomerDataContext context = new CustomerDataContext(); CustomerAccessRightsDataContext accessContext = new CustomerAccessRightsDataContext(); List tempCustList = new List(); foreach(Customer customer in context.Customers) { CustomerAccessRight custAccess = accessContext.CustomerAccessRights.SingleOrDefault( c => c.CustomerKey == customer.CustomerKey && c.SecurityDescriptor.ToArray() == GetSecurityDescriptor(Environment.UserDomainName,Environment.UserName));
}
if(custAccess.Rights > 0) tempCustList.Add(customer);
}
IEnumerable custList = tempCustList; return custList;
public static Customer ReadItem(string customersKey) { CustomerDataContext context = new CustomerDataContext(); Customer cust = context.Customers.Single(c => c.CustomerKey == customersKey); CustomerAccessRightsDataContext accessContext = new CustomerAccessRightsDataContext();
357
CHAPTER9■BUSINESSCONNECTIVITYSERVICES
CustomerAccessRight custAccess = accessContext.CustomerAccessRights.SingleOrDefault( c => c.CustomerKey == cust.CustomerKey && c.SecurityDescriptor.ToArray() == GetSecurityDescriptor(Environment.UserDomainName, Environment.UserName));
}
if (custAccess.Rights > 0) return cust; else return null;
Usingthismethodologyasabaseline,itispossibletocreatesimplesecuritytrimming.Whendoing securitytrimming,performanceofthetrimmingmechanismisrelevant.Differentcachingmechanics canbeappliedwithsuccesstoincreaseperformance.Alsoothersecuritydescriptorimplementations thatbetterfitspecificrequirementscanbeimplementedusingthisexampleasatemplateforhowto approachthetopic.Microsoftdoesprovidesomeresourcesonthistopic.3
Summary ThegoalofthischapterwastoprovideinsightintothenewBusinessConnectivityServicesframework offeredinSharePoint2010.BCSisinitselfanextensiveframeworkoutofthebox,spanningnotonly SharePointbutalsoOutlook,InfoPath,andotherOfficeapplications. OneofthepowerfulcapabilitiesofBCSisitsrelativeeaseincreatingcomplexsecurity configurationsusingtheSecureStoreServiceorprogramminginVisualStudio2010.Thiswasmuch moredifficulttoaccomplishwiththeBusinessDataCataloginSharePoint2007. Hands-onexamplesofhowtocreateandintegrateBCSintheorganizationshouldencouragethe readertodofurtherexplorationofthecapabilities.Finallyanexampleofhoweasyitcanbetocodea .NETAssemblyConnectorforexposinganexternalcontenttypefromadatasourcenotsupportedoutof theboxshouldalsoencourageITprofessionalsintheorganizationtoviewBCSasanopportunityas opposedtothemuchmoredifficultandexpensivesolutionsofyesteryear’sSharePoint2007BDC.
3
358
http://msdn.microsoft.com/en-us/library/aa374815%28v=vs.85%29.aspx
C H A P T E R 10
■■■
Relevancy and Reporting Aftercompletingthischapter,youwillbeableto •
Understandthebasicsofsearchrankingandrelevancy
•
Beabletomakeadjustmentstoaffectrelevancy
•
ViewandunderstandSharePointsearchreporting
•
UsebasicbestpracticestoutilizeSharePointSearchreportstoimproverelevancy
•
UtilizethethesaurusinSharePointtoaddsynonymstosearchterms
•
TunesearchwithavarietyoftechniquesavailableinSharePoint2010
•
CreatecustomrankingmodelsanddeploythemwithPowerShell
Relevancyandreportingareessentialconceptstoensurethesuccessofenterprisesearch. Understandinghowtoaffectrelevancyandreactonreportingcanhelpanadministratormakesearch improvementsthatmayhaveseriousimpactontheadoptionofSharePoint.Forallthebellsandwhistles onanenterprisesearchengine,thetruetestofsearchqualityisthatforanygivenquery,thedesired documentorinformationisreturnedatthetopoftheresultspage.Thisiseasiersaidthandone,and manysearchusersarefrustratedbynotfindingwhattheyarelookingfor.Thisgivesrisetothedemand formoreandmoresearchexpansionorfilteringfunctionality.Ifarelevancymodelcouldtrulyreturn whatusersarelookingforateachandeverysearch,thingslikerefinersandexpandedquerysyntax wouldbeunnecessary. Unfortunately,norelevancyalgorithmcanachievethegoalofalwaysreturningtheexactdocument. Tocompoundthis,thereareavarietyofwaysthattermscanbeusedtofindthesameordifferent informationdependingonthesubjectivepositionofthesearcher.Therefore,understandingandbeing abletomodifythesearchresultsarekeytoolsforreactingtouserdemandsandimprovingsearch. Anotherimportantfactorthatinfluencessearchenginesuccessisthequalityoftheactualcontent thatisbeingindexed.Administratorscanmakegreatimprovementsinthequalityofsearchbysimply trimmingandoptimizingthecontentthatisbeingindexedandsearched. AkeenSharePointadministratorshouldhaveaclearunderstandingofhowwellsearchis functioningandbeabletoimproveitbasedonaninteractiveapproachbyanalyzingandmodifyingthe contenttogetthebestexperiencepossible.Todothis,Microsofthasintroducedsomekeyfeaturesin SharePoint2010.Thosefeaturesincludetheabilitytoaffectthesearchbyaddingpropertiesto documents,managingthosepropertieswiththeManagedMetadataservice,addingsynonymstomatch likeconceptsandexpandqueries,andanalyzingthesuccessesandfailuresofthesearchenginewith searchreporting.
359
CHAPTER10■RELEVANCYANDREPORTING
Relevancyalgorithmsinsearchenginesareakintothesecretformulainsoftdrinks.Mostsearch vendorswillnotrevealtheirrankingrules,butmostarebasedonbasicconceptsoronapublicly availableandwell-knownformulasuchasTermFrequency–InverseDocumentFrequency(TF–IDF)or themoreadvancedBM25. Inaidofthequestforgreatresults,Microsofthasrevealedmuchaboutitssearchrankingmethods. NotonlyhavetheyacknowledgedthattheyuseavariationofStephenRobertson’sBM25asthebaseof SharePoint’srankingalgorithm,buttheyhavealsoexposedamethodofmodifyingorchangingthat rankingalgorithmtomatchtheparticularneedsofanorganization. First,however,understandingthegeneralmechanismofsearchrankinginordertoaffectthequality ofresultsiscertainlyuseful.Therefore,thischapterwilldiscussthebasicconceptsthatwillmakea documentrisetothetopinaSharePointresultsetorfalltothebottom.Itavoidsthemathematics behindthealgorithms,asthatisasubjectforadifferentbook.Itwilldiscussreporting,howtoseethe successesandfailuresofthesearchengine,andtechniquesthatcanbeappliedtomodifythewaythe searchenginebehavesandeventuallyimprovethesearchexperience.Additionally,itwillshowhowto createyourownrankingschemeormodifytheexistingoneandapplyitforuseindifferentcasesin SharePoint.
RelevancyAlgorithms Relevancyalgorithmscanbecomplicatedastherearemanyelementsandconsiderationstomakewhen attemptingtodetermineexactlywhichdocumentisbestmatchedtoagiventerm. Mostalgorithms,includingGoogle’sfamousPageRank,areavailablefreetodownloadandinspect fromtheInternet.However,developers,whencreatingarankingalgorithm,willalmostalwaysaddtheir ownmodificationstowhateverbasetheyareusingtocreateauniqueandfunctionalrankingalgorithm. Google’spresentrankingmechanismiscertainlyexponentiallymorecomplexnowthanitwaswhenits foundersfirstinventeditandpublisheditwhileatStanford.Whateverthemathbehindtheranking algorithm,experienceandtestingcanconfirmthattherankinginSharePoint2010ishighlyeffectivefor enterprisecontentandbringsrelevantdocumentstothetopofthesearchresultspage. Asmentioned,SharePoint’sdefaultalgorithmispurportedlybasedonanalgorithmcalledBM25. ThereissomereferencetoneuralnetworksinliteratureontheInternetaboutSharePoint’sranking model.ThisissupportedbyapatentcreatedbyMicrosoft’sengineeringteam,whichreceivedUSPatent No.7,840,569B2inNovember2010.Seealinktothispatentinthe“FurtherReading”section.Theterm neuralnetworkmeansthealgorithmisdesignedtolearnfromuserbehavior,somethingthat SharePoint’salgorithmcertainlydoes.However,thereisnowaytoactuallyknowthatthisranking algorithmisthecoreofSharePoint’s. Tosimplifythings,however,wecanthinkofanenterprisesearchrankingalgorithmasbasicallya formulathatranksdocumentsbasedonthefrequencyofquerytermsappearinginthematching documentsaswellasconsideringoverallcomparativedocumentvalue.SharePointappliesvarious rankingconsiderationsbasedondifferentfieldsofwhichadocumentmaybecomprised.ForSharePoint specifically,thesefieldsareextendedtopropertiesandotherdataassociatedwiththedocuments.Soa singledocumentbecomesacollectionofdifferentlyweightedrankingconsiderations.Theseranking considerationsinclude,butmaynotbelimitedto,thefollowingareas: •
360
Keywordmatches •
Body
•
Title
•
Authorproperties
CHAPTER10■RELEVANCYANDREPORTING
•
•
•
•
Otherpropertytags
•
Intersiteanchor
•
URL
Proximity •
Querysegmentation
•
Querytermassociation
Staticdocumentrelationships •
Clickdistance
•
URLdepth
•
Filetype
•
Length
•
Language
User-drivenweighting •
Clickpopularity
•
Skips
ThefirststepSharePointsearchtakeswhenreceivingaqueryistopassthequerythroughaword breakertoensurethequerytermsmatchtermsthatmaybestoredintheindex.SharePointhasaspecific wordbreakerforeachlanguagethatcantellwheretobreakcompoundtermsandtokenizethem.This wordbreakingortokenizationhappensduringboththecrawlingoftermsandthequeryingoftermsto ensurethatstreamsofindexedtextarebrokenintosimpleitems.Theneutralordefaultwordbreakerin SharePointbreakstermsonlyforwhitespaceorfillercharacterslikehyphensandslashes.Other languagewordbreakersdoamorecomplexanalysisbasedonthegrammarofthegivenlanguage.Some languageshavenowhitespacebetweenterms,sotheyrequireaspecialunderstandingofthecharacters. Next,thebrokenortokenizedtermsaresenttoastemmertoreducethemtotheirrootform.These termsarefinallycheckedagainsttermsintheindex,andaresultsetisassembledbasedonallthe documentsthatcontainmatchingtermsfromtheentirecorpus.Theresultsetisthenprioritizedwith theitemwiththehighestrankingvalueatthetopofthefirstpageandsubsequentmatcheslistedin descendingorder. SharePointsearchapplieswhatitcallsstaticanddynamicranking.Staticrankingisappliedto documentsatcrawltimeandrelatestothestaticelementsofthedocuments,suchasdistancefrom authoritativepages,language,filetypelength,etc.Dynamicrankingisappliedatquerytimeandapplies valueforthespecifictermsqueried,specificallykeywordmatches,andproximityweighting. Inadditiontoorinsupportoftheseconditions,thefactorsdiscussedinthefollowingsectionsare consideredinranking,butnotnecessarilyintheordertheyarepresentedhere.
KeywordMatches Thetotalnumberoftimesthetermsappearonthedocumentis,ofcourse,importantforranking.The mostobviouselementtorankadocumentasbeingamatchforagiventermistherawnumberoftimes
361
CHAPTER10■RELEVANCYANDREPORTING
thatwordismentionedinthedocument.Documentsthatmentionaspecifictopicnumeroustimesare likelymorerelevantforthegiventopic.Similarlykeywordsthatappearfrequentlyinacorpuswilllikely havealoweroverallrelevancyvaluethanthosethatappearrelativelyfewtimesinthecorpus.For example,awordlikethenameofthecompanywilllikelyappearonalmosteverydocument.Theterm frequency–inversedocumentfrequencyrankingalgorithmthattheSharePointsearchrankingrulesare baseduponwilllowertheoverallvalueofthattermandboosttermsthatappearonlyinfewdocuments, likeproductcodesorprojectnumbers.
TermsintheBodyText Probablythemostobviousplacetomatchthetermsisinthebodyofthedocuments.Thisiswherethe bulkofthetextwillbefoundandthekindofrankingthatmostpeopleunderstandduetothewaythat globalsearchenginestreatwebpages.Also,theuseofmetadatatoidentifydocumentsisrelatively limitedomuchofdocuments’thematicvalueliesinthebodytext.Thisisalso,unfortunately,theplace whereitismostdifficulttoimprovecontenttoaffectranking.Havinggoodheadingsandusingaccepted terminologyaretwowaystoinfluencerankinginbodytext.
TermsinTitles Titlesareimportantindicatorsofadocument’spurpose.Althoughtherearemanypoorlytitled documents,ifatermorphraseappearsinthedocument’stitle,thereisagoodchancethatthe documentisaboutthattitle.Thechanceissogood,infact,thattitlesareusuallygiventhehighest rankingvalues.Goodtitlingisgettingmoreandmoreattentionintheenterprise,sothisrankingvalueis increasinglyeffective.Mostthingsinlifearegiventitlesbypeople,includingpeoplethemselves.And thesetitles,althoughsometimesmisleading,tellussomethingessentialaboutthethingthatistitled. Therefore,improvingtitlesondocumentsinaninformationhandlingsystemsuchasSharePointisone oftheeasiestandmostusefulwaystoinfluenceenterprisesearchranking.
TermsinAuthorPropertiesandOtherPropertyTags MetadatainSharePoint2010,oftenreferredtoasproperties,isalsoimportantforranking.Properly appliedmetadatagivesdocumentspurposefulassociationstotermsandthemesthatmaynotbe prevalentinthedocument.Oneofthemostcommonpropertytagsandmostessentialtocollaboration inSharePointistheauthorproperty.Thispropertyisoftenappliedonanumberofdifferentdocument typesaswellaslists,libraries,andwebcontent.Itisalsoassociatedwithdocumentsthatareadded toSharePoint,sothereisahighprobabilitythatadocumentwillhavesomesortofauthorassociated withit. SharePoint2010hasthenewabilitytoincludeassociatedmetadatawithdocumentdatainthe index,improvingsearchperformanceformetadatalookupandimprovingtherankingofdocuments basedonthatmetadata.Italsohasthecapabilityofaddinginferredmetadatabasedontermsorfields fromwithinthebodyofthedocument.
TermsinAnchorText SharePoint2010addsrankingvaluetothedocumentsbasedonthetextinreferringlinks.Forsiteswhere usersarepublishingblogs,wikis,ortextcontentoncontentmanagedpages,thisreferringtext considerationcanbeveryuseful.Whenpeopleareplacingalinktoanotherdocument,itisnaturalto
362
CHAPTER10■RELEVANCYANDREPORTING
describewhatthatdocumentisaboutonthelink,andusuallyashortanddescriptivetextisused. Consideringthisintherankingcanhaveapositiveinfluencebutonlywhenitisreasonabletohavea descriptivelink.
Proximity Proximityreferstotherelativeclosenessofthequerytermsfoundinadocument.However,thereisno indicationthatclosenessofquerytermsthatarenotinaphrasehasanyinfluenceinSharePointsearch. Testsindicatethatadocumentwithtwotermsthataresimplyneareachotherwouldrankevenlywith onethathasthetwotermsateitherendofthedocument.ForSharePoint,proximityisbasedonhow termsaregroupedintosegmentsoriftheyarefoundinphrases.
QuerySegmentation Inmulti-termqueriesanddocumentmatches,thereareoftennumeroussetsoftermsthatmaymatch theterms.Someofthosesetsmaymatchthequeriesbetter,basedonhowthetermsrelate.Forexample, thequeryterms“greatsearchengine”mayreturnadocumentwiththephrase“greatenterprisesearch engine”and“greatsearchforausedengine”.Bothofthesedocumentshavematchesforalltheterms. However,howthesetermsarebrokenintogroupscandictateifthedocumentaboutsearchenginesis rankedabovethedocumentaboutgreatsearch.SharePointtakessegmentationrulesintoconsideration whenranking,butsuchconsiderationsgenerallyofferlittleinfluence,andothervalueslikefrequency willoftenoverridesuchnuances.
QueryTermAssociation Whenmultipletermsarequeriedinaphrase,termsthatappeartogetherinthephrasearenaturally rankedhighest,andthosethatareclosetogetheraregivenhigherrankingthantermsthatappearfarther apartinadocument.Ifonesearchesfor“MicrosoftExchange”,onewouldexpectadocumentwiththe phraseinittoappearaboveadocumentwiththesentence“Microsoft’sfilingstotheUSSecuritiesand ExchangeCommission.”However,thereisnoevidencethatSharePointdiscriminatesbasedonword locationorclosenessoutsideofphrasematches.
StaticDocumentRelationships Staticdocumentrelationshiprankingconsiderationsarethosemadeatcrawltime.Thecrawlerbreaks thetextitstreamsintothedatabaseintowhatitfindsasuniquetermsandthenappliesvaluesforthe documentsinwhichthosetermswerefound,basedonafewfactorssuchasplacementinthesite, language,filetype,anddistancefromauthoritativepages.
ClickDistanceandURLDepth Theclickdistanceisthemeasureofthenumberofclicksittakestogetfromonedocumenttoanother. Therearetwoelementstoconsiderforclickdistance:clickdistancefromwhatissetasorconsideredan authoritativepage,anddepthofthedocumentinthesiteorURLdepth.SharePointsitecollectionshave apyramidstructurewithonemainentrypagethatleadsofftosites,subsites,lists,libraries,pages,and documents.Thedistancebetweentheseistakenintoconsiderationwhenapplyingrankingvalues.Top-
363
CHAPTER10■RELEVANCYANDREPORTING
levelcontentwillgethigherranking,andlower-levelcontentwithadeeperclickdepthwillgetalower ranking,becausethetop-levelsitesarenaturallyconsideredmoreimportantandeasiertoaccessby users.Thedistanceadocumentisfromanauthoritativepagealsocounts.Sotherankingcanbe influencedbysettingauthoritativepagesclosetoimportantcontent.Seethesectionontuningsearch.
FileType CertainfiletypesaregivenhigherstaticrankingonSharePointthanothers.Accordingtothelatest availableinformation,thedocumentrankingorderiswebpages,PowerPointpresentations,Word documents,XMLfiles,Excelspreadsheets,plaintextfiles,andfinallylistitems.
Length Longdocumentshavemoretermsandwouldgenerallyberankedhigherthanshortdocumentsiflength werenottakenintoconsideration.Therefore,therankingisadjustedtoconsiderthedensityandrelative valueofthequerytermtotheentiredocument.
Language Forsiteswithdocumentsinmanylanguages,documentsinthelanguageofthesearchuser’sinterface shouldbegivenrankingpriorityoverotherlanguages.Insomecases,documentscontaintermsinmore thanonelanguageoraremostlyinonelanguagebuthaveamatchingtermfromanotherlanguage.In thiscase,documentsaregivenastaticrankatcrawltimeforthelanguageSharePointthinksismost likelythemainlanguageofthedocument.Additionalrankingvalueisgivenatquerytimeoncetheuser’s interfacelanguageisdetermined.
User-DrivenWeighting NewtoSharePoint2010’srankingistheinclusionofsocialelements.Thisincludestheadjustmentof staticrankvaluesbasedonwhetheradocumentwasselectedfrequentlyfromthesearchresultlist.
ClickPopularity AnadditionalrelevancymechanisminSharePoint2010istheweightingofresultsbasedontheirclick popularityintheresultset.Thelinksthatarechosenforaspecificqueryinasearchresultlistaddvalue tothatspecificdocumentforthatspecificsearchterm.Click-throughrelevancyweightingcanhelpthe organizationtoleveragetheexpertiseofusersbyallowingthemtochoosespecificdocumentsfroma resultlistandpromotethem.Thisisdonewithoutanyaddedinteractionorspecificinteractionbythe endusers.Theirwell-meaninginformationdiscoveryhelpstheentireorganization.
364
CHAPTER10■RELEVANCYANDREPORTING
■NoteThemathematicsbehindtheBM25Frelevancyalgorithm,whichisthebaseofSharePoint’sdefault rankingalgorithm,isexplainedathttp://en.wikipedia.org/wiki/Okapi_BM25.ThankstoMarkStone, technicalproductmanageratMicrosoft,forhishelpwithSharePoint’srankingalgorithm.
TheCorpus Understandingthecorpuscanbeakeyelementtounderstandinghowtomonitorandimprovesearch. ThetermcorpusisLatinforbodyandisoftenusedtorefertotheentiresetofdocumentsthatan organizationhas.Thenatureofeveryorganization’scorpusisunique.Notwoorganizationswillhave exactlythesamecontentorevenstructureofthatcontent.Everyorganizationwillalsohaveitsownset ofacceptedterminologyandprivatecorporatelanguage.Thismakesitverydifficulttofindasearch engine,whichisbasicallyatextanalysistoolthatfollowsaprescribedsetofrules,tomakesenseofand returnthebestdocumentsforanygivenquery.Withthatinmind,thequalityofSharePointsearchin mostcasesisquiteimpressive. Whenwelookataverylargedocumentset,weseeasetofterms.Thissetmaybeinoneormore languages,becomprisedofmillionsorhundredsofmillionsofdocuments,andrepresentthousandsof concepts.Thevalueandfrequencyoftheseconceptswillnaturallyvaryfromorganizationto organization.Forexample,areligiousorganizationwillhaveadrasticallydifferentsetoftermsandkey conceptsthananenergycompany,andagovernmentbodywillhavedifferenttermsthanaprivate company. Aswithanylargebodyofwords,everyorganization’scorpuswillhavemanycommonterms.There willbealargesetoftermsthatareextremelycommontothelanguagetheyarewrittenin.Thenthere willbeacertaingroupoftermsthatarenotindividuallyuniquetothatorganizationbuttogether representthekeythemesthatareimportanttothatorganization.Onthefarendofthetermset,there areraretermsthatappearonlyveryincidentallyinthecorpusandmaynotrepresentanyconceptcore totheimportantthemesoftheorganization.Aswebegintoanalyzealargecorpus,weimmediatelyfind manycommontermssuchas(inEnglish)“and”,“or”,“this”,“that”,etc.Whenwehaveasingle document,manyofthetermsinitarenewtothecollectionoftermsthesearchenginefinds.Butasthe numberofdocumentsincreases,thechanceofanewtermappearingdiminishes.Thisexperienceis explainedbyHeaps’law(http://en.wikipedia.org/wiki/Heaps'_law).SeeFigure10-1.
365
1
CHAPTER10■RELEVANCYANDREPORTING
Figure10-1.Heaps’lawshowsthediminishingdiscoveryofnewtermsasdocument#increases. Whatittellsusassearchadministratorsisthatthemostcommontermsarenotthatinterestingto search.Thesearegrammaticalorextremelycommonterms.Probably80%ofthetermsusedinthisbook donotdirectlyrelatetothekeytopicscoveredinthebook,butratherarehelpersusedtoexplain potentiallycomplicatedconcepts.Ontheothersideofthegrapharetermsthatoccuronlyveryrarely andperhapsrandomly.Thesecanoftenbetechnicalterms,names,andspellingmistakes.Forthemost commonterms,weneedamechanismtoignoretheseterms.Inthecasethattheyaresearchedfor,we donotwanttohavearankingwarbasedontheterm“the”.Onthe“rare”side,wecaneitherforgetabout theseoddtermsorusetoolssuchassynonymstobringthesetermsintothecoresetoftheme descriptiveterms. Therealgoalistoincreasetheoccurrenceoftermsthathavemeaninginanorganizationandapply themtoappropriatecontent—thatis,bytaggingandtheadditionofproperties.Identifyingtheseterms andthethemestheyexpressandthenmakingsuretheyareassociatedwiththebestinformationabout themwillhelpsearchmuchmorethanthemostcomplicatedfeaturesofasearchengine.
SearchReporting WhenitcomestoimprovingusabilityinSharePoint2010,reportingiscertainlyanessentialtool.Thisis especiallytrueforsearchinSharePoint.Manyadministratorsconsidersearcha“blackbox”that,when functional,willoperateonitsownandproduceresultsinsomemysteriousandwonderfulmanner.The truthisthatsearchenginesarejustcomputerprogramsthatfollowasetofrules.Manyoftheseruleswe havealreadyseenintheprevioussectionandfoundtobeinsufficientatreturningthebestcontentfor eachandeveryquery. ThereforeSharePoint2010hassomegreatbuilt-inreportingtechnologytoallowsearchandfarm administratorstomonitoroverallperformanceaswellasallowingsitecollectionadministratorsto monitorindividualsitesearchsuccessandmakemodificationstothesearchbehavioraswellasthe contentbasedonthosereports.
366
CHAPTER10■RELEVANCYANDREPORTING
ReportingisakeyfeatureinSharePoint2010thatallowsadministratorstoseestatistical informationonthebehavioroftheusersandtheirinteractionwiththesearchengine.Thereporting mechanismcanidentifykeyquerytermsthatarecausingfrustrationforusersaswellasareasofsearch thatarenotworkingoptimally.TherearetwolevelsofreportingtoadministratorsinSharePoint,the farmlevelandthesitecollectionlevel.Theselevelsaresettoallowadministratorswithdifferentlevelsof focusintheorganizationtogetthereportsthatareusefulfortheirparticularjobfunction.Farm administrators,whoareresponsibleforthemanagementoftheSharePointfarmanditscore functionality,canseereportsthatwillhelpthemmaintainaworkingsearchengineandimprove crawlingandindexquality.Thesitecollectionadministratorcanseereportsforhisorhersitecollection andallitssitesandsubsites.Thesereportshelpthesitecollectionadministratoroptimizethesearch experienceforhisorherendusersontheirownlevel.
FarmLevelReports GeneralsearchreportingcanbefoundintheSearchserviceapplicationinCentralAdministrationand includesTopQueriesandNoResultqueries.Thepointofthisreportingistohelpsearchorfarm administratorslearnaboutthegeneralsuccessandperformanceofthesearchengine.Contentcanbe targetedforcrawling,crawlingerrorscanbeaddressed,authoritativepagesset,andunwantedresults removedbasedoninformationfromthesereports. Thisfarm-levelreportingcanhelpusidentifytheseoverallsearchperformanceissuesand potentiallymakeadjustmentstothesearchengineatthesearchservicetocompensateforproblems.To accessthefarm-levelsearchreportinginSharePoint2010,followthesesteps: 1.
OpenCentralAdministrationonyourSharePointfarm.
2.
ClickManageServiceApplications.
3.
NavigatetotheSearchserviceapplication.
4.
OntheleftmenuunderReports,therearetwotypesofreports,Administrative ReportsandWebAnalyticsReports.ChooseWebAnalyticsReports.
Inthebasereport,wecanseethetotalnumberofsearchqueriesandtheaveragenumberofsearch queriesperday.Thiscanhelptheadministratormanageloadandmonitorsearchforperformance.If thisnumberisveryhigh,theadministratorshouldconsideraddingaqueryserverafterinvestigatingthe administrativereports(seeChapter2).Ifthisnumberisunusuallylow,theadministratorshould investigatewhyusersarenotsearchingandconfirmthatthesearchmechanismisworkingforallusers. Sometimespoorsitesettingcanrestrictaccesstosearchorcauseotherproblemsthatmakesearchnonfunctionalforendusers,andtheywon’tevencomplain. Onthetopoftheleft-handnavigation,wecannavigatetotheNumberofQueriesreport(Figure102).Thiswillgiveamoredetailedviewofthenumberofqueriesovertimeinagraph(Figure10-3)andthe exactnumbersforeachdate(Figure10-4).
367
CHAPTER10■RELEVANCYANDREPORTING
Figure10-2.ThesearchreportspagemenuintheSearchserviceapplication
Figure10-3.NumberofQueriespage
368
CHAPTER10■RELEVANCYANDREPORTING
Figure10-4.NoResultsQueriesreport
■NoteThefarm-levelsearchreportingshowsthesearchusagestatisticsfortheentirefarm.Thisisimportantfor farmadministratorstogetanoverallviewofthesearchtrendsandperformanceofthefarm.Formoredetailed results,sitecollectionreportscanbeseenateachsitecollection.However,thesereportswillcoverdataonlyfor theindividualsitecollection.
SiteCollectionReports Atthesitecollectionlevel,thereismoredetailedreportingthatwillhelpthesitecollection administratorstoidentifyareaswherecontentandmetadatacanbeimprovedtohelpsearchaswellas addorimprovebestbets.Sitecollectionreportsshowthedataonlyfortheindividualsitecollection.An organizationwithmanysitecollectionswillneedtoanalyzethereportsatdifferentcollections. Tounderstandthevalueofthereports,itisusefultounderstandthebehaviorsofsearchusers.The basicmechanismofsearchinginSharePointissimilartoallsearchengines.Auserentersaqueryintoa searchbox,eitheronasearchpageoronasearchfieldonanypageinaSharePointsite.Thisqueryof oneormanytermsispassedtothesearchengine,andalistofmatchinghitsisdisplayedinanorderthe searchenginedeterminesbestforthegivenquery.Atthispoint,auserlooksthroughthelistanddoes
369
CHAPTER10■RELEVANCYANDREPORTING
oneofafewthings.Theusercanclickadocumenttoopenitandmoveon,addtermstothequeryand searchagain,refinetheresultsetwithrefiners,orjustleavethesearchexperienceandnavigateaway. Fromthesearchengine’sperspective,thiscreatesfourbasicsearchbehaviors: 1.
Success:Asuccessfulsearchisasearchwheretheuserentersaquery,getsa resultset,looksthroughtheresults,clicksaresultlink,andgetsthedocument thatheorsheislookingfor.
2.
Partialsuccess:Apartialsuccessiswhereauserentersaquery,getsaresultset, looksthroughtheresults,andclicksalinkbutgetsthewrongdocument.Heor shethengoesbackandclicksanotherorsearchesagain.
3.
Unsuccessfulwithresults:Thisbehaviorseesaqueryentered,andaresultset displayed,butnoactiontakenontheresults.Theuserclicksnothingand eithersearchesagainorleavesthesearchexperience.
4.
Noresults:Theusersearchesbutgetsablanksearchpageandamessage suggestingsearchhints.
Althoughitseemsstrange,the“noresults”behaviorisextremelycommonforenterprisesearch engines.Thisislargelyduetomisspellings,synonymusage,ormisconceptionsbytheendusers.Whena usersearchesforsomethingheorsheiscertainexistsorshouldexistintheorganization—akeypieceto achievingtheinformationtaskathand—andgetsnothing,heorshecanbecomeextremelyfrustrated. Thismakesthe“noresults”searchexperiencethemostacuteproblemandtheoneofutmosturgency whenoptimizingthesearchengine. ThefollowingreportsareavailableundertheSearchsectionintheSiteCollectionWebAnalytics Reportspages:
370
•
NumberofQueries
•
TopQueries
•
FailedQueries
•
BestBetUsage
•
BestBetSuggestions
•
BestBetSuggestionsActionHistory
•
SearchKeywords
CHAPTER10■RELEVANCYANDREPORTING
Eachoneofthesereportpagesdisplaysadifferentviewofthesearchbehaviouroftheendusers. Thesereportscanhelptheadministratoridentifyandcorrectforthefailedsearchbehaviouraswellas giveguidanceonhowtoimprovesearchwithbuiltinsuggestions.Thefollowingsectionswillcoverthe importantreportsandhowtobestutilizethembutfirstwilloutlinethebasicfeaturesofallreportpages. IntheAnalyzetaboftheribbononthereportpages,thereportscanbeadjustedfortimespan,filterscan beapplied,andthereportscustomizedorexportedforsharingorfurtheranalysis(Figure10-5). Furthermore,alertsandreportscanbescheduledforthosethataretoobusytoremembertolookatthe reportsregularly.
Figure10-5.Analysisoptionsforreports Therearesomepresettimespansavailablelikeweek,month,oryear.Inaddition,acustom timespancanbeset.Thisdatacanbeexported,andonetimespancanbecomparedtoanotherto performbenchmarkingagainstchangesorimprovementsmadetosearch.Thefilteringmechanismfor searchreportsallowsforfilteringbasedonpre-definedsearchscopes—thatis,anyscopesthatare alreadycreatedandusedinthesearchinterface.AndCustomizeReportsallowsfordownloadingthe reporttoanExcelsheettomanipulatethereportingparameters.TheExcelsheetmaintainsadata connectiontotheSharePointsiteandwillupdatethedataasitchanges.Excelmakesiteasyfor administratorstogeneratecustomgraphsandworkwiththereportdata(Figure10-6).
371
1
CHAPTER10■RELEVANCYANDREPORTING
Figure10-6.A(minimally)customizedreportinExcel
NumberofQueries TheNumberofQueriesreportshowstheaggregateamountofqueriesatthatsitecollectionandthe numberofqueriesperday.Itshowstrendsinsearchactivityfromendusers.Normally,searchshould peakmid-weekandtaperofftowardtheweekend,dependingonwhatkindoforganizationisusing SharePointandwhatthekeymotivatorsforinformationdiscoveryare.Thisdatacanhelppredictload forthesite,identifyproblemswiththesearchengine,orthelevelofuseradoption.Ifmanyusersare provingfrustratedbySharePointornotfulfillingtheirinformationmanagementtasks,alownumberof queriescouldidentifyaneedfortrainingoradoptionprograms.
TopQueries TheTopQueriesreportwillshowuptothetop50searchqueries(Figure10-7).Thiswillrepresentthe termsthatareofthelargestinterestintheorganization.Youcanseethetermsforeachquery,the numberoftimeseachquerywassearchedfor,andthepercentageinrelationtoallsearchqueries.
372
CHAPTER10■RELEVANCYANDREPORTING
Thisreportgivesagoodideaofthemostcommoninterestsinanorganization.Therearealways somesurprisesinthisreportforadministrators.Whatusersexpecttofindandwhatisactuallyinasite canoftenbedifferent.Administrators,workingwithdepartmentheads,canhelpuserstoaligntheir interestsandknowledgeinformationneedswithpublishinganddocumentationpractices.Sometimes investigatingthisinformationcanalsoopenupareasofbusinessorcollaborationforcompanies.For example,ifalltheengineersarelookingforpolicydocumentsthatHRisresponsibleforbutarenot includedintheEngineeringdepartment’ssitecollection,userscanbedirectedtothecorrectsiteor searchcanbeexpandedtoincludebroaderscopes.
Figure10-7.TheTopQueriesreport
FailedQueries PerhapsthemostimportantofthereportsistheFailedQueriesreport(Figure10-8).Ifwelookatthe fourbasicsearchexperiencesoutlinedinthebeginningofthischapter,wewillrealizethatfailedqueries accountforhalfofthepotentialexperiences.Microsoftgroupsbothno-resultqueriesandno-click queriesintothesameFailedQueriesreport.Thequeriesarerankedbasedonthenumberofqueriesand itemizedbythepercentageofabandonment—thatis,thosequerieswherenosearchresultlinkwas clicked.Thisisimportanttoidentifybecauseifpeoplearesearchingandnotactioningtheresults,they havenottechnicallyhadasuccessfulsearch.Therearesomeinstanceswherethereisanexceptionto this,andusersmayfindtheinformationtheywantwithintheresultset.Search-basedapplicationsand searchcenterswithaddedfunctionalitycanmakethesearchresultspageavaluableinformation deliverytoolinitself.However,forstandardSharePointsearch,noclickcanalmostalwaysbeequated withnosuccess.Therefore,termswithahighrateofabandonmentshouldbetakenseriously.
373
CHAPTER10■RELEVANCYANDREPORTING
Figure10-8.TheFailedQueriesreport Theactionpointsforthisreportareclearbutnotalwaysstraightforward.Theadministratorshould identifywhythesetermsweresearchforandwhytheydidnoteitherreturnaresultorreceiveaclick. Thecaseofnoresultshouldbefollowedwithaninquiryintowhattheusersareexpectingandthen providingit.Thiscouldmeanaddingcontent,addingsynonymsinthethesaurusfile,oraddingtagsto existingdocuments.Inthecaseoflowclick-through,thesearchesshouldbeperformedandtheresult listinvestigatedtoseewhytheresultswerenotattractiveenough.Thiscouldbeamatterofpoortitlesor descriptions,insufficientmetadatadisplayedintheresults,orpoorranking.Improvingdocument qualityandaddingmetadata(properties)isagoodwayforward.Bestbetscanalsobeaddedtogivethe specificuserthebestdocumentforthesearchtermatthetopoftheresultspage,regardlessofthe organicresultlist.
374
CHAPTER10■RELEVANCYANDREPORTING
BestBetUsage TheBestBetUsagereportwillindependentlyreportthenumberofclick-throughsthateachbestbetthat isdefinedgets.Thiswillshowifbestbetsarebeingutilizedoverorganicsearchresults.Ifthetermsare addedtobestbetsinreactiontodataintheTopQueriesorFailedQueriesreports,benchmarkingforthe successofmodificationsusingbestbetscanbetracked.Ifbestbetsarenotbeingused,trytochangethe wordingtoenticetheuserstoclickthebestbetsasopposedtotheorganicresultsorre-evaluatethegoal ofthesearches.
BestBetSuggestions TheBestBetSuggestionsreportofferssuggestedbestbetsbasedonthedataintheotherreports.The suggestedbestbetscanbeaddedaseasilyasclickingAcceptorRejectinthereport.Thisisaneasy modificationforsitecollectionadministratorsthatcanimprovesearchwithverylittleeffort.However,it requiresthattheadministratorisawareofthereportsandvisitsthemregularly.
BestBetSuggestionsActionHistory TheBestBetSuggestionsActionHistoryissimplyalogofpreviousbestbetssuggestionsthathavebeen acceptedorrejected.
EnablingReporting InSharePoint2010,theUsageandHealthDataCollectionserviceapplicationandtheWebAnalytics service,areinstalledbydefault.TheUsageandHealthDataCollectionServiceApplicationistheservice thatcollectsthesearchusagedata.TheWebAnalyticsserviceistheservicethatthenanalyzesandmakes thatdataavailable.Botharenecessarytogetsearchreporting. Ifthesearchreportsdonotcontainanydata,itispossibledatacollectionhasbeendisabledatthe UsageandHealthDataCollectionserviceapplication.Thisisoftendoneforstorageandperformance issues.ThisserviceapplicationcanbefoundinCentralAdministrationunderManageService Applications,UsageandHealthDataCollection.MakesureSearchQueryUsageischecked.See Figure10-9.
375
CHAPTER10■RELEVANCYANDREPORTING
Figure10-9.UsageandHealthDataCollectionserviceapplication
DisplayingReportDatainSite Anotherusefulwaytoutilizesearchresultstoaffectsearchbehavioristopostalistofthemost frequentlyqueriedsearchterms.Thereareadvantagesanddisadvantagestothistechnique.The advantagesarethatotheruserscanlearnfromtheprevioussearchqueriesandfindinformationinaway theydidn’tthinkofthemselves.However,byallowingthemtoclickthetopsearchtermsandfirea searchoff,theyforcethosesearchtermstoremaininthetopsearchtermsastheywillremainthemost popularsimplybecausetheyaretheretoclick.Regardless,itcanbeaninformativeandinterestingpiece ofinformationtodisplayandausefulalternativemeanstoaccesssearch.Toenabledisplayofthetop searchtermonasiteorpage,editthepageandaddtheWebAnalyticsWebPartbyclickingtheInserttab ontheribbonandchoosingInsertWebPart.WhentheWebPartdialogappears,chooseContentRollup WebPartsandtheWebAnalyticsWebPart.Addittothepagewhereyouwantthetopsearchqueries displayed.AftertheWebPartisonthepage,youshouldchooseeditWebPartfromthedrop-downon thetopoftheWebPart.ThenunderInformationtoDisplay,chooseMostFrequentSiteSearchQueries. SeeFigure10-10.
376
CHAPTER10■RELEVANCYANDREPORTING
Figure10-10.SettingtheWebAnalyticsWebParttodisplaytopsearchqueries
TuningSearch Really,thebestwaytoimprovethequalityofsearchistoimprovethequalityofthecontentbeing indexed.Thecomputeradage“GarbageIn,GarbageOut”appliesprofoundlytosearchengines.Poorqualitycontentwill,withoutexception,resultinpoor-qualitysearchresults.However,improvinghuge setsoflegacydocumentsimportedfromafileshareorotherdocumentstoragecanbedauntingifnot impossible.Inthesecases,itiswisetobecriticaloftheneedforsuchdocumentsandbrutalwhenit comestotrimmingoldandquestionablyvaluablecontentfromimporttoSharePointorcrawlingbythe SharePointcrawler.
377
CHAPTER10■RELEVANCYANDREPORTING
Thebestwaytomanagedocumentqualitymovingforwardistohaveanactivetrainingprogramfor SharePointendusersandacoherenttagginganddocumentgenerationstrategy.WordandPDF documents,amongothers,areoftenifnotusuallymistitled,havepoorornometadata,andarenotwell formattedforsearch.Havingapolicyfordocumentauthoringandmetadatausecanleadtoamuch bettersearchexperienceandbetterlong-termknowledgemanagement. HerearesomehintsonhowtoimprovethequalityofcontentinSharePoint. 1.
Makegoodtitles—encouragedocumentauthorstotitletheirdocumentsand fillinanymetadataonthedocuments.
2.
Convertto.pdfwisely.Almosteveryonehasseenthe.pdfdocumenttitled Word document.pdf,orsomeequallyuseless.pdftitlelikeuntitled.pdf.Thisis becausenotitlewasgiventothedocumentwhenitwasconvertedfromits originalformatto.pdf.Byrequiringauthorstoaddmeaningfultitles, administratorsandmanagerscanhelpthefindabilityofinformationinan organization.
3.
Addproperties.UsetheManagedMetadataervicetodevisetaxonomyand teachauthorshowtouseit.
4.
Removeoldorunnecessarycontent.
5.
Askuserstoidentifyandflagnoisedocumentsandclick,rate,andshareusefulones.
AuthoritativePages ProbablytheeasiestadministrativewaytomodifytherankingofthesearchresultsinSharePoint2010is bytheuseofauthoritativepages.Pagescanhaveadditionalrankingboostappliedtothembasedon theirclickdistancefromanauthoritativepage.Sitesareusuallybuiltinapyramidstructure,withan entrypageatthesitecollectionlevelandthenalistofnavigationlinksthatlinksitesandsubsites.Those siteslinktolistsandlibrariesthatlinktodocuments.Sometimeslinkscanbeprovidedacrosssites. SharePointanalyzesthisstructureandthenumberofclicksthatexistbetweentwodocuments.Thenit appliesaddedvaluetoapageordocument’srankingvaluebasedonthatdocument’srelativelocationto anauthoritativepage. Thedefaultauthoritativepageisthe“homepage”toyoursitecollection.Therefore,rankingis boostedbasedontheclickdepthofthesites,lists,libraries,pages,anddocuments.Asexpected,adeep pagecanhaveitsrankingboostedbylinkingtoitfromthemainpage.Theauthoritativepagesetting includeslistsandlibrarypages,butindividualdocumentscannotbeadded. TheAuthoritativePagespagecanbeaccessedfromtheSearchserviceapplicationinCentral Administration.ThetoplinkunderQueriesandResultsistotheAuthoritativePagespage.See Figure10-11.
Figure10-11.LinktoAuthoritativePagespage
378
CHAPTER10■RELEVANCYANDREPORTING
Therearethreeseparatelevelsofauthoritativepages(Figure10-12)thatcanbeset: •
Mostauthoritativepages:Pagesclosetothispagewillincreaseinranking dependentonthenumberofclicksfromthesetpagetothepagereturnedinthe resultset.
•
Second-levelauthoritativepages:Thisperformsthesamewayasauthoritative pagesbutrankslowerthanauthoritativepages.
•
Third-levelauthoritativepages:Thisperformsthesamewayasauthoritativepages andsecond-levelauthoritativepagesbutboostsrankingtheleastofthethree.
Andthereisonenon-authoritativelevel,whichwillreducerankingofentiresites: •
Sitestodemote:Addingsitestothissectionwilldemoteallcontentonthatsitein thesearchresults.
Figure10-12.AuthoritativePagespage
379
CHAPTER10■RELEVANCYANDREPORTING
ResultRemoval Insomecases,especiallythosewhereverylargedocumentrepositoriesareindexed,undesirableresults mayappearintheresultlist.Insomecases,adocumentordocumentsthatareburiedonafileshare mayhavesensitiveinformationthatcanbereturnedinthesearchresults.Searchesfor“password”or “salary”canoftensurfacethesedocuments.Thebestwaytodealwiththesedocumentsis,ofcourse,to removethemfromthelocationtheyarebeingindexedorrestrictthemwithpermissions.However, SharePointoffersasimplemechanismforremovingresultsthataredeemedundesirableinthesearch results.TheSearchResultRemovalfeatureintheSearchserviceapplicationhasasimplefieldwherethe administratorcanaddtheURLsofundesireddocuments. Toadddocumentstotheresultremoval,dothefollowing: 1.
NavigatetotheSearchserviceapplication.
2.
Ontheleft-handmenuunderQueriesandResults,chooseSearchResult Removal(Figure10-13).
Figure10-13.SearchResultRemovalmenuitem 3.
380
AddtheURLsofthedocumentsyouwantremovedfromsearch(Figure10-14).
CHAPTER10■RELEVANCYANDREPORTING
Figure10-14.Searchresultremoval Documentswillautomaticallyberemoved,andcrawlruleswillbeappliedtoavoidcrawlingthe documentsinfuturecrawls.
StopWords AswesawwithHeaps’Law,themostcommontermsinanycorpusdonotcarryanyvalueforsearching. Grammaticaltermsandhelperlanguagethatwhenusedincontextcanconveymeaningdonot themselveshelpustofindtheinformationwewant.Inordertohelpthesearchengineavoidranking documentshighthatmerelyhaveahighdensityoftermssuchas“the”,thesemostcommontermsare setasstopwordsornoisewordsinSharePoint’ssearchengine.SharePoint2010hasonestopwordfile foreachlanguageitsupportsaswellasaneutralfile.However,theneutralfileisemptybydefault.All otherfileshaveafewofthemostcommontermsforthatlanguageinthem.Morecanbeaddedeasilyby theadministrator. ThefilesarelocatedinC:\Program Files\Microsoft Office Servers\14.0\Data\Office Server\Config,wherethereisavirginsetoffilesthatarecopiedtotheSearchserviceapplication’s specificconfigfilewhenanewSearchserviceapplicationiscreated.ThispathisC:\Program Files\Microsoft Office Servers\14.0\Data\Applications\GUID\Config.Itisbesttoeditthefilesinthis pathateachqueryserver. ThedefaultstopwordfileforEnglishiscallednoiseeng.txtandcontainsthefollowingterms.
381
CHAPTER10■RELEVANCYANDREPORTING
a and is in it of the to Thesetermscanbeaddedtobyplacinganadditionaltermoneachlineofthefile.Commonwords inthelanguagemaybefreelyaddedaslongassearchingforthemwouldnotprovideusefulresults. Someusefuladditionsmightbe“this”,“that”,“these”,“those”,“they”,etc.
TheThesaurus SharePointhasthecapabilitytomatchtermswithpotentialsynonymsandreturndocumentsbasedon thosesynonyms.Forexample,ausermaybelookingfortheprojectplanforthewindmillhisorher companyisconsultingonwithoutrealizingthatitisactuallyawindturbineheorsheissearchingfor (windmillsmillgrain,windturbinesproduceelectricity).Searchingfor“windmill”willnotreturnany hitsforhisorherqueryandultimatelycausefrustration,andprobablyacalltotheengineersandsome laughterandderiding(engineerscanbecallous).Toavoidthis,apotentialsynonymmatchbetween windmillandwindturbinecouldbeenteredinthethesaurusifitprovestobeacommonenough mistaketowarrantit. ThethesaurusinSharePointisinstalledintothesamefolderasthestopwordfiles,andsimilarly thereisonefileforeachsupportedlanguageaswellasalanguage-neutralfile,C:\Program Files\Microsoft Office Servers\14.0\Data\Office Server\Config.Theseareavirginsetofthe thesaurusandstopwordfiles.WhentheSearchserviceapplicationiscreatedintheSharePointfarm, SharePointcopiesoutasettoallqueryserversinthelocationC:\Program Files\Microsoft Office Servers\14.0\Data\Applications\GUID\Config.Ifthevirginfilesareedited,whenanewSearchservice applicationiscreated,theeditedfileswillbestagedout.ButanyexistingSearchserviceapplicationsand thesaurusfileswillnotbecopiedoverandmustbeindividuallyedited. Bydefault,thethesaurusfilesarelackinganyactiveentries,andtheexampleswithinarein comments.Sotheadministratormusteditthefilesforthemtofunctionandcopythemouttoeach queryserver.Thefileswillbecalledonlyifthesearchisinitiatedinthespecificlanguagecontextforthat file.ThedifferentlanguagefilesareshowninTable10-1.
382
CHAPTER10■RELEVANCYANDREPORTING
Table10-1.TheThesaurusFilesinSharePoint*
Language
File name
Languageneutral
tsneu.xmlEnglish (United States)
Arabict
Language
sara.xml
Bengalitsben.xml Bulgariantsbul.xml Catalants
cat.xml
File name
Language
tsenu.xmlLithua
Finnishtsfin.xml
nian
File name
Language
File name
tslit.xml
Serbian (Latin)
tssbl.xml
Malay tsmal.xmlSlo (Malaysian)
French (Standard)
tsfra.xmlMalayala
German (Standard)
tsdeu.xmlMa
Gujarati
tsguj.xml
mtsmly.xml
rathi
Norwegian (Bokmal)
tsmar.xml
vak
tssvk.xml
Slovenian
tsslo.xml
Spanish
tsesn.xml
tsnor.xmlSwedish
Chinese (Simplified)
tschs.xmlHungarian
tshun.xml Polishts
Chinese (Traditional)
tscht.xmlIcelandic
tsice.xml
Portuguese (Brazil)
tsptb.xmlTelugu
tstel.xml
Indonesiantsind.xml
Portuguese (Portugal)
tspor.xmlTha
i
tstha.xml
Italian
tsita.xml
Punjabitspun.xml
Turkish
tstur.xml
Japanese
tsjpn.xmlRomanian
tsrom.xmlUkra inian
tsukr.xml
Dutch tsnld.xmlKannada (Netherlands)
tskan.xmlR
tsrus.xml
tsurd.xml
English (United Kingdom)
tskor.xml
Croatiants Czecht Danishtsdan
cro.xml sces.xml
tseng.xmlKorea
n
ussian Serbian (Cyrillic)
plk.xml
Tamil
tssve.xml
Urdu (Pakistan)
tssbc.xmlViet
tstam.xml
namese tsvie.xml
*Source:http://technet.microsoft.com/en-us/library/dd361734.aspx Thefiletsneu.xmlisthelanguage-neutralfilethatisthedefaultfileutilizedifnospecificlanguage valueispassed.Oninstallationithasthefollowingstructureandvalues:
383
CHAPTER10■RELEVANCYANDREPORTING
0
Internet Explorer IE IE5
NT5 W2K Windows 2000
run jog
-->
Thefirstthingtodowhenutilizingitistoremovethecommenttags
394
CHAPTER10■RELEVANCYANDREPORTING
Not yet rated
Theratingsshouldnowappearontheresultlist.SeeFigure10-21.ThisXSLTwillcheckthevalueof theAvgRatingpropertyyouhavemappedandcompareitwithrangesbetweeneveryhalfunit,startingat three-fourths.Thiswillallowforhalfratingsbasedonthedecimalvaluesoftheows_AverageRating property,whichisanaverageofallaccumulatedratings. TheXSLTusesthebuilt-inimageRatings.png,whichisactuallyalargerimageofallratingsstars, andsetsthemtobedisplayedusingthebuilt-incascadingstylesheet(CSS).IfthedefaultCSSis changed,theratingsimageswillnotdisplaycorrectly.Therearecertainlymorecleverwaystocreatethis XSLT,butthisisasimplestarttosettheratingsvalueontheresulttemplate.
Figure10-21.Ratingsshowninthesearchresults
■NoteSeeChapter6formoreinformationoncustomizingthedefaultWebParts.
395
CHAPTER10■RELEVANCYANDREPORTING
SearchKeywordsandBestBets TheSearchKeywordspageintheSiteCollectionAdministrationprovidesauserinterfaceforcreating andmanagingbestbetsinSharePoint2010.Keywordsthatwilltriggerabestbetordefinitioncanbe enteredintheSearchKeywordssection.Additionally,synonymsandresponsiblecontactscanbeadded. Thereisafurtherpublishingdatemechanismtoactivateanddeactivatetime-sensitivekeyword campaigns.Bestbetsandkeywordinformationareaddedtothetopofthesearchresultspageforthe givenkeywordsearch. Toaddkeywordsandbestbests,dothefollowing: 1.
GototheSiteSettingsofthesitecollectionwherethebestbetsandkeywords shouldappear.
2.
SelectSearchKeywordsunderSiteCollectionAdministrationtoopenthe ManageKeywordspage,asshowninFigure10-22.
Figure10-22.TheManageKeywordspage TheManageKeywordspagelistsallactivekeywords,theirbestbets,synonyms,contacts,andexpiry date.Thereisalsoamenuontheleftthatlinkstothewebanalyticsreportsforthesitecollectionthat relatetokeywordandbestbetactivity,andlikewisetheWebAnalyticspagehasalinktotheManage Keywordspageforeasynavigationbackandforth.Thisisextremelyusefulwhenactioningdatainthe reports. Toaddanewkeyword,clickAddKeywordandfillouttheappropriatefields(Figure10-23). Synonymscanbedefinedheretoactionthebestbetforthegivenkeywordaswellasanydefinitionor contactrequired.Acontactforthatkeywordandactivationandexpirationdatescanalsobedefined. Synonymsforspecifictermswillactionthebestbetbutnotaffectthecontentoftheorganicsearch results.
396
CHAPTER10■RELEVANCYANDREPORTING
Figure10-23.TheAddKeywordspage Bestbetscanbeaddedtoeachkeyword,andseveralcanbeaddedinanydesiredorder(Figure1024).However,onlyoneuniqueURLcanbeassociatedwithonebestbet.Therefore,bestbetsshouldbe consideredasuniquelinkstoaspecificsite.Theinformationinthebestbetaboutthatlinkshouldbe explanatoryaboutthetargetlinkandnotthekeyword.Akeywordmayhavemanybestbets,buteach bestbetlinkstoauniqueURL.URLscanbeascomplicatedasnecessaryorasdeepinasiteasrequired.
397
CHAPTER10■RELEVANCYANDREPORTING
Figure10-24.Addingabestbet Ifanexistingbestbetischosen,SharePointwilllistallavailablebestbets.Iftherearemany, administratorscansearchforthedesiredbestbet.Careshouldbetakenintitlingthebestbets,asthis willbethemostlikelywayoffindingthecorrectone.Aseachbestbetisaddedtoaparticularkeyword,it isremovedfromthelistofpossiblebestbets.Inthisway,thesamebestbetcannotbeaddedtothesame keywordtwice.Afterthebestbetsareadded,theycanbeorderedbyimportanceonthekeywordspage (Figure10-25).
398
CHAPTER10■RELEVANCYANDREPORTING
Figure10-25.Orderingbestbets
ManagedMetadataService TheManagedMetadataserviceisaserviceinSharePoint2010thatallowsadministratorstomanage termsinanorganizedmannerforuseinthecolumnsoflistsandlibraries.Thesetermscanthenbe purposefullyappliedtolistitemsanddocuments,andthetypesofvaluesthatuserscanassociatewith itemsanddocumentscanbeeasilymanagedfromacentrallocation. TheManagedMetadataserviceisespeciallyusefulforsearchbecauseitallowsadministratorsto managetermsthatrepresentconceptsandthemesthatareessentialtoanorganization.Thismakesit possibletoexposeimportantconceptsanddirectuserstousebettertermstodescribedocumentsand contentinsidetheorganization.Asmentionedinthesectionofthischapterentitled“TheCorpus,”akey goaloftheadministratoristoreducethe“GarbageIn,GarbageOut”traitofsearchengines.Applying appropriatetermsacrossthatcorpuscanhelpoutagreatdealinmakinggarbageintogold. TheManagedMetadataservicecreatesaTermStore,whichisbasicallyadatabaseofassociated termscalledtermsets.Itcanalsomanagecontenttypes.Contenttypesarecollectionsofpropertiesor settingsthatcanactasacontainerforcategorizingdocuments.Contenttypescanholdmetadata, policies,templates,documentconversionsettings,orevencustomfeatures.Thedocumentsorlistitems appliedtothesecontenttypeswillthenconformtotheattributesoftheirassociatedcontenttype. Managingthesecontenttypesinacentralizedmannerbecomesimportantwhendealingwithlarge numbersoflistsandlibrariesinSharePoint.Thecontenttypecanbedefined,used,andre-usedacross theSharePointdeployment. AligningandcontrollingcontenttypesandmetadatainSharePointhelpsearchbyapplying structuretoinformationandextendingassociatedtermsappliedtothatinformation.Misalignments betweenexistingtermsandthetermsusersexpectorusecanberemediedbymakingsuretermsand theirsynonymsareappliedtothedocuments.Administeringthisinacontrolledandstructuredway withtheManagedMetadataservicegivestheadministratorpoweroversuchterms.
399
CHAPTER10■RELEVANCYANDREPORTING
TheManagedMetadataservicecanproducetermsetsataglobalorlocallevel.Usersatalocallevel canutilizeglobaltermsetsandtheirownlocaltermsetsbutmaynotuseTermStoreslocaltoanother sitecollectionorsitelevel. FollowthesestepstoaccessandsetuptheManagedMetadataservice: 1.
Choosethe“Manageserviceapplications”menuitemontheCentral AdministrationsmainpageintheApplicationManagementmenu.SeeFigure 10-26.
Figure10-26.TheApplicationManagementmenuinSharePointCentralAdministration 2.
NavigatetotheManagedMetadataserviceapplication.SeeFigure10-27.
Figure10-27.TheManagedMetadataserviceapplication 3.
400
Assignadministratorsfortheservice,andsavethepage.Theseuserswillbe abletocreatenewtermsetgroupsandassigngroupmanagerstothoseterm sets.SeeFigure10-28.
CHAPTER10■RELEVANCYANDREPORTING
Figure10-28.AssigningTermStoreadministrators 4.
Createnewgroupsfortermsets,andassigngroupadministratorsbychoosing thedrop-downmenuontheManagedMetadataservicemenuitem.SeeFigure 10-29.
401
CHAPTER10■RELEVANCYANDREPORTING
Figure10-29.AnewtermsetgroupfortheHRdepartment 5.
Createtermsetsforthatgroupbyusingthedrop-downmenuonthenew groupthatwasjustcreated.SeeFigure10-30.
Figure10-30.Creatingtermsinthetermset 6.
402
Addadditionaltiersoftermsandsub-termstothattermset.
CHAPTER10■RELEVANCYANDREPORTING
■NoteTermsetscanbedeleted,buttheymustbeemptyoftermstobedeleted.Trytoplanouttermsetswellin advance.
Tagging Nowthatthetermsetshavebeendefinedandtermsapplied,userscanhaveanautosuggest-like functionalitywhenapplyingsocialtagsandnotestodocuments.Usersshouldbemadeawareofthe possibilityofapplyingtagstodocuments.Ifsocialtagsareappliedtodocuments,aquerycanbeusedto finddocumentsofamatchingsocialtagbyusingthesocialtag:searchparameterinthequerybox(e.g., resumesocialtag:rejected).Allotherpropertyfieldscannowalsobematchedwithmanaged metadata. ThereisalsoaneasywaytoenableEnterpriseKeywordsfeaturesinlistsandlibrariesthat,when enabled,canallowamanagedmetadatafieldtoautomaticallyappearonthePropertiespageof documentsandlistitems.WhenenterprisekeywordsareenabledontheEnterpriseDataandKeywords Settingspageunderthelibraryorlistsettingspage,userswillbeabletoaddmetadatafromEnterprise Keywordsfields(Figure10-31).Additionally,andperhapsmoreimportantly,newcolumnscanbe createdasamanagedmetadatatypeandrestrictedtothevaluesfromachosentermsetintheManaged Metadataservice.
Figure10-31.Alistwheretagsandnotescanbeappliedtoaddmanagedmetadata AsusersaddtheirownkeywordstodocumentpropertiesintheEnterpriseKeywordsfield,the valuesareaddedtotheTermStoreundertheSystemtermset(Figure10-32).Thesecanthenbemoved intotheappropriatesectionintheManagedMetadataservice.SeeFigure10-33.Termscanalsobe copied,re-used,merged,deprecated,ordeleted.
403
CHAPTER10■RELEVANCYANDREPORTING
Figure10-32.PopulatingtheEnterpriseKeywordsfieldfromthedocumentpropertiespageinadocument library
Figure10-33.Movingauser-definedkeyword
404
CHAPTER10■RELEVANCYANDREPORTING
OnthePropertiespageofeachterm,thetermcanbegivenadescriptionandadefaultlabelaswell asotherlabels.Theotherlabelsactassynonymsforthisterm,allowingtermswithlikemeaningtobe managedtogether.Asingletermoraphrasecanbeasynonym,buteachtermorphrasemustbeentered onitsownline.SeeFigure10-34.
Figure10-34.Addingsynonymstotheterm Donotexpectsynonymsmappedtoaspecificterminatermsettochangetheresultsinthesearch resultspage.Thesesynonymsaresimplyahelpinghandforusersandtermmanagerstofindthe acceptedtermseveniftheydonotknowwhatthosetermsare.InFigure10-34,entering“trashed”inthe keywordsfieldwillgivethesuggestionfortheterm“rejected”.Toimplementasynonymforatermthat willbringbackhitsinthesearchresult,usethethesauruspreviouslydescribedinthischapter.
■NoteTermsetscangetverylarge,soSharePointhasasearchfunctionbuiltinforqueryingthemtofindan exactnodeinthehierarchy.Thiscanbeusefulwhenadditionaltermsneedtobeadded.
405
CHAPTER10■RELEVANCYANDREPORTING
CustomRanking Aspreviouslymentioned,everyorganizationhasadifferentsetoftermsusedtodescribethethemesand conceptsthatmakestheorganizationuniqueandsuccessful.Thisterm,uniqueness,combinedwitha numberofotherfactors,includingbusinessprocess,userbias,language,andpurpose,meansthateven themostcleverandcomplexrankingalgorithmwillnotworkforallqueriesinallcases.Insomecases,it maybedesirabletoadjusttherankingalgorithmtoslightlychangethewaythatdocumentsarearranged inaresultset.
Built-InModels Generallyspeaking,thedefaultsearchalgorithmisthebestcompromise.Microsofthasinvestedheavily inimprovingandtestingthedefaultrankingalgorithm.Thedefaultalgorithmsalsohavetheadvantage thatdistance,minimumspan,anddocumentlengthconsiderationsareincludedandcannotbe modifiedinthecustommodels.Butshouldaclearneedforadifferentrankingmodelbeidentified,itis possibletochangetherankingalgorithm.Itismostlikelythatametadata-richenvironmentwith extraordinaryimportanceforparticularpropertieswilldrivetheuseofacustomrankingmodel. Out-of-the-boxSharePoint2010Searchcontainsthefollowingrankingalgorithmsthatcanbeused withoutanyadjustment:
406
•
Defaultrankingmodel(MainResultsDefault)
•
ExpertiseSocialDistancerankingmodel
•
HighProximityranking
•
MainPeopleSocialDistance
•
Expertisemodel
•
NameSocialDistance
•
Namemodel
•
MainPeoplemodel
•
NoProximityranking
CHAPTER10■RELEVANCYANDREPORTING
TogetalistofthesedefaultmodelsandtheirGUIDs,opentheSharePoint2010ManagementShell andcallthefollowingPowerShellcmdlet(Figure10-35): Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchRankingModel
Figure10-35.Callingthebuilt-inrankingmodelsandtheirGUIDs Thesebuilt-inalternativerankingmodelscannotbemodified.However,wecanseetheireffecton thesearchresultsbysimplyaddingthermparameterandtheGUIDoftherankingmodeltotheURLof thesearchresultspage.Forexample,thequeryforSharePointonourdemositewiththeNoProximity rankingmodelwouldhavetheURLhttp://demo.prosharepointsearch.com/Search/results. aspx?k=sharepoint&rm=df3c3c51-b41f-4cbc-9b1a-c3b0ed40d4f0,wherekisthequerytermandrmisthe IDoftherankingmodel.Thistechniqueisusefulfortestingchangestotherankingmodelbutnot practicalforproductionimplementations.Insuchcases,theWebPartshouldbesettousethatcustom model.SeeFigure10-36.
407
CHAPTER10■RELEVANCYANDREPORTING
Figure10-36.TheNoProximityrankingmodelappliedusingthermparameterintheURL
CustomModels SharePointadministratorscanalsocreatetheirownrankingmodels.Theserankingmodelsaredefined inanXMLfilethatcanbeaddedtoanewrankingmodelcreatedinSharePointbyaPowerShell command.TheXMLdescriptorwillapplyaweightedaverageofthevaluesthataresetinittothe rankingscheme. Listing10-2showsthesampleXMLdescriptor. Listing10-2.ThesampleXMLdescriptor.
Thiscodeisbrokenintothefollowing: •
Query-dependentfeatures:Thiselementcontainsmanagedpropertiesthataffect dynamicranking.ThiselementcontainsaPropertyID(PID)thatcanbeextracted fromthemanagedpropertylistusingPowerShell,thenameoftheproperty (optional),aweightvaluetoapplytotherankingcalculation,andanoptional lengthnormalizationsetting.
•
Query-independentfeatures:Thiselementcontainsadjustmenttostaticranking values. •
Categoryfeatures:ThiselementcontainsthePropertyID,propertyname (optional),anddefaultvalue.Thisadjustmentisforpropertiesthathave staticvalues(associatedwiththedocument)andaresmallenumerable integers.
•
Languagefeatures:ThiselementcontainsthePropertyID,name(optional), defaultvalue,andweightvalue.Thedefaultvalueiseither1or0,where1is thesameastheuser’slocaleID(regionalsetting)and0isnotthesame.
•
Query-independentfeatureThiselementrequiresatleastoneofthe following:
•
transformRational
•
transformInvRational
•
transformLinear
•
transformLogarithmic
■NoteSeehttp://msdn.microsoft.com/en-us/library/ee558793.aspxformoreinformation.
409
CHAPTER10■RELEVANCYANDREPORTING
Tosettherankingmodelonthesearchcenter,thecoreresultsWebPartneedstobechangedora customWebPartcreatedthatcallstheGUIDofthedesiredrankingmodel. UsethefollowingPowerShellcmdlettogettheIDsofmanagedmetadataproperties.See Figure10-37. Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchMetadataManagedProperty
Figure10-37.ThelistofmanagedmetadatapropertiesandtheirPIDs AddthePIDsandtherankingadjustmentstotheQueryDependentFeatureelementoftheXML,asin thefollowingexample:
ThelengthNormalizationparameterallowsforconsiderationofdocumentlengthwhenconsidering aparticulartextvalue.Inthecaseofmanagedmetadatavalues,theneedforlengthnormalizationis probablylowbecausemultipleoccurrencesofthetermsarelesslikelyinlongorshortdocuments. LengthNormalizationshouldtakeavaluebetween0and1,where0isnolengthnormalizationand1is maximumconsideration.
410
CHAPTER10■RELEVANCYANDREPORTING
Theweightparametertakesavalue.Thereisnoclearindicationastowhatvalueitshouldtaketo increaseordecreaserelativeranking,astheotherrankingweightsarenotavailabletocompare.A guidelineforweightingwillbesomewherebetweenaweightvalueof1,whichiswhatoccurrencesinthe bodytextaregivenbydefault,and70,whichiswhatoccurrencesinatitlepropertyaregiven.Itis recommendedthatseveralroundsoftestingbetakenbeforedecidingonthebestvalue. Aftertheproperrankingvalueshavebeenapplied,anewrankingmodelneedstobecreatedbased ontheXML.TheXMLmustbeappliedasastringwhencreatingorsettingthenewrankingmodel.To createanewrankingmodel,opentheSharePoint2010ManagementShellandcallthefollowing PowerShellcmdlet: Get-SPEnterpriseSearchServiceApplication | New-SPEnterpriseSearchRankingModel –rankingmodelxml '{the entire xml string with spaces removed}' However,itisbettertocreateaaps1filewiththecommandandthenrunitfromthecommand promptsothatitcanbemoreeasilyeditedandre-used.Createatextfile,andaddtheforegoingintothe textfile.ThensaveitasCustomRanking.ps1.DragthatfileintothePowerShellconsole. Listing10-3isanexamplerankingmodel.Itisonlyanexampleandhasnousefulrankingaffect.A GUIDisneeded.ThereareseveralwaystogenerateaGUID—thereareevenwebsitesavailableto generateoneifnecessary.Whencreatingacustomranking,makesurethePIDsmatchtheactual propertyvalues. Listing10-3.Anexamplerankingmodel
name='Title' pid='2' weight='0' name='Keywords' pid='356' weight='0' name='Description' pid='6' weight='0' name='Status' pid='359' weight='0'
411
CHAPTER10■RELEVANCYANDREPORTING
SettingtheResultsWebparttoUseCustomRankingModels Nowthatthereisacustomrankingmodelandithasbeentestedusingthermparameterandappearsto berankingasdesired,thecoreresultWebPartoracustomresultsWebPartneedstobesettoalways obeythatrankingmodel.Todothis,theWebPartneedstobeexported,modified,andimportedback intothesite.TheDefaultRankingModelIDpropertymustbeappliedtotheWebPartwiththeGUIDofthe customrankingmodel,becausethereisnoexposedsettingintheEditWebPartpane. Toaddthispropertytothe.webpartfile,followthesesteps: 1.
FindtheresultspagewheretheWebPartthatwillbemodifiedresides.Click SiteActions,EditPage.
2.
OntheresultsWebPart,choosetheWebParteditmenuandchooseExport. SeeFigure10-38.
Figure10-38.ExportWebPart
412
CHAPTER10■RELEVANCYANDREPORTING
3.
SavetheWebParttoyourdrive,andopenitinatexteditor.
4.
FindtheDefaultRankingModelIDproperty.
5.
OpentheSharePoint2010ManagementShell,andcallthefollowing PowerShellcmdlettofindtheGUIDofyourcustomrankingmodel: Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchRankingModel
6.
CopytheGUIDintotheDefaultRankingModelIDpropertyontheWebPart. Makesurethepropertytagisproperlyclosed. 8f6fd0bc-06f10-43cf-bbab -08c377e083f4
7.
Gobacktotheresultspage,anddeletetheexistingWebPart.
8.
ChooseAddWebPartontheWebPartintheWebPartzonewherethe previousWebPartwas.
9.
Underthecategoriessection,thereshouldbeanUploadWebPartbutton. Clickit,anduploadyourmodifiedWebPart.SeeFigure10-39.
Figure10-39.UploadthemodifiedWebPart 10. ChooseAddWebPartagain,andaddthenewWebPart. 11. Publishthepage. Nowtheresultsshouldreflectthenewcustomranking.IfthereismorethanoneresultWebParton thepage,allresultsWebPartswilldisplayrankingbasedonthemodelfoundinthefirstresultsWebPart onthepage.
413
CHAPTER10■RELEVANCYANDREPORTING
Summary Inthischapter,welookedatgenericconceptsofsearchenginerelevancyandhowtheycanhelpusto understandandeventuallyimproveSharePoint2010Search.Wealsowentoversomeconceptsabout howtermsarematchedwithdocumentsinacollaborationportal.ThereportingfeaturesofSharePoint 2010wereoutlinedandsomesuggestionsonhowadministratorscanusethesefeaturesweregiven.In addition,anumberofbuilt-insearchenhancementfeaturessuchassettingauthoritativepages, removingunwantedresults,addingstopwordsandsynonyms,creatingcustomdictionaries,utilizing thenoindexclass,andtaggingdocumentswerecovered. Also,theManagedMetadataservicewasoutlined.Althoughthisserviceisnotonlysearch-focused, itsproperusecanimprovecontentandmakesearchfunctionmuchbetter.Additionally,asmallUI tweaktoaddtheratingscolumntosearchwasgivenasanexampleofhowsearchcanbefurther integratedintoSharePoint’sextendedfeatures.Finally,customrankingmodelsweredescribedand instructionsgivenonhowtocreateandapplyacustommodel.
FurtherReading Herearesomesuggestionsforfurtherreadingormoredetailsonthetopicscoveredinthischapter.
Relevancy Forinformationonthemathbehindbasesearchrankingalgorithms,seehttp://en.wikipedia.org/ wiki/Okapi_BM25. ForMicrosoft’sneuralnetworkrankingalgorithmpatent,seewww.freepatentsonline.com/ 7840569.html. ForfurtherreadingonHeaps’Law,seehttp://en.wikipedia.org/wiki/Heaps'_law.
Reporting ForinformationonreportingandhealthmonitoringinSharePoint,seehttp://technet. microsoft.com/en-us/library/ee681489.aspx.
TuningSearch Forhowtoconfigureauthoritativepages,stopwordfiles,thethesaurus,andcustomdictionaries,see http://technet.microsoft.com/en-us/library/cc262796.aspx.
CustomRanking ForMSDNguidanceoncustomrankingmodelsandtheexampleschema,seehttp://msdn. microsoft.com/en-us/library/ee558793.aspx. AlthoughthisMSDNblogpostby“Kundu”issomewhatdated,theprinciplesstillapplyto SharePoint2010andcangivesomeinsightintoadjustingcustomranking:http://blogs. msdn.com/b/kundut/archive/2009/10/15/relevance-in-sharepoint-search.aspx.
414
C H A P T E R 11
■■■
Search Extensions Aftercompletingthischapter,youwillbeableto •
PlanforextendingSPS2010Searchthroughfreeandpurchasablethird-party additions
•
RecognizelimitationsofSPS2010resolvedbythird-partyadditions
•
NavigatethemarketplaceofSharePointsolutionvendors
•
Assestheneedforadditionalsearchwebparts,documentvisualization,and automaticclassification
•
DetermineifareplacementfortheSharePoint2010searchengineisnecessary
•
Budgetfortherelativecostofthird-partyadditions
Thusfar,thisbookhasfocusedonhowtogetthemostoutofsearchinSharePoint2010withinhouseresources.Ithasfocusedonsetup,use,configuration,customization,andbasiccustom development.WhilethesearethevitalcomponentsofworkingwithsearchinSharePoint,itshouldbe recognizedthatlikeallsoftware,theplatformisnotwithoutitslimitations.ManySharePoint2010 deploymentswillrequirefunctionalitybeyondthatsupportedbythebasicplatform.Insomecases,it maybeprudenttobegindevelopmentofcustomsolutionstomeetbusinessneeds.Dependingonthe needs,however,customdevelopmentmaybefoundtobetooexpensive,time-consuming,risky,oreven impossible.Inthesesituations,itmaybenecessarytoturntoexternalresources. ThischapterexploresthelimitationsofSharePoint2010,andthemostpopularfunctionsthatare addedtotheplatformtooffsetthoselimitations.Itexploresthebusinessneedsthatmayrequireadd-on solutions,andreviewsvendorswithcommercialsoftwaresolutions.Ittakesalookintofreeadd-on solutionsthroughopensourceprojectcommunities,andprovidesgeneraloutlinesofwhen replacementstotheSharePoint2010searchengine,suchasFASTSearchServerforSharePoint2010 SharePoint(FAST)ortheGoogleSearchAppliance,shouldbeconsidered.Theconceptsinthischapter aredesignedtobesurface-leveloverviewsoftheavailableoptions,butdonotgointodeep-leveldetail. Therearemanyresourcesavailablethatarededicatedtoeachsolutionmentioned,andthischapter shouldbetreatedasaguideforwhentoseekoutthoseresources.
415
CHAPTER11■SEARCHEXTENSIONS
ExtendingSearchBeyondIn-HouseDevelopment Microsofthasanextensivenetworkofpartners,consultants,developers,andsoftwarevendorsthat supportSharePoint2010.Inthesummerof2010,justafterthereleaseofSharePoint2010,Microsoft releasedthatithad390,000partnersworldwidesupportingitsvastarrayofsoftware.Furthermore,95% ofMicrosoftrevenueatthattimestemmedfrompartners.Itissafetoassumethatnomatterthefeature needsofacompany,thereisprobablyaMicrosoftpartneravailablethatcanassisttocustomdevelopor sellapre-developedsolutiontomeettherequirements. Mostthird-partyenhancementsareeithersolutionsthatmeetback-endneedsbeyondtheuser interface,oruser-sidefeaturessuchasWebParts.Toreview,WebPartsareASP.NETservercontrols,and actasthebuildingblocksofSharePoint.Theyallowuserstomodifytheappearance,content,and behaviorofSharePointdirectlyfromthebrowser.WebPartsallowforinteractionwithpagesandcontrol thedesignofapage.Thesebuildingblocksprovidealltheindividualbitsoffunctionalityusersmay experiencewithinaSharePointenvironment.SharePoint2010comeswithover75WebPartstomeetthe dynamicneedsoforganizations,butitwouldbeimpossibleforMicrosofttoincludeWebPartsin SharePoint2010thatmeeteveryfeatureneedforeveryorganizationusingtheplatform.Whensearch userfeaturesbeyondthoseincludedwiththeplatformarerequired,“customsearch”WebPartsare needed. CustomWebPartscanrangefromadaptationsofexistingWebPartstomeetnewbusiness requirements,tocompletelyoriginalWebPartsthatarebuiltfromscratch.Sincetheuserexperiencein SharePointflowsthroughWebParts,applicationpages,andASP.NETcontrols,alladd-onsolutionswill containsomecombinationofcustomWebParts.Thereare,however,specificpointsolutionsbuiltto addoneormoreWebPartstomeetspecificfeatureneeds.Theserangefromfreeopensourceprojects fromsites,suchasCodePlex,individualpurchasableWebParts,suchasthoseofferedbyBamboo Solutions,tobroaderpackagesofWebParts,suchasthoseofferedbySurfRay’sOntolicaSearchproduct. InadditiontocustomWebPartsthatcaterdirectlytouserfunctionality,therearemanyother solutionsavailablethatcatertoback-endneeds.Theseneedsmayrangefrombettermetadatatagging andimprovedtaxonomy,tomoreindex-andcrawler-focusedsolutionssuchasiFiltersandconnectors. AlthoughportionsofthesesolutionsarecomposedofWebParts,theyalsotieintotheunderlying architectureandlayersofSharePointthattheuserdoesnotinterfacewithdirectly.Theynonetheless greatlyaffecthowusersinteractwithcontentandnavigateSharePoint.
CodePlexandOpenSource Whenfacedwithaneedbeyondtheout-of-the-boxcapabilitiesofaplatform,itiscommontolookto opensourcesolutions.Opensourcesoftwareisthatwhichprovidestheendproduct’ssourcematerials. Generally,opensourcesoftwareisprovidedatnocostinthepublicdomain,leadingtoitsattractiveness asafirststepforenhancements. CodePlexisMicrosoft’sopensourceprojecthostingwebsite.Thesiteprovidesamediumforpeople torequestprojectstobemadebyindependentdevelopers,sharetheirowndevelopmentswiththe public,findsolutionsalreadyintheworks,anddownloadsolutionsmadebyotherpeople.Thebestpart aboutCodePlexisthatallofthesolutionsanddownloadsarefree.CodePlexbringstogether programminghobbyists,professionaldeveloperswhowanttosharetheirskills,andthosenewto Microsofttechnologieswithaproblemtosolve.Thesiteprovidesamediumforthesepeopleto collaborateonprojectsanddistributetheirworkatnocost. ThereisavastrangeofprojectshostedthroughCodePlex,andthenumberisconstantly growing.Attheendof2010,CodePlexwashostingnearly20,000opensourceprojectsfortheMicrosoft community.ProjectsareusuallydrivenbyaneedtoaddpointsolutionstoMicrosofttechnologiesprior totheneedbeingaddressedbyMicrosoft.Forexample,MOSS2007didnotincludeasearchrefinement
416
CHAPTER11■SEARCHEXTENSIONS
WebPart.Sincetheabilitytorefinesearchresultsbymanagedpropertieswascommontomanyother searchtechnologies,andwidelypopularonwebsites,usersbeganrequestingthefeaturemoreand more.Eitherbyrequest,orontheirown,someonebeganworkingonasearchrefinementsolutionfor MOSS2007tomeetthisneed.Thefirstrelease(version1.0)ofthisMOSSFacetedSearchWebPartwasin September2007,anditwasdownloadedseveralhundredtimes. Overthecourseofthenextseveralmonths,thesolutionreceivedseveralupdatesfixingbugssuchas securitypolicyissuesandXMLformatting.Inearly2008,theprogrammer-releasedversion2.0ofthe MOSSFacetedSearchWebPartbroughtmanymajorfixestotheWebPartandextendeditsfeatures. Bugssuchasmalformedqueries,securityenhancements,anddisappearingfunctionswereaddressed. Newfeaturessuchasmulti-threadprocessing,faceticons,andtheabilitytoexcludecertainfacetswere added.InadditiontotheWebPart,version2.0includedguidestoconfigurationandstyling.The solutionbecameincreasinglypopular,withover15,000downloads.Version2.5wasreleasedinJuly 2008,aboutsixmonthsafterversion2.0.ItwastitledtobethefirstEnterprisereleasewithcontinuedbug fixesandthenewabilitytobeintegratedwiththeEnterpriseLibrary,supportforadvancedsearch, supportforlanguagerefinements,enhancederrorvisualization,andsupportfor“OR”queries.In January2009,theWebPartauthoruploadedversion3.0ofthesolution,butunfortunatelythesolution wasnotcomplete.Ayearlater,version3.0ofthesolutionhadstillnotbeenfixed,andthedownloadwas eventuallyrolledbacktoversion2.5. ThedevelopmenthistoryprovidesaperfectexampleofaprojectlifecycleforaCodePlexproject.It bringstolightthebenefitsandconcernsforusingopensourcesolutions.Thesolutionwasandstillis freetoanyonewhowouldliketouseit.Organizationsthatexperiencedsuccessful,bug-free deploymentsoftheWebParthadachancetobenefitfromasearchnavigationfeaturethatwasnot includedwithSharePointuntilthereleaseofSharePoint2010.Developmentofthesoftwarewastaken careofforthematnocost,andtheyonlyneededtoallocateresourcesforitsinstallationand configuration. OrganizationsthatimplementedoneoftheearlierreleasesoftheMOSSFacetedSearchWebPart neededtobemindfulofseveralbugsinthesoftware.SincethesolutionsavailableonCodePlexareopen source,organizationsthatexperiencedproblemswiththeWebPartcouldnotholdthedeveloper accountableforresolvingissues.Theycouldreportbugsinthereviewsection,ormessagetheauthor throughthewebsite’smessagingsystem,butdidnothaveaguaranteeforaction.Aswasseenwiththe 3.0release,continueddevelopmentofCodePlexprojectsisnotguaranteed,andorganizationsneedto becautiousofthesoftwareandversiondownloaded. Forsomeorganizations,usingopensourcesoftwareavailablethroughCodePlexisthebestsolution tocustomdevelopmentneeds.Generally,organizationsthatmeetthisprofilehavedevelopment resourcesin-house,anduseopensourcesolutionsasajumpstarttoin-housedevelopment.When properlyleveraged,somedeveloperscanbuildonopensourcesoftware,anduseittojumpstraightinto themoreadvancedstagesofdevelopment.Thisisacommonpracticeforconsultantsandsystem integratorswithlimitedsolutiondevelopmenttimelines.Companiesmayalsonothavebudgets allocatedtosoftwarepurchasesbeyondthebaseSharePoint2010platform.Thesecompaniescan leverageCodePlexprojectstoenhancetheirenvironmentwithoutadditionalsoftwarecosts.
417
CHAPTER11■SEARCHEXTENSIONS
GettingtheMostOutofYourOpenSourceProducts Itisimportanttofollowafewbestpracticeswhenusinganyopensourcesolution,includingthose availableonCodePlex.Mostimportantly,neverinstallopensourcesolutionsdirectlyintoalive productionenvironment.Whileitisneverrecommendedtotestsoftwareinproductionwithoutfirst deployingtoadevelopmentenvironment,therulemustbedrasticallystressedforopensourcesoftware. ThesesolutionsarenottestedbyMicrosoft,andasaresultshouldnotbeblindlytrustedtoworkwithout bugs.AproperQAtestcycleshouldalwaysbedoneonopensourcesolutionspriortoaddingthemintoa productionenvironment.Althoughtheymaybetime-consumingtoresolve,problemsresultingfrom softwaretestingindevelopmentdonotnecessarilystandasadetrimenttoanorganizationasawhole. Bycontrast,ifamajorproblemisfirstexperiencedinaproductionenvironment,theconsequencesare significantlymoresevere. BeforeinstallingadownloadfromCodePlex,readthereviewsanddiscussionsfortherelease.These arecommentsaddedbyotherswhohavedownloadedthesoftware.Reviewsaregenerallycomments aboutwhetherauserhadagoodorbadexperiencewiththesolutionandwhy.Discussionsprovide insightintoproblemsthatmaybeexperiencedwiththedownloadsothattheycanbeavoided.Problems maybeminororavoidable,butthesediscussionsaregenerallythebestknowledgebaseforgetting aheadofpotentialissueswhentesting.Theymayalsoprovideinsightintohowtomakecertain configurations. Attheendof2010,therewereabout300activeCodePlexprojectsaddressingneedsinSharePoint 2010.ThemostpopulardownloadistheSharePoint2010Manager,whichaddsaSharePointobject modelexplorer.ItgivesadministratorstheabilitytobrowseeverysiteonalocalSharePoint2010farm andvieweverymanagedpropertywithinthefarm.Italsoallowsadministratorstoupdatepropertiesand dataintheSharePointobjectmodeldirectlyfromoneconsolidatedexplorerviewthroughthetool.
■NoteTheSharePoint2010Managerprojectcanbefoundathttp://spm.codeplex.com/.
AdditionalSearchRelatedProjects Someadditionalsearch-relatedprojectsincludeaWildcardSearchWebPart,whichallowsforthe wildcardsyntaxtobeaddedimplicitlytoeveryquery.TheSharePointGoogleDirectionsWebPart (Figure11-1)allowsforfederatedqueriestoGoogleMapsinsteadofthedefaultGoogleWebSearch.This WebPartprovidesaqueryfieldinSharePoint2010forstartingandendingdirections,andwhen executed,thequeryisexecutedthroughGoogleMapsandreturnstheresultsinasecondbrowser window.
418
CHAPTER11■SEARCHEXTENSIONS
Figure11-1.CodePlexGoogleDirectionsWebPart TheSharePoint2010ManagedMetadataWebPartcreatesausernavigationcontrolfroma ManagedMetadatacolumnassignedtoalistorlibrary(Figure11-2).Thisallowsforusernavigationofa termsetrelatedtoacolumninalistorlibrary.
Figure11-2.CodePlexSharePoint2010ManagedMetadataWebPart
419
CHAPTER11■SEARCHEXTENSIONS
TheSharePointOutlookConnectormakesiteasiertouploade-mailsfromMicrosoftOutlookto SharePoint,andattachSharePointdocumentstoane-mailmessage(Figure11-3).Thisimprovesonthe standardprocess,whichrequiresuserstosavee-mailstotheirdesktopsbeforeuploadingthroughthe SharePointuserinterface.ItalsoallowsuserstobypasstheneedtodownloadSharePointdocumentsto alocaldrivebeforeattachingthemtoane-mail.
Figure11-3.CodePlexSharePointOutlookConnector
■NoteTheWebPartsmentionedinthissectioncanbefoundatthefollowinglinks. http://wildcardsearch2010.codeplex.com/ http://gileshgoogdirections.codeplex.com/ http://metadatawebpart.codeplex.com/ http://spoutlookconnector.codeplex.com/
420
CHAPTER11■SEARCHEXTENSIONS
TheseprojectsprovideageneralideaofthebroadrangeofsolutionsthatcanbefoundonCodePlex. Asneedsevolve,andSharePoint2010matures,manymoresolutionsandprojectswillappearonthesite overtime.WhileCodePlexisnottheonlyplacetofindopensourcesolutionsforSharePoint2010,itdoes housethemostabundantcollectionandisagoodplacetostartlookingforsolutions.
CommercialSolutions Therestofthischapterfocusesoncommerciallyavailablesolutions.Unlikeopensourceprojectssuchas thosefoundonCodePlex,solutionsmadeavailablethroughMicrosoftpartnersaregenerallywelltested andsupportedbythedevelopingvendor.Popularcommercialsolutionsbringthebenefitofstabilityand support,whichisvitaltoorganizationsthatrelyontheirSharePointdeployments.Reliablevendorscan beexpectedtoresolveproblemswhentheyariseandassistwithsuccessfulimplantations,unlikeopen sourceprojects,whichruntheriskofanynumberoffailuresorconsequencestoanenvironment.
UserInterfaceEnhancements Chapter5providedathoroughlookintotheSharePoint2010Searchuserinterface.Itoutlinedthemajor featuresandWebPartsthatareincludedwiththeplatform.Chapter8provideddetailsonhowtobuild customWebPartsintheeventthoseincludedwithSP2010donotmeetallofanorganization’sneeds.It may,however,beabetteroptiontosearchforcommerciallyobtainablesolutionstoenhancethesearch userinterface.Whilethisbookcouldnotcovertheentirescopeofeverypotentialadditiontothesearch userinterfacethatanorganizationmaywanttoutilize,thissectionattemptstopointoutsomeofthe mostfrequentlydeployedfeatures. Searchuserinterfaceenhancementsmayrangefromsimpleformattingandbrandingwithcustom XSLT,tocompletelynewnavigationalfunctionalitythatprovidesformorefluidnavigation.Usersmay complainthattheyarereturningtoomanyresultsinasearchresultset,andthattheSharePoint2010 searchrefinerWebPartisnotallowingthemtorefineontheirnecessaryproperties.Thismaybethe resultofpoormetadatasincethesearchrefinerWebPartissimplyallowingforpre-definedproperty restrictionstobeexecutedonthesearchresultset.Usersmayrecognizethatalthoughtheyknowa particularsuggestionshouldbeappearinginarefinementcategory,itisn’t.Thismaybebecausethe itemswiththepropertytheywanttousedonotappearuntillateintheresultset,andSharePoint2010’s searchrefinerWebPartconsidersonlythefirst50items.Theymaywanttoseehowmanyresultsare includedineachrefinementoption.Usersmaynoticethatwhiletheycannavigateintothesite refinementcategory,theycannotbacktrackwithoutstartingover.Thelistofrequestsforimprovement couldcontinue,and,dependingontheuser’sneeds,theyarevalidconsideringthelimitationsofjustthe searchrefinementWebPartincludedwiththeplatform.Thisdoesnotevenconsidertheadditional featuresusersmayrequestthatarenotevenwithinthescopeoftheWebPartsincludedwithSharePoint. SincethewayusersworkwithSharePointismanytimesquitedifferentthanhowsitedesigners originallyexpected,anyoneplanningaSharePointdeploymentshouldexpectdemandsfor improvements.Theuserinterfaceisgenerallythefirstpointofcomplainttobebroughttothedesign team’sattentionbecauseitistheonlylayerusersdirectlytouch.Unlikethecomponentsthatdrivethe userinterface,whenusersnoticesomethingwrongorafeaturetheywouldliketohave,thisistheonly layerwheretheymaybeabletoeasilyexpresstheirneeds.Ifmetadataortaxonomyispoor,users unfamiliarwiththetechnologyknowthereisanissue,butcanrarelyexpresstheexactproblem.By contrast,ifauserknowsheorsheneedsthesitetoincludeatagcloudliketheblogheorsheregularly visits,thatneedismoreeasilyverbalized.SharePointdesignersandadministratorsshouldbeprepared tohandletheseuserinterfaceneedsduringinitialtestingandwellafterarollout.
421
CHAPTER11■SEARCHEXTENSIONS
IndividualCommercialWebParts Tomeetthebroadandevolvingrangeofsearchuserinterfaceneeds,manyvendorshavebrought purchasablesolutionstomarket.TheindividualWebPartsavailablefromcompaniessuchasBamboo SolutionsandSharePointBoostprovideastartingpointformeetingspecificuserenhancementneeds. BambooSolutions,forexample,offersaListSearchWebPart.TheWebPartallowsuserstosearch multiplelistsatonce,andreturntheresultsbackintoasingleconsolidatedlist.InSharePoint2010,prior tothiscustomization,searchescanbedirectedateitheralllists,oronelistatatime,butcannot combineresultsfromseveralspecificlists.TheWebPartcanacceptthestandardSharePoint2010 BOOLEANoperatorsinaqueryandthenreturnresultswithcustomizedcolumnsandsorts.Aftersearch resultsarereturnedfromthelists,theusercanrearrangecolumnordersandprintthesearchresults. Thisfeaturehasanumberofreal-worldapplicationssuchassearchingforclientinformationscattered amongseverallistsorsearchingforaproductacrossseveralcataloglists.TheListSearchWebPartis availableinsimpleandadvancedversionsthatcatertodifferentcustomizationneeds.Thefeaturesof eachoptioncanbefoundinTable11-1. Table11-1.BambooSolutionsListSearchWebPartFeatures
Feature Specifythelisttobesearched,viewtousetodisplaythesearchresults,andthe fieldswithinthelisttomakeavailableforuseassearchcriteria Specifyasetofliststobeavailablefortheusertoselectfromforsearching
Simple
Advanced
XX
Constrainasearchtoasinglelistwithouthavingtocreateanindexandsearch scope
XX
Displaysearchresulthitsbyindividuallistitem
X
Identifyaviewassociatedwiththelisttousetodisplaythesearchresults,allowing thedesignertospecificallydefinethelookandfeelofthesearchresultslist, includingcolumnsandsorts
XX
X
X
AND/ORoperatorstobeincludedinthesearchcriteria
X
Groupsearchresults
X
AllowsusertoselectALLorANYwordstojoinsearchcolumns
X
X
Abilitytorearrangesearchresultscolumnorder
X
X
Abilitytoprintsearchresults
X
X
422
CHAPTER11■SEARCHEXTENSIONS
Feature
Simple
Advanced
Abilitytosearchkeywordsinalllistcolumns
X
X
Usershavetheoptiontoselectavailablelists
X
DisablelookupfieldstocontrolWebPartperformance
X
TranslatetheWebPartintoEnglish,French,German,orSpanish,orcustomize translationforthelanguageyouneed
XX
CustomizethelookandfeeloftheWebPartbymodifyingtheHTMLSourceand CSS
X
Unlikeopensourcesolutions,suchasthosefoundonCodePlex,thesesolutionsaretestedand supported.Whilecautionshouldalwaysbeusedwhethertestingnewfeaturesfromopensource, Microsoft,orothercommercialvendors,asignificantlygreatertrustcanbeputintowell-reviewed commercialsolutions.Althoughcommercialsolutionsmayrequireaninitialfinancialinvestment,when comparedwiththecostsoffixingbrokensolutionsorrepairingacrashedSharePointportal,the investmentiseasilyjustifiedinmostcases.Formostenvironments,thecostoflostproductivityduetoa portalcrashdwarfsthecostofsoftwarelicensing.IndividualWebPartsaregenerallyavailableatafairly lowcostandcanbeobtainedthroughanonlinepurchasesystem.Althoughallvendorsinthisspace havedifferentpricestructures,straightforwardWebPartscanbeexpectedtocostlessthanUS$1,000.
■NoteFulldetailsontheListSearchWebPartavailablefromBambooSolutionscanbefoundat http://store.bamboosolutions.com/pc-35-1-list-search-web-part.aspx.
Forenvironmentsthatrequiremorecomplexenhancementstothesearchuserinterface,thereare manyothersolutionpackagesonthemarket.Thesesolutionsusuallyincludeabroadrangeofsearch enhancementsincludingvariousfeaturesforrefiningsearchresults,suggestingalternativequeries, takingactiononresults,enteringmoreadvancedqueries,orintegratingsearchintootherbusiness processes.ThesesolutionsetsincludeapackageofWebPartstodirectlyenhancetheuserexperience, butmayalsoaddadditionalfunctionssuchasdatabasesforanalyticsorworkflowsforsearch-based processes.Theycanalsobecategorizedintotwodistinctlydifferentparadigms:thosethatextend SharePointsearch,andthosethatreplaceit.Thesecondoftheseoptionsisreviewedlaterinthis chapter.
423
CHAPTER11■SEARCHEXTENSIONS
ComprehensiveCommercialSearchExtensions ExtensionsthatdirectlyexpandthesearchfunctionalityofSharePoint2010areofferedinsolutionssuch asSurfRay’sOntolicaSearchandBAInsight’sLongitude.Searchextensionsofthiskindcansitontopof SharePoint2010andleveragethesearcharchitecturethatisalreadyinplace.Thisprovidesforsome benefitsanddownsideswhencomparedwiththemorewell-known“enterprise”searchsolutionssuch asFAST,Google,andAutonomy.ByutilizingSharePoint2010’ssearchpipeline,administratorsneedto manageonlyonecrawlerandindex.Thiskeepsmanagementinoneconsolidatedinterface,insteadof spreadingjobsoutbetweenseveraldifferentsearchsolutions.Fororganizationswithoutextra expendableemployeehourseachweek,thetimesavednothavingtomanagetwosetsofphysicaland softwarearchitectureisinvaluable.Inaddition,byusingonlyenhancementsthatdirectlybuildontopof SharePoint,securityandpermissionsarepreserved.Fororganizationswithstrictsecurityandprivacy concerns,theavoidanceofmanagingadditionalpermissionsetsiscriticaltocontrollingavailabilityof restrictedinformation.
OntolicaSearch OntolicaSearch,theSharePointsearchextensionofferedbyMicrosoftpartnerSurfRay,canaddabroad rangeofadditionalsearchfeaturestoaSharePointenvironment.UnliketheindividualWebPartsoffered byvendorssuchasBambooSolutions,whichmeetonespecificneed,OntolicaSearchaddressesa broaderneedforsearchimprovements.AllofthefeaturesinOntolicarelyontheSharePointsearch engine.TheypassqueriestoSharePoint,retrieveinformation,displaythatinformationtousers,and allowmanipulationofthereturneddata.Whilethereareadditionalfunctionalitiesinthesolution, searchfeaturescanbecategorizedasfocusingonthefourmainareas. •
Fasteraccesstoinformation
•
Refinementstofilterresultstothemostrelevantitems
•
Actionableresultstofacilitatebusinessprocesses
•
Experiencepopulatedsuggestionsforqueryadjustments
AccessingInformationQuickly OntolicaSearchconnectsuserswithinformationfasterfromanypagewithaquerybox.While SharePoint2010includestheabilitytoenablequeryboxestopresentthesaurus-generatedsuggestions, thissolutioncanprovidealistofthetopsearchresultsfortheenteredquery.Asauserentersaquery, OntolicaSearchreturnsalistofthemostrelevantresults,whichcanthenbeactioned(Figure11-4).This allowsuserstocheckoutthemorerelevantitemsdirectlyfromthepagetheyareonwithoutever navigatingtothesearchcenter.
424
CHAPTER11■SEARCHEXTENSIONS
Figure11-4.OntolicaSearchAsYouTypefeature
EnhancedRefinements Whenitcomestothesearchcenter,usersfindabroadrangeofadditionalrefinementoptionsbeyond thoseavailablewithSharePoint2010.ThesearchrefinerWebParthasbeenupgradedtopresentthe numberofresultsineachrefinementsuggestion(Figure11-5).Thesiterefinercategoryallowsusersto drillinandbackoutoftaxonomiesusingabreadcrumbnavigator.Also,possiblymostimportant,the refinementscananalyzeupto2,000itemsinaresultsetinsteadofjustthefirst500.
425
CHAPTER11■SEARCHEXTENSIONS
Figure11-5.OntolicasearchrefinerWebPart InadditiontothesearchrefinerWebPart,OntolicaSearchalsoaddstheabilitytorearrangesearch resultsandgroupthembymanagedproperties.UnlikethesearchrefinerWebPart,whichallowsusers toselectonepropertyfromaresultset,thisoptionallowsuserstoseemultiplepropertiesbutskippast thosethatareirrelevant.Finally,thesolutionprovidestheabilityforadministratorstosetupquick filters.Theseareradiobuttonsorcheckboxesbelowthequeryfieldthatallowuserstoselectpre-defined combinationsofpropertyrestrictions.SharePointadministratorscancustomizethesetoofferusersan alternativetobuildingcommonpropertyrestrictionsontheadvancedsearchpage.Thesefeaturescan beseeninthefollowingfigureofanuncustomizedOntolicasearchcenteronSharePoint2010(Figure 11-6).
426
CHAPTER11■SEARCHEXTENSIONS
Figure11-6.OntolicasearchcenteronSharePoint2010
ActionableResults ActionableitemsanddocumentsareacommonfeaturethroughoutSharePoint,buttheabilityislacking insearch.OntolicaSearchprovidesadrop-downonsearchresultssothatuserscanexecuteactionson them(Figure11-7).ThedefaultactiontakenwhenclickingdifferentsearchresulttypesinSharePoint 2010wasdiscussedinChapter5.Thisdrop-downprovidesabroaderrangeofdefaultactions,suchas theabilitytocheckoutMicrosoftOfficedocumentsdirectlyfromthesearchresultspage,settingalerts onindividualresultsinsteadofentireresultsets,andexecutingane-mailcontainingtheitem’slink throughMicrosoftOutlook.Inadditiontothesedefaultactions,customactions,processes,and workflowscanbeadded.
427
CHAPTER11■SEARCHEXTENSIONS
Figure11-7.Ontolicasearchresultactions
QuerySuggestions ThefinalfocusofOntolicaSearchistoprovideexperience-drivenquerysuggestions.Onthebackend, OntolicaSearchcontainsabusinessintelligencedatabasecubethatgathersawiderangeofstatistical datafromtheSharePointfarm.ThisdataisgatheredfromIISlogs,CentralAdminlogs,andlogsfromthe useofthetoolitself.Ontolicathenprocessesthisdataandmakesitavailablethroughawiderangeof statisticreports,suchasthemostpopularsearchterms,queriesthatreturnednoresultsordidnotresult inauserclickingaresult,andstoragetrends.Thisinformationcanbeusedforawiderangeofbusiness intelligence,marketing,andsearchengineoptimizationneeds.Itisalsousedtopresentquery suggestionstoendusers. OntolicaSearchpresentssuggestionsinthreeformats,whichincludeautosuggestionsinthequery field,relatedqueries,andatagcloudWebPart.Whenauserisexecutingasearchqueryinthesearch center,theautosuggestfeatureprovidesadrop-downofquerysuggestionssimilartotheSharePoint 2010Searchsuggestions.TherelatedqueryWebPartandtagcloudWebPartsguideuserstoadditional queriesthatmaybeuseful.JustlikeSharePoint2010,thesesuggestionsarebasedontheaggregated experiencesofusers.WherethesesuggestionfeaturesdifferfromSharePoint2010isinthescopeof suggestions.SharePoint2010canprovidesuggestionsbasedonlyontheexperiencesofalluserswithin thefarm.Ontolica’ssuggestionfeatures,however,canbeisolatedtoasearchcenter,theuser’s department,ortheentirecompany.Thismeansthatuserscanreceivesearchsuggestionsbasedoffof theexperiencesofusersintheirowndepartment,anddonothavetoreceivesuggestionsbasedoffofthe entirecompany.Thisisquitepracticalinthatthetypesofqueriesdonebypeopleinthesales departmentaremostlikelyverydifferentfromthoseexecutedbytheHRdepartment.Suggestionsare notclutteredwiththosehelpfulonlytousersinotherdepartments.
428
CHAPTER11■SEARCHEXTENSIONS
CustomizeSearchwithoutProgramming Inadditiontoaddingabroadrangeofadditionalrefinement,action,andsuggestionfeaturesto SharePoint2010,Ontolicahelpsovercomethecomplicationsofcustomizingthesearchexperience. Ontolica’sfeaturesareeasilycustomizableandasstatedpreviously,canallbesettocatertospecificuser groups,evenwithonlyonesearchcenter.Forexample,usersfromtheHumanResources,Marketing, andEngineeringdepartmentsrequireverydifferentexperiencesfromsearch.Togiveeachofthese departmentsadifferentsearchexperienceinSharePoint,separatesearchpageswouldneedtobe createdandmaintainedforeachdepartment.WithOntolicahowever,userscanallaccessthesame searchpagebutreceivedcustomizedrefinements,searchsuggestions,andrelevancy. Ontolicaalsoprovidesadministratorswithsimpletoolstoleveragemetadataandexposeitinthe searchUIwithoutanycustomdevelopment.Forexample,customizationssuchasaddingnewsearch refinersforcustompropertiesorevenanewsearchfieldontheadvancedsearchpagecanbemadeby non-technicaladministrators.Thefollowingtablesummarizesthemajordifferencesbetween SharePoint2010andOntolicaSearch. Table11-2.SharePoint2010andOntolicaSearchFeatureComparison
Feature
SharePoint 2010
Ontolica Search
BooleanSearch(AND,OR,NOT,NEAR)
X
X
WildcardSearch(*)
X
X
X
Accuracyindexlimit
500items
2,000items
QuerySuggestions
X
X
X
X
X
AudienceTargetedRelatedQueries
X
TagCloudWebPart
X
X
X
X
X
X
ImageSearch
X
VisualBestBets
X
Numberedrefinerswithexactcounts
AudienceTargetedQuerySuggestions RelatedQueries
"DidYouMean"RelatedContent SearchAsYouType AdvancedPeopleSearch
429
CHAPTER11■SEARCHEXTENSIONS
Continued
Feature
SharePoint 2010
Ontolica Search
Userselectedresultsortingmodels
Limited
X
SearchResultGrouping(Clustering)
X
SearchResultActionMenus
X
AudienceTargetingforallwebparts
X
Customizationwithoutprogramming
X
VendorNotes Manyvendors,includingBambooSolutionsandSurfRay,offerfreetrialsoftheirsolutions.Thisallows fortestingpriortoapurchase.Makesuretoallocateappropriatetimeforsetupofthesolutionsduring testing.Askvendorsabouttheinstallation,setup,andcustomizationtimeneededsothatrealistictime resourcescanbededicated.Itisalsorecommendedtodoresearchontheexperiencesofotherswho havetestedproductsasvendorestimatesmaybeforbest-casescenarios,andnotthenorm.Whilefirsthandexperiencesarethebestjudge,investigatingtheexperiencesofothersmayuncoverproblemswith solutionsthatmaynotbeimmediatelyapparent. Takenoteofsystemresourcerequirementsandothersecondarycosts.Manysolutions,especially thosereviewedlaterinthischapter,requirelargeamountsofsetuptime,regularmaintenance, professionalservices,andadditionalhardwarethatcanrapidlyincreasecostsandtimedemands.Asking therightquestionsanddoingsufficientresearchwillhelptopaintafullpictureoftherealcosts associatedwiththesoftwareandtheamountoftimeneededtomaintainitafterrollout. Askuserswhattheywouldliketoseeimproved.Whilethisshouldseemobvious,manytimes technicalteamsrunoffoftheassumptionsofwhatneedstobeimprovedwithoutdirectlyaskingthose affected.Whileusersmaynotbeabletoverbalizeasolution,theycanexpresstheirproblems.Ifusers complainthattheygettoomanyresultsintheirsearchresultset,lookintoimprovementsinscopes, filteringcapability,andduplicates.Ifuserscomplainthattheycan’tfinditemstheyknowexist,lookinto improvementsintagging,iFilters,permissions,andcontentsources.Hereareafewquestionsthatare essentialtodeterminingtheimprovementsthatwillresolverealfindabilityproblems. •
430
Areusersseeingtoomanyirrelevantresultshighintheirsearchresultset?Ifthisis thecase,consideraddingacustomsortingoptionsothatuserscanshuffleresults basedonthepropertiesthatareimportanttothem.Setupadditionalmanaged properties,andmakethefieldsrequiredtocompletewhenusersuploadnew itemstoSharePoint.Addadditionalrefinersbasedonthemanagedpropertiesthat aremostwidelyused.Leveragethird-partyWebPartsthatprovideresultsbased onusercontextoraddadditionalrefinementcapabilities.Createmorespecific documentlibraries,andcreateprocessesthatmakeusersuploadtheirdocuments intotheirrelevantlibraries.Createscopesforuserstosearchagainstspecific contentlibraries.
CHAPTER11■SEARCHEXTENSIONS
•
Areusersunabletofinditemsinsearchthattheyknowexist?Itisfirstimportantto checkthatthelocationofthecontentisaccessibletoSharePointsearch.Full detailsonhowtodothisareprovidedinChapter3.Itisthennecessarytomake surethecontentofthedesireditemissearchable.Thecontentofcertainfiletypes, suchasPDFs,isnotaccessibletoSharePoint’sindexwithouttheappropriate iFilter.MakesurethatanynecessaryiFiltersareinstalledandworking.If SharePointisabletocorrectlyindexitemsandtheyarestillnotappearingtousers, checktheitems’managedproperties.SharePointplacesalargeweighton managedpropertieswhendeterminingrelevancy.Addingmoredefined propertiesandclarifyingambiguitygreatlyincreasesSharePointsearchrelevancy. Thiscanbedonemanuallyorwiththird-partyclassificationsolutions.Ifusersare usingkeywordsthatarenotwithinthecontentorpropertiesofadocument,create synonymstotietheirquerytermstokeywordsassociatedwiththedocument.For frequentlyrequireditems,setupabestbetforquerytermsthatpromotetheitem toappearatthetopofasearchresultset.
•
Areusersfindingitemstheyshouldn’tbeabletoview?Checkthatuserpermissions havebeencorrectlyestablished.Makesureonlythoseuserswhoshouldhave clearancetocertainsites,contenttypes,andcontentsourcesaresettoaccess restrictedcontent.ThismaybeaproblemwithLDAPorActiveDirectorysecurity. Ifpermissionsaresetcorrectly,makesurethatsensitivedocumentsarecorrectly taggedasrestrictedcontenttypes.Thiscanbedonemanuallyorwithautoclassificationtoolssuchasthosereviewedlaterinthischapter.
Finally,itisalwaysimportantforrealuserstogohands-onwithsolutionspriortoproduction rollouts.Improvementsaremuchhardertomakeonceasolutionhasgonelive.Setupadevelopment environmentthatmirrorsproduction,andhaverealusersworkonitforaweek.Askthemforfeedback onimprovementsandusetheadvice.Ifimprovementsarerequestedwithasmalltestgroup,the complaintscanbeexpectedtobecompoundedonaproductionrollout.
Visualization VisualizationofdocumentshasseenadrasticincreaseinpopularitysincethereleaseofMOSS2007. Usersdemandingfasterrecognitionofdocumentshavefueledthedevelopmentofsolutionsthatshow themtheirdocumentsbeforetherequirementtotakeactiononthem.Thissetoffunctionalitycannow befoundonGoogle’swebpagepreview,Bing’svisualsearch,andevenWindowsExplorer’spreview pane.Asuserstakeholdofthisconceptanduseitintheirpersonallives,itissafetoexpectthattheywill begintodemanditintheirbusinessenvironment. Whilesearchvisualizationisalsoasearchuserinterfaceimprovement,thefeatureissopopularthat itrequiresitsownfocus.Microsofthastakennoteoftheneedforuserstoquicklydifferentiatebetween documentsfromwhateverprogramtheyareusing.TheWindowsExplorerpreviewpanewasfirst introducedinWindowsVista,andreceivedvastimprovementsinWindows7.Thisfeatureisextremely usefulinthatusersseethecontentofafilewithouttheneedtoopenaspecializedapplication. Unfortunately,MicrosoftdidnotdecidetoincludethisfeatureinSharePoint2010withouttheFAST SearchServerforSharePoint2010add-on.Thisfeatureundoubtedlybroadensthegapbetween SharePoint2010andtheenterpriseadd-ondiscussedlaterinthischapter.
431
CHAPTER11■SEARCHEXTENSIONS
ScanningOptions ThepopularityofthevisualizationfeaturehasnotgoneunnoticedbyMicrosoftpartners.Thereare severalvendorswithsolutionsbuilttoadddocumentpreviewfunctionalityintoSharePoint2010.The availablevisualizationsolutionsgreatlyrangeintheneedstheyaddress.Forexample,KnowledgeLake’s ImagingforSharePointproductassistswithscanningdocumentsintoSharePoint,searchingscanned-in unstructuredcontent,andviewingscanneddocumentsdirectlyinSharePoint.ItaddsaSilverlight-based viewertoviewcommondocumenttypessuchasOfficedocuments,PDFs,andmostimagefiles.It focusesonthetimeittakesfororganizationstostoreandprocesslargeamountsofpaperdata. KnowledgeLake’ssolutionsaredesignedtoaddressboththeinputandretrievalofdocumentsin SharePoint.Thisfeaturesetisextremelyusefulfororganizationswithlargeamountsofpaper documentstomanagesuchasthoseinthelegal,healthcare,financialservices,utility,andinsurance verticals.Forthesetypesofcompanies,theabilitytotransferpaperdocumentsintodigitalfilesthatcan bemoreeasilystored,organized,andretrievedisaparadigm-shiftingsolutiontooldproblems.
LightweightDocumentViewers Othersolutions,suchasAtalasoft’sVizit,BA-Insight’sLongitude,andSurfRay’sOntolicaPreview,take slightlydifferentapproachestoSharePointdocumentviewingandimaging.LikeWindowsExplorer’s previewpane,theseproductsembedalightweightdocumentviewertoquicklyviewfilesinthe SharePointbrowser(Figure11-8).Theyenableuserstoviewfull-pagedocumentsandcomparefiles directlyfromlistsandsearchresults. OntolicaPreviewisprimarilydesignedtocatertosearch.Unlikeothervisualizationsolutions, OntolicaPreviewgoesbeyondsimplydisplayingfilesinthebrowser.Ithastheabilitytounderstandthe unstructureddatawithindocuments,andconnectthiscontenttosearchqueries.Thesolutioncan understandtheuser’ssearchquery,cross-referenceitwithatargetfile,andhighlighttheoccurrencesof termsfromasearchquerywithinthedocument.OntolicaPreviewquicklyguidesuserstothe informationtheyarelookingforwithinadocumentbynotingthepageswherequerytermsappearmost frequently,anddisplayshigh-resolutionpreviewsofpageswiththehighlightedkeywords.
432
CHAPTER11■SEARCHEXTENSIONS
Figure11-8.OntolicaPreview
OtherOptions Athirdoption,Vizit,takessomenotesfromKnowledgeLakeImagingandOntolicaPreview.Itprovides somescanningability,butnotnearlytheextensivescanningfeaturesprovidedbyKnowledgeLake.Vizit provideslightweightpreviewsandtheabilitytocomparedocuments,butdoesnotpresentpreviews withhithighlightingandrelevantpages.Itdoes,however,providetheabilitytoannotatedocuments andcleanthemliketheKnowledgeLakeproduct.Eachoftheseproductsmeetsaslightlydifferentrange ofvisualizationneedsinSharePoint.Thebestsolutionforoneorganizationmaynotbesoforanother.It isimportanttoanalyzetheneedsofusers,andselecttheenhancementthatbestfitstheirneeds,budget, andthecomplexitiestheorganizationispreparedtohandle.
ChoosingtheBestOption Table11-3providesahigh-leveloverviewoftheviewingfeaturesprovidedbyeachsolution.Thisdoes notreferenceeveryfeature,asallthreesolutionsdoofferadditionalsearchandscanning.Forfulldetails andup-to-dateinformationonproductimprovements,itisalwaysbesttocontacteachvendordirectly.
433
CHAPTER11■SEARCHEXTENSIONS
Table11-3.VisualizationProductComparison
Product Feature
KnowledgeLake Imaging
Ontolica Preview
Vizit Pro
X
X
X
X
X
X
X
X
X
Viewmultipledocumentsatonce
X
X
X
Viewdocumentsets
X
X
X
Searchqueryhighlightingwithinpreviews
X
Linkstorelevantpagebasedonsearchqueries
X
Zoominandoutorfit-to-widthviewing
X
Rotateandflipdocuments
X
Abilityto“findsimilar”withembeddedsearching
X
Viewpagesofdocumentsimmediatelywithoutwaitingforthe entiredocumenttodownload
XX
X
Annotatedocumentsusingtext,imagestamps,highlights,lines, andstickynotes(TIFF/PDFonly)
X
X
Cleanupdocumentswithborderremoval,pagede-skew,and holepunchremoval
X
Rearrangepagesandremovepagesfromdocuments
X
Splitdocumentsormergedifferentdocumentstogether
X
EncryptselectivepagesandportionsofPDFandTIFFfiles
X
ScanandindexdocumentswithouteverleavingtheSharePoint interface
X
X
ViewormodifySharePointcolumnpropertieswithaccess controlledbySharePointsecurity
X
X
Automaticpopulationofmetadatafromscanneddocuments
X
SupportforOfficedocuments,PDF,andrasterimageformats Supportforvectorimage,archive,anddatabaseformats Full-pagedocumentviewing Thumbnailviewsofdocuments
434
CHAPTER11■SEARCHEXTENSIONS
■NoteTheproductslistedinthissectioncanbefoundatthefollowinglocations. www.knowledgelake.com http://surfray.com/ www.atalasoft.com/products/vizit
iFilters NotallfiletypescanbecrawledbySharePoint2010outofthebox.Toexpandthesupportedfiletypes, MicrosoftdevelopediFilters,whichactasplug-insfortheWindowsoperatingsystem.iFiltersallow SharePointtoindexfileformatssothattheyareunderstoodbythesearchengineandaresearchable. WithoutanappropriateiFilter,SharePointcannotunderstandthecontentoffilesandsearchwithin them.iFiltersallowtheindextounderstandthefile’sformat,filteroutembeddedformatting,minetext fromthefile,andreturnittothesearchengine. ThesubjectofiFilterswasfirstintroducedinChapter1.Chapter3doveintotheconceptinmore detail,andprovidedathoroughwalkthroughdetailingtheinstallationofAdobe’sPDFiFilter,andthe RTFiFilteravailablefromMicrosoft.WhilethesewalkthroughsinChapter3providedthestepsfor settingupiFilters,theyfocusedonlyonthesetwofileformats.Therearehundredsofotherfileformats thatorganizationsmayneedtoindexwithSharePoint2010. iFiltersareavailableformostmajorfiletypesthroughavarietyofvendors.Inaddition,thereare usuallyseveralvendorsofferingiFiltersforthesamefiletype.NotalliFiltersworkthesame,and dependingontheamountofcontentbeingcrawledthatincludesfiletypesrequiringaniFilter,crawl performancemaybedrasticallydifferentdependingontheinstallediFilter.SloweriFiltersresultin slowercrawltimesinceSharePoint’sindextakeslongertounderstandthecontentoffiles.ThePDF iFilter,forexample,isundoubtedlythemostfrequentlyimplementediFilter.Thecrawltimeforthethree mostpopularPDFiFilterscanbefoundinFigure11-9.
435
CHAPTER11■SEARCHEXTENSIONS
PDF iFilter Crawl Time 9:36:00 7:12:00 4:48:00 2:24:00 0:00:00
PDF iFilter Crawl Time (h:m:s)
Figure11-9.PDFiFiltercrawltimes
■NoteCrawltimecomparisonisbasedonadatasetof22,559PDFfilesin84folders,15.7GBofdatatotal.Full detailsonthetestingresultinginthiscomparisoncanbefoundathttp://blogs.msdn.com/b/opal/archive/ 2010/02/09/pdf-ifilter-test-with-sharepoint-2010.aspx.
WhileAdobedoesofferaPDFiFilteratnocost,itisnotthemostefficientsolution.Severalthirdpartyvendors,suchasIFilterShop,Foxit,andPDFlib,offertheirownversionsofaPDFiFilter.Themost popularismostlikelytheFoxitPDFiFilter2.0,which,accordingtoMicrosoftspeedtests,works39times fasterthanthefreeAdobeoffering.Themostsignificantcrawlspeeddifferencescanbefoundon machineswithmulti-coreprocessors,asFoxit’siFiltermakesefficientuseofmulti-threadingsupport.In additiontobeingthefastestPDFiFilteravailable,unlikeAdobe’siFilter,Foxitprovides24/7technical supportfortheirproduct.AlsowhileAdobe’sPDFiFiltercanindexpagecontentsandfileattributes, Foxit’sPDFiFiltercanalsoindexPDFbookmarksandPDFattachments.ThelicensecostfortheFoxit PDFiFilter2.0isaroundUS$700andUS$100forannualmaintenanceperproductionserver.NonproductionserverscostUS$450perserver.AfeaturecomparisonofthePDFiFiltersavailablefrom Adobe,PDFlib,andFoxitisshowninTable11-4.
436
CHAPTER11■SEARCHEXTENSIONS
Table11-4.PDFiFilterFeatureComparison
Product Feature
Foxit PDF iFilter
PDFlib TET PDF iFilter
Adobe iFilter
ExtractPDFcontent
X
X
X
ExtractPDFattributes
X
X
X
ExtractPDFbookmark
X
X
ExtractPDFattachments
X
X
Addlogsettings
X
X
Some
Yes
Some
X
Faster
Slow
ExtractPDFmetadata IndexesXMPimagemetadata PerformanceFastest
■NoteMoreinformationaboutthePDFiFiltersreferencedinthissectioncanbefoundatthefollowinglocations. www.foxitsoftware.com/ www.adobe.com/support/downloads/detail.jsp?ftpID=4025 www.pdflib.com/products/tet-pdf-ifilter/?gclid=CPrc6cbv5aUCFYXD7QodJHeC1A www.ifiltershop.com/
InadditiontoindexingPDFfiletypes,organizationsmayneedtoworkwithcountlessadditional documenttypes.Companiesthatfocusonengineering,manufacturing,ordesignmayneedtoindex DWG-formatCADfiles,forexample.VendorssuchasIFilterShopandRansdell&Brown,Inc.offer iFiltersthatsupportthis.IFilterShopalsooffersawiderangeofadditionaliFilterssuchasASPX,MSG, MicrosoftProject,PostScript,RAR&ZIParchives,vCard,WindowsMediaAudioandVideo,andAdobe XMP.WhilethesearejustafewofthevendorsthatofferiFilters,thereisanentirecommunityof developersandconsultantsdedicatedtoenhancingMicrosofttechnologies.Askfortheiradvice,consult theforumsofthecompanythatproducesthecontenttype,andcomparesolutions.Nomatterthe environment’scontentneeds,thereismostlikelyasolutionavailable.
437
CHAPTER11■SEARCHEXTENSIONS
■NoteMoreinformationabouttheiFiltersreferencedinthissectioncanbefoundatthefollowinglocations. www.dwgindex.com/DWGFilter.html www.ifiltershop.com/
Taxonomy,Ontology,andMetadataManagement ForthosenewtoSharePoint,orevenknowledgemanagementsystems,thetermstaxonomyand ontologyareprobablytiedtoexperiencesinabiologyclass.Taxonomyisthepracticeandscienceof classification.Originallyusedtoclassifyorganisms,theuseoftaxonomieshasspreadtoclassifying thingsandconceptsbyunderlyingprinciples.Taxonomiescanbeseenintheorganizationofcompanies withanorganizationalchart.Organizationalchartsclassifypeoplebywhotheyworkwith,whothey workfor,andwhoworksforthem.Taxonomiescanbefoundincompanyproductcatalogs.Acompany maysellshoes,butitmayclassifythemintogroupssuchassize,gender,season,orcolor.Eachofthese propertiesisconsideredtobeanode,andalloftheshoesarecatalogedintooneormorenodes.Amore expandedtaxonomymaycontainseveralsubsetsforeachnode.Forexample,tocreatemoreaccurate groupings,shoesmayfirstbegroupedbygender,andthenbyseason.Taxonomiesallowforinformation tobeorganizedintoahierarchicalstructuresothatitiseasiertomanageandunderstand. Whilesimilarinconcept,ontologiesareabitbroaderthantaxonomies,astheyapplyalargerand morecomplexwebofrelationshipsbetweeninformation.Ontologyisaformalconnectionofknowledge andconnectingconceptswithinadomain.Insteadofsimplygroupinginformationtogetherintosilos, ontologiesdefinerelationshipsbetweenindividualitems.Ontologiesarethefoundationofenterprise architectureand,asaresult,vitaltotheabilitytocatalogandunderstandinformationwithinSharePoint. Althoughtaxonomiesandontologiesarenottheonlykeytosearch,theyareasignificantbuilding blockforeffectivenavigation.Withoutrelationshipsbetweendocuments,teams,people,andsites, SharePoint2010wouldbeavastblobofcontentwithoutanyframework.Searchingformanaged propertieswouldwork,butSharePointwouldn’tbeabletounderstandthedifferencebetweenthe propertythatdefinesafileasaPDFandtheonethatdefinesitsauthor.Userscouldnotscopesearches tospecificsitesbecausesitesaretaxonomicsilosofinformation.Searchescouldbeexecutedforpeople, butuserscouldnotseeorganizationchartsorthedocumentstheycreated. SharePoint2010makessignificantimprovementsoveritspredecessorintaxonomymanagement. MOSS2007didnotprovidetaxonomymanagementtools,and,asaresult,managingschemasand classifyingcontentagainstthemwasdifficulttoimpossible.Taxonomiescouldbedesignedonlywith verylimitednodesandsubsets.Thesesetbacksresultedinpotentiallyoversimplifiedtaxonomic structure.SharePoint2010,bycontrast,providesapowerfultoolsetforcreatingandmanaging taxonomicstructures.ThishelpsorganizationsleverageSharePointforthebackboneoftheircataloging andknowledgemanagementneeds.
438
CHAPTER11■SEARCHEXTENSIONS
AutomatedClassification Buildingtaxonomiesisonlyhalfofthesolution.WhileSharePoint2010allowsforthetaxonomic structuretobedesigned,itfallsshortofautomaticmechanismsforclassifyingitemsintothetaxonomy. Farmstructurescanbebuilt,butitemscannoteasilybeorganizedintothestructure.Featuresarein placeforusersandadministratorstomanuallyassigndocumentsintotaxonomicstructuresandtag themwithmetadata,butthisprocesscanbecumbersomeandinaccurate.Unfortunately,peopleare inefficientandinaccurateattaggingitems.Toooften,generaltermssuchasmeetingnotes,salesreport, policies,andmanualaretaggedtolargeamountsofunrelateddocumentsbyusers,whichdilutesthe specificsoftheitem.Itisextremelycommontofindthenameofthecompanythatownstheportalon documents.IfanemployeeofthecompanyAmericanNinjasAssociatedsearchesforthetermNinja, theyareprobablygoingtoreturnamassiveamountofirrelevantresultsbecausethecompanynamewas taggedasmetadata.Infact,themostrelevantmetadatainmostenvironmentsistheproperties SharePointautomaticallycreatessuchasauthor,filetype,anduploaddate. Becausethesearchengineheavilyreliesonmetadataforrefinementsandrelevancy,theefficiency ofsearchisdirectlyaffectedbythequalityofmetadata.Ifitemsareincorrectlytaggedorstoredinthe wronglocation,theycannotbefoundinsearch.Organizationsmayseektoimprovesearchrelevancyby creatingmorethoroughdocumentuploadprocessesthatrequestmorespecificinformationand providingbettertrainingonwhattoincludeindocumenttags.Theseoptionsstillrelyontheinaccuracy ofpeopleandtheiropinionsinsteadofstrictlydesignedrulesandontology.AlthoughSharePoint2010 cannotautomaticallyaddmostmetadatatoitems,thereareseveralMicrosoftpartnerswith commerciallyavailablesolutionstoassist.Thereareseveralwell-establishedsolutionstohelpautoclassifySharePointdata,suchasSmartlogic’sSemaphore,MetaVis’sCLASSIFIER,andConcept Searching’sconceptClassifier.
conceptClassifier ConceptSearching’sconceptClassifiercanautomaticallyclassifycontentinSharePoint2010againstany availabletaxonomy.ItintegrateswiththeSharePoint2010TermStoreandcanprocessanycontentthat isindexedbySharePoint.Itthenappliesconceptualmetadatatocontentandauto-classifiesittothe TermStoremetadatamodel.ThemetadataitproducesisthenstoredasSharePointproperties. Authorizeduserscanview,manipulate,andaddadditionaltagsasnecessaryusingaformthatintegrates withthestandardSharePoint2010WebParts.Thisgreatlyreducesthetimeresourcesandinaccuracies thatcomewithmanualtagging. TheTaxonomyManagercomponentprovidestheabilitytogetinstantfeedbackandautomatic suggestionsfortermsfromtheclient’sowncontenttoautomatethetermcreationandbuildingthe hierarchicalmodel.Management,testing,andvalidationaredoneinconceptClassifier,andtermsare writtenbackintotheTermStoreinrealtime. Figure11-10showstheconceptClassifierTaxonomyManagercomponentinterface.Inthisimage, theAvionicsandSensorsnodeishighlightedontheleftpanel.Thisshowsthetaxonomyhierarchy wherenodescanbeadded,moved,ordeleted.Ontherightpanelaretheclues(terms)thathavebeen automaticallyormanuallygeneratedfromtheorganizationalcontent.
439
CHAPTER11■SEARCHEXTENSIONS
Figure11-10.conceptClassifierTaxonomyManagercomponentinterface Theusercanaddtermsmanually,provideascore,makethecluemandatory,andselectthetype. Cluetypessupportedincludethefollowing: •
STANDARD:Singlewordsandphrases
•
CASE-SENSITIVE
•
DOCUMENTMETADATA:Partialmatchingonmetadatavalues
•
PHONETICMATCHING:Abilitytolocatetopicsregardlessofspellingvariations
•
REGULAREXPRESSION:Anyregularexpressioncanbeused,suchaspart number,creditcardnumbers.
•
CLASSID:Canbeclassifiedonlyifparentorgrandparentisclassified
•
LANGUAGEFILTERS:Individualtopicslimitindividualcluestospecificlanguages.
Documentmovementfeedbackisalsoavailabletotunethetaxonomy.Thisprovidesthe mechanismtoevaluatethechangesonthetaxonomyinrealtimewithouttheneedtoreclassifythe content.Thefeaturewilldisplaythenewclassificationsbasedonchangesmadetothescores.Indicators showhowthescorechangeswillimpacttheclassification. Indicatorsincludethefollowing:
440
•
Documentremainsclassifiedwithahigherscore
•
Documentremainsclassifiedbutwithalowerscore
•
Documentremainsunclassifiedandthescoredoesnotchange
CHAPTER11■SEARCHEXTENSIONS
•
Documentwillnowbecomeclassified
•
Documenteitherstaysorbecomesunclassified
conceptClassifiercangreatlyincreasedocumentclassificationaccuracybyleveragingmulti-word conceptsinitsmatchingalgorithms.UnlikeSharePoint2010’snativetaggingmechanism,whichforces userstoenteronepotentiallyambiguouswordtodefineaconcept,ConceptSearching’stoolcanapply compoundtermprocessingtoclassifyunstructureddocumentsagainsttaxonomies. Figure11-11showsconceptClassifier’sTermStoreintegration.Allchangesmadein conceptClassifierorintheTermStoreareimmediatelyavailable,withouttheneedtoimportorexport. ClassificationrulesforAvionicsandSensorsareillustrated,showingthesamenodeastheprevious screenshotbutfromwithintheTermStore.TheconceptClassifiertaxonomycomponentprovidesthe abilitytomanage,validate,andtestthetaxonomy(s).Italsoensuresthatcontentwillbecorrectly classifiedtoimprovefindabilityinsearch,recordsmanagement,andcompliance.
Figure11-11.conceptClassifierTermStoreintegration Inadditiontoautomaticconceptextractionandclassification,conceptClassifieralsoprovidesmore advancedclassificationrules.Theseallowthetooltorecognizethedifferencebetweensinglewordand multi-wordconceptorphrases.Itcanunderstandexistingmetadatasuchasfiletypeandstorage location.Thetoolunderstandsspellingvariationsbasedonphoneticsmuchlikethephoneticsearchin peopleonSharePoint2010.Itcanalsounderstandpatternssuchaspartnumberandaddresses.Finally itcanrecognizehierarchicalrelationshipsbetweentopicsandautomaticallydetectsthedominant languageinadocument. Beyondtheneedforwell-designedtaxonomyandmetadatatodrivetheabilitytofindinformation, itisalsonecessarytocontrolsensitiveinformation.ForSharePointdeploymentswithorganizationally definedsensitiveinformationsuchasForOfficialUseOnly(FOUO),PersonallyIdentifiableInformation (PII),andPersonalHealthcareInformation(PHI),accuratedocumentclassificationmeansmorethan
441
CHAPTER11■SEARCHEXTENSIONS
efficiency.Fororganizationswiththistypeofinformation,poorclassificationleavesportalsopento securitybreaches.ConceptSearching’sconceptClassifiercanbeusedtoautomaticallydetectsensitive informationorpotentialsecuritybreaches.Itcandothisbydetectingpatternsandcross-referencing themtoassociatedvocabulary.Documentsthatthetoolfindstomeetcertainsuspectparameterscanbe taggedappropriatelyandlockeddownifnecessary.Thisfeaturecanalsoautomaticallychangethefile’s contenttypesothatworkflowsandpermissionsmanagementcanbeautomaticallyinitiatedtoprotect potentiallysensitivedocuments. InFigure11-12,contenthasbeenautomaticallyclassifiedusingoneormoredefinedtaxonomies. Basedontheconceptualmetadataandorganizationallydefineddescriptors,documentsareclassified and,whereappropriate,thecontenttypehasbeenautomaticallychanged.Thesecondandthird documentcontainedsocialsecuritynumbersandPersonallyIdentifiableInformation(PII);thereforethe contenttypewaschangedtoPIIDocumentandthetwohighlighteddocumentswillberoutedtoa securerepositorywhereWindowsRightsManagementcanbeapplied.
Figure11-12.conceptClassifierautomaticallytaggingsesitivedocuments ThetimeittakestoinstallandsetupcontentClassifierisrelativelylimitedconsideringthemassive effectitcanhaveonanenvironment.Theproductisdownloadablein30minutes,containsamenudrivensetup,andfromanadministrationperspectiveiseasytouse.Thetaxonomycapabilitiesarealso veryeasytouse,especiallyconsideringtheamountoftimeittakestocreatetheminout-of-the-box SharePoint2010.Thereare,however,nosolutionsthatcancompletelyoperateautonomouslywithout someadministrativeattention.Taxonomiesdoneedtobemanagedandmaintained.Thetoolwas designedtoprovidethiscapabilitythroughtheinteractivefeaturesdesignedforsubjectmatterexperts (businessusers)asopposedtohighlytechnicaltaxonomyspecialists.SharePointenvironmentsnever remainstatic,sotimeisrequiredforongoingmanagementofthetaxonomy.
442
CHAPTER11■SEARCHEXTENSIONS
WhilethesearenotallofthefeaturesofConceptSearching’sconceptClassifier,thisdoesprovidean initialideaoftheavailablefunctionalityinthisandotherclassificationsolutions.Whileautoclassificationisnottheonlywaytoimproveinformationwithintaxonomiesandontologies,itismost certainlyagreatplacetostart.
ChoosingtheBestOption Thepreviouschapterreviewedafewotherapproachestoimprovingrelevancyusingthefeatures includedinSharePoint2010.Inadditiontotheirauto-classificationsolutions,bothSmartlogicand ConceptSearchingvendorsofferadditionaltoolsformanagingtaxonomiesandontologies.A comparisonoftheauto-classificationsolutionfeaturesforthesetwovendorsisshowninTable11-5. Table11-5.Auto-ClassificationProducts
Feature
SharePoint Smartlogic Concept 2010 Semaphore Searching
Vocabulary support HierarchicalTermStore(taxonomy) Nativeread/writeintegrationwithouttheneedtoimport/export terms
X
X
X
X X
SynonymsX
X
X
Multi-languageX
X
X
X
X
X
X
X
Partial
X
X
User-definablemodelstructure
X
X
Expandableterminformation
X
X
Textminingtoidentifycandidateterms
X
X
Ontologycollaborationandreviewtools
X
X
Extensivereportingmanagementandcontrol
X
Listmanagement(folksonomyandauthority) Relationshipdefinition(ontology)
Model support Poly-hierarchicaltaxonomystructure
443
CHAPTER11■SEARCHEXTENSIONS
Continued
Feature
SharePoint Smartlogic Concept 2010 Semaphore Searching
Open,abilitytolayerstandardMicrosoftandotherreportingtools
X
X
Termapprovalworkflowandauditlog
X
X
TermStoremanagementwithinstantfeedbackandterm suggestions
X
Easyrollback
X
Import,combine,organize,andharmonizemodels
X
X
Enterprisemodelmanagement
X
X
Distributedtaxonomymanagement
X
X
Controlledvocabulariesfromorganization’sowncontent
X
X
Automaticcontenttypeupdatingbasedonorganizationally definedvocabularyanddescriptions
X
X
Automaticdeclarationofdocumentsofrecordandroutingto recordscenter
X
X
Automaticidentificationandlockdownofdataprivacyassets
X
Oneonly
X
X
Conceptmapping
X
X
Taxonomybrowse-as-you-type
X
Ontologyandknowledgemapbrowsing
X
X
Dynamicclassificationsummarization
X
Taxonomynavigation
X
X
A–Zlisting
X
X
Navigation support Configurableandmultiplebestbets
444
CHAPTER11■SEARCHEXTENSIONS
Feature
SharePoint Smartlogic Concept 2010 Semaphore Searching
Classification & text mining support Manualtagging
X
X
X
Assistedclassification
X
X
Automaticrules-basedclassification
X
X
Incrementallibraryclassification
X
X
Classificationhierarchysupport
X
X
Classificationstrategysupport
X
Compoundtermprocessing
X
ClassificationfromSharePointtootherrepositories
X
Classificationofnon-SharePointcontent
X
X
Contentmigration
X
X
SemanticprocessingfordrivingSharePointworkflow
X
X
ClassifiesallSharePointcontent(libraries,blogs,wikis,pages, discussionthreads)
X
Entityextraction
X X
X
ReplacingtheSharePointSearchEngine Asthisbookhasextensivelyshown,SharePoint2010’snativesearchcapabilitiesarecapableofhandling thebroadneedsofmostorganizations.Theindexarchitecturecanbescaledouttohandlearound100 millionitems,customconnectorscanbebuiltthroughtheBCSsotheindexcanaccesscustomcontent sources,andtheuserinterfacecanbecustomizedasneededtohelpusersconnectwithcontent.While thecapabilitiesofSharePoint2010Searchareextensive,someorganizationsmayneedfunctionality beyondthatwhichissupportedbythenativeplatform.Dependingontheneeds,customdevelopment maybethemostappropriateoption.Ifcustomdevelopmentdoesnotmatchanorganization’stime requirements,budget,oravailableskillset,third-partytoolscanbeaddedtobuildoutSharePoint2010’s functionality.Thereare,however,certaincaseswheretheseoptionsstilldonotaddresstheneedsofan organization.Inthesecases,itmaybenecessarytoreplaceSharePoint2010’ssearcharchitecture.
445
CHAPTER11■SEARCHEXTENSIONS
Readersthathavefollowedthisbookinitsentiretytothisclosingsectionhavecertainlyfound SharePoint2010’ssearchcapabilitiesoravailableadd-onstomeetthemajorityoftheirneeds.As pointedoutthroughoutthisbook,searchinSharePoint2010doeshaveitslimitations,someofwhich canbeovercomeonlybycompletelyreplacingthesearcharchitecture.Forthosereaderswhohavehita wallwithSharePoint2010’slimitations,itisnecessarytoreviewsomeofthemostpopularsolutionsto replacingSharePointsearch. BeforelookingintosolutionstohandlingthelimitationsofSharePoint2010Search,itisfirst importanttoreviewthelimitationspointedoutthroughoutthisbook.Manyofthefront-enduser interfacelimitationshavebeenreviewedinChapter5andthroughoutthischapter.Theseinclude limitationssuchasthenumberofsuggestionsthatcanbepresentedforeachrefinercategory,alackof documentpreviews,andthelimitedabilitytocustomizesearchinterfacestousercontext.These limitationscanbeovercomethroughcommerciallyavailableSharePointextensions.Back-end limitations,bycontrast,aredirectlytiedtothecorearchitectureofthesearchsolution.Back-end limitationsincludethosesuchasthenumberofitemsthatcanbeindexed,theeaseofaccessinto contentsources,andmanipulationofrelevancy.Asummaryofthemajorback-endlimitationscanbe foundattheendofthissectioninTable11-6.Unlikethefront-enduser-sidefeatures,whichcanbe enhancedthroughsimplecustomizationorcommercialextensions,back-endlimitationsrequire completereplacementofthesearcharchitectureandindexpipeline.
ReplacementConsiderations ThedecisiontoreplacethesearchcomponentsinSharePoint2010isnotonethatshouldbetaken lightly.WhiletherearemanysearchenginesavailablethatcanintegrateintoSharePoint2010,nonedoes sowithoutconsequence.Allsearchenginereplacementswillrequireadditionaltimetosetup, configure,andmanage.Theycanbringadvantages;butformanyorganizationsthedisadvantages broughtbythecomplexitiesofmixingtechnologiesinonefarmdonotjustifythechange.When analyzingpotentialreplacementsforSharePoint2010Search,itisimportanttofullyunderstandthe answerstothesequestions.
446
•
DoIneedtoindexmorethan100millionitems?SharePoint2010iscapableof handlingupto100millionitemsifproperlyscaled.Therearefeworganizationsin theworldthatbreakthislimit.Fororganizationsthatneedtoindexmorecontent thanSharePoint2010iscapableofsupporting,replacingSharePoint2010’snative searchpipelineisnecessary.Thisisthesinglemostcompellingreasontoreplace SharePoint2010Search.
•
DoIhaveanenterpriseagreementforSharePoint?Currently,Microsoft’s replacementofthenativeSharePoint2010searchengine,FASTSearchServerfor SharePoint2010,isavailableonlytodeploymentsoftheenterpriseversionof SharePoint.OrganizationsthatpurchasetheextensionmustbeattheECALlevel.
•
DoIhavethetimetomanageamorecomplexenterprisesearchengine?Whilesome enterprisesearchenginereplacementsaremarketedtobeeasiertomanage,all bringtheinherentcomplexityofanothermajorsolutiontomanage.Unlikea searchextension,whichaddsontoSharePoint,replacingthesearchengine requiresmanagementofasecondsetofsearchindexarchitectureandsoftware. Thetimeitwilltaketorebuildsites,managemetadata,securepermissions,and maintainadditionalphysicalserversshouldbetakenintoaccount.
CHAPTER11■SEARCHEXTENSIONS
•
CantheadditionaluserinterfacefeaturesIneedbeachievedthroughanextension ofSharePointordoIneedtoreplacethecoresearchengine?Itmakesnosenseto replacetheentiresearchenginejusttoachievedeepnumberedrefiners. Comparativelyinexpensivecommercialsolutionsareavailabletomeetthesemore basicneeds.Unfortunately,countlessenterprisesearchenginereplacement projectsarestartedonthisillogicalpremise.Well-managedorganizationsdon’t payhundredsofthousandsofdollarsforthecomplexityofasearchengine replacementwhenasimpleWebPartwillfixtheneed.Beforedeterminingthat SharePointsearchneedstobereplaced,firstlookathowitcanbeenhanced. Enhancementsaregenerallymuchlessexpensive,time-consuming,and disruptivetousers.
•
DoIhavethebudget?Enterprisesearchenginesareexpensive.Bepreparedto allocateabudgetstartingatUS$30,000foraminimalsearchenginereplacement suchasasingle-serverGoogleSearchAppliance.Forenterprise-levelsearch enginessuchasAutonomy,Endeca,orFASTSearchServerforSharePoint2010,be preparedtoexpectsoftwarecoststhatstartatUS$100,000.Thenbesureto appropriatelybudgetforadditionalhardware,professionalservices,maintenance, andtraining.
If,afteranalyzinganswerstothesequestions,theorganizationstillneedstoreplaceSharePoint2010 Search,therearemanysolutionstoconsider.EnterprisesearchproviderssuchasEndeca,Autonomy, Coveo,Google,andFASTalloffersolutionsthatcanreplaceSharePoint2010’ssearcharchitecture.The enterprisesearchenginesofferedbythesecompaniesaredesignedtobeextremelyscalableandcrawla broadrangeofcontentsources.Inaddition,theyallowadministratorssignificantlymoreinfluenceover theindexpipelineandrelevancy.Eachenterprisesearchprovidercaterstoaslightlydifferentsetof needs.Consideringthesignificantinvestmentandimpact,ifanorganizationneedstoreplace SharePoint2010Search,itisbesttocontacteachvendorandconductathoroughanalysisofthe availableoptions. ThemostwidelypopularreplacementsforSharePoint2010’snativesearcharethesolutionsoffered byGoogleandMicrosoft.
GoogleSearchAppliance Google’soffering,theGoogleSearchAppliance(GSA),isdesignedtobeastraightforwardplug-and-play solutiontoenterprisesearch.Itisapackagedcombinationofastandardrack-mountedserverand administrativesoftwarethatcanbepluggedintoaserverracktoprovideaninstantlyscalableonpremisesearchsolutionforwebsitesandintranets. TheGSAfoundariseinpopularityinMOSS2007forseveralreasons.Sadly,themostnoteworthy reasonforthepopularityoftheGSAisitsbrandpresence,sinceitisofferedbytheworld’sleadingglobal searchprovider.ImplementationsonSharePointalsoincreasedonSharePointduetonewmigrations fromfilesharestoMOSS2007,whichsawadrasticjumpinpopularityoveritspredecessors.Many organizationsownedGoogleSearchAppliancesfortheirwebsitesorfileshares,andfoundawayto justifytheminMOSS2007.Itsuptakealsogreatlybenefitedfromthelimitedsearcharchitecturescaling availableinMOSS2007.TheGSAwasabletotakeadvantageofabrute-forceapproachtosearching massiveamountsofdocumentsspreadacrossmanycontentsources.SimplyaddinganotherGSA decreasedcrawltimesandincreasedthemaximumindexsizeaswellassearchspeed.Itprovided benefitsoverMOSS’ssearchuserinterface,whichincludeddynamicnavigation,advancedquerysyntax, querysuggestions,automaticspellcheck,andresultgroupingsbasedontopic.Italsoopenedupabroad
447
CHAPTER11■SEARCHEXTENSIONS
rangeofreportingandanalysisfeaturesthroughGoogleAnalyticsnotavailableinMOSS2007.Someof theseanalyticscanbeseeninFigure11-13.
Figure11-13.GoogleSearchApplianceAnalytics WithSharePoint2010,itisapparentthatMicrosofttooknoteofthelossofmarketsharearound search.ThemajorityofthefeaturesthatmadetheGoogleSearchAppliancestandoutintheMOSS2007 erawereintegratedintonativeSharePoint2010.Thesearchuserinterfacefeaturessuchasrelated queries,querysyntax,andrefinershaveallbeenintegratedintoSP2010.Figure11-14showstheGSA searchexperienceontheplatform,anditishelpfulforunderstandingthebasicuserinterface differences.Inadditiontothedecreasedgapintheuserinterface,withthecapabilitiesoftheBCS, developerscanmoreeasilyconnectSharePointtoawiderangeofcontentsources.SharePoint2010’s nativesearcharchitectureisalsosignificantlymorescalablethanMOSS2007.SharePoint2010also providesamuchbroadersuiteofsearchanalyticsthroughthenewlyintroducedWebAnalyticsreports discussedinthepreviouschapter.
448
CHAPTER11■SEARCHEXTENSIONS
Figure11-14.GoogleSearchApplianceresultsinSharePoint WhiletheimprovementsinSharePoint2010Searchgreatlyreducethefeaturegapbetweenthe GoogleSearchApplianceandSharePoint,therearesomeremainingbenefitstoGoogle.Dependingon theGSAmodelanorganizationchoosestoimplement,theindexismarketedtobeinfinitelyscalableto billionsofitems.Bycontrast,SharePoint2010’sindexiscappedaround100millionitems.TheGSAdoes supportmorecontentsourcesoutoftheboxwithoutknowledgeoftheconnectorframework.Thisis importantfororganizationsthatwanttoeasilyconnecttocontentlocatedinEMCDocumentum,IBM FileNet,Hummingbird,LotusNotes,OracleContentServer,andSAPKM. ItisalsonoteworthytomentionthatGoogle’srelevancyisprimarilybeneficialinthepublicdomain. ThefactorofrelevancycombinedwithaquestionablehistoryofsecurityispartlythereasonmostGSA deploymentscanbefoundonpublicsitesandnotintranets.Thetechniqueofcrawlingglobalwebsites isquitedifferentthanthetechniquesusedtoproviderelevantsearchresultsonanintranet.Global searchenginesareusedtoconnectpeoplewithgeneralinformationscatteredaroundtheWeb.They functionsimilarlytotheyellowpages,inthatpeoplearefrequentlysearchingforgeneralconceptsand notspecificitems.Forexample,liketheyellowpages,onaglobalsearchengine,usersmaysearchfor generalconcepts,suchasshoestoresintheircity.Theyarenotfrequentlysearchingforaspecificpairof shoeslocatedataspecificbranchofastore.Ifuserswanttofindaspecificpairofshoesataspecific store,theydoaglobalsearchtofindthestore’swebsite,andthencallorsearchagainwithintheweb siteusingthesite’ssearchengine.Theuserexperiencewhensearchingwithinintranetsisquitethe opposite.Theyaregenerallylookingforaspecificitem,authoredbyaspecificperson,withinaspecific site.TheabilitytopresentrelevantresultsbasedonthisspecificityiswhatmakesSharePoint’srelevancy shineonintranets.
449
CHAPTER11■SEARCHEXTENSIONS
AlthoughtheGoogleSearchApplianceisoneoftheleastexpensiveoptionsforreplacingSharePoint 2010Search,itisstillnotcheap.Managementofsearchstillrequirestimeandattention.Setuptimeis slightlylessthantheamountoftimenecessarytosetupsearchinSharePoint2010,butnotdrastically reduced.Pricingfortheappliance,whichincludesbothhardwareandsoftware,isbasedonthenumber ofindexeddocuments.Attheendof2010,pricingforthebasicappliancemodelstartedaround US$30,000foratwo-yearcontractandtheabilitytoindex500,000items.Thebasicmodelcanbescaled tosupportupto10millionitems,andthemorepowerfulmodelcansupportupto30millionitemsper appliance.Unlikemostenterprisesearchplatforms,whichchargeaone-timelicensefeeandannual support,GooglelicensestheGSAintwo-orthree-yearleases.Whenthecontractperiodexpires,theunit stopsservingdata.Itcanthenbereturnedorreplacedwithinitiationofanewcontract.
■NoteGoogle’ssearchapplianceisnotthesameasGoogleMini.GoogleMiniisasimplesearchengineforuse withlessthan100,000items,andisprimarilydesignedforwebsites.SharePoint2010’ssearchcapabilitiesare significantlymoreadvancedthanGoogleMini,andasaresultitwouldnotbeaviablereplacementforSharePoint search.
FASTSearchServer2010forSharePoint InWave14,Microsofthasdecidedtoattackalternativeenterprisesearchengineshead-on.Inearly2008, MicrosoftacquiredtheNorwegianenterprisesearchvendorFASTSearchandTransfer(FAST). Establishednearlyadecadeearlier,FASTwasoneoftheworld’sleadingprovidersofhigh-endsearch andbusinessintelligencesolutions.Itsplatform,FASTESP,isahighlycustomizableandscalablesearch enginecapableofmeetingaseeminglyendlessarrayofsearch-andintelligence-basedbusinessneeds. ByacquiringFAST,Microsofttookasignificantsteptowardalleviatingitsdeficienciesinthesearch marketplace. Sincetheacquisition,MicrosoftandtheFASTGrouphavebeenhardatworktointegrateFAST’s searchtechnologiesintoMicrosoft’smoremainstreaminfrastructuresolutions.Whilesomeofthese technologiesareavailableinnativeSharePoint2010Search,thereleaseofFASTSearchServerfor SharePoint2010establishedMicrosoftasarealplayerintheenterprisesearchspace.FASTSearchServer forSharePoint2010isareplacementfortheSharePointsearcharchitecture.Itintegratesseamlesslyinto SharePoint2010withafamiliarinterfaceandbypickingupsettings,permissions,andmetadata.FAST SearchServerforSharePoint2010isnotanextensiontoSharePoint2010Search,however;itisa replacement,sinceitdoesrequirededicatedserversandaddsacompletelydifferentindexpipeline.
■NoteFASTSearchServerforSharePoint2010shouldnotbeconfusedwithitsstand-aloneenterprisesearch platform,FASTESP.FASTESPisaservice-orientedarchitectureusedtobuildsearch-derivedapplications.
FASTSearchServerforSharePoint2010cangreatlyexpandtheuserinterfaceandthesearchback endforenterpriseSharePointdeployments.Theplatformincludesallofthefeaturesofstandard SharePoint2010Searchandaddsadditionaluserinterfacefeaturessuchasadvancedsorting,document previews,deepnumberedrefiners,andvisualbestbets.Advancedsortingallowsforabroadrangeof
450
CHAPTER11■SEARCHEXTENSIONS
additionalsearchsortingoptionsbeyondSharePoint2010’sstandardrelevancy.Thisfeatureissimilarto the“displayrelevanceviewoption”and“displaymodifieddateviewoption”instandardSharePoint 2010,butprovidesmoreextensivesortingsuchassize,documentrank,createddate,andmodifieddate. Thesesortingoptionscanalsobecustomizedtomeetthespecificneedsofadeployment.Figure11-15 showsthedefaultoptionsmadeavailablewiththisfeature.
Figure11-15.FASTSearchServerforSharePoint2010advancedsorting OneofthemostpopularfeaturesofFASTSearchServerforSharePoint2010isthedocument thumbnailandpreviewfeature.Thisisaverylimitedversionofthevisualizationfunctionalityreviewed earlierinthischapter.FASTSearchServerforSharePoint2010’sdocumentpreviewismadeavailable throughtheuseofSharePointOfficeWebApplications(OWA),sopreviewsareavailableonlyforOffice documents.Morespecifically,first-pagethumbnailsareavailableonthesearchresultspagefor MicrosoftWordandPowerPointfiles.Fulldocumentpreviewsarecurrentlyavailableonlyfor PowerPointfiles(Figure11-16).ForFAST’sthumbnailanddocumentpreviewtofunction,thedocument mustbestoredonaSharePoint2010sitethathasOWAenabled.Whilethisdoesprovideanice visualizationenhancementforSharePoint,clientsusingthesearchreplacementshouldbeawarethat previewsforOfficefilesotherthanWordandPowerPointarenotsupportedandusersmusthaveOWA enabledontheirbrowsers.ThisdoesleadtotherestrictionthatuserscannotpreviewPDF,Autodesk,or otherMicrosoftOfficefileformats.Cautionshouldalsobeusedwhendeployingthisfeaturetopublic sitesorthosethatareexpectedtobeaccessedviamobiledevices,wheretheinstallationofOWAcannot bereasonablyassured.
451
CHAPTER11■SEARCHEXTENSIONS
Figure11-16.FASTSearchServerforSharePoint2010PowerPointpreview
■NoteVisualizationsolutions,suchasSurfRay’sOntolicaPreviewandBAInsight’sLongitudePreview,canbe addedtoFASTtosupportbroadercontenttypes.
FASTSearchServerforSharePoint2010greatlyenhancestheBestBetsfeaturetoallowformultiple visualbestbets.UnlikeSharePoint2010Search,whichallowedforonlyonebestbetperkeyword, multiplesuggestionscanbetiedtoasinglekeywordusingFAST.Inaddition,withFAST,BestBetscan useHTMLforgraphicalbestbetssimilartothosefoundonwebsitesinsteadofthesimpletext suggestionsprovidedwithSharePoint.Thisisespeciallybeneficialtoorganizationsthatwishtouse SharePoint2010onpublic-facingdeployments.Figure11-17showsthedifferencebetweenbestbetsin SharePoint2010andthoseavailableinFASTforSharePoint.ThevisualbannerisaFASTbestbet, whereastheseconditemtitledsharepointwithastarisastandardSPS2010bestbet.
452
CHAPTER11■SEARCHEXTENSIONS
Figure11-17.FASTSearchServer2010forSharePointbestbets ThepopularsearchrefinementWebPartisalsogreatlyenhancedinFASTforSharePoint.Insteadof providingplain,shallowrefinementsthatcananalyzeonlythefirst50itemsinaresultsetbydefault, FAST’srefinementsaredeepandnumbered(Figure11-18).Thisallowsforrefinersbasedonthe aggregationofmanagedpropertiesfortheentireresultset.Thishasthesignificantbenefitofrefinement optionsreflectingallitemsmatchingaquery.Itdoes,however,takeasignificantamountofmemory fromthequeryserverforlargeresultsets,soenablingthisfeatureshouldbedonewithcaution.For deploymentsofFASTforSharePointwithmorelimitedhardwareorahighqueryfrequency,theoption remainsavailabletodisplayrefinementsbasedonlyontheaggregationofpropertiesforthetop100 searchresults.
453
CHAPTER11■SEARCHEXTENSIONS
Figure11-18.FASTSearchServerforSharePoint2010deeprefiners FASTSearchServerforSharePoint2010canalsoenhancetheuserinterfacebyprovidingdifferent resultrelevancy,bestbets,andrefinementoptionsbasedonusercontext.Thisallowsthesearch interfacetobecateredtowardusergroups.Forexample,whensearchingforthekeyword“expansion,” peopleloggedinfromthesalesgroupmaygetabestbetfordocumentsoutliningthestrategytoincrease salesfiguresinanewgeography.Peopleinthisdepartmentmayalsogetsearchrefinementsbasedon productgroupsorsalesterritories.Ifauserfromthehumanresourcesdepartmentexecutesthesame query,FASTSearchServerforSharePoint2010canbeconfiguredtoprovideadifferentexperiencefor thatuserbasedonhisorherdepartment.Theuserinthehumanresourcesdepartmentthatsearchesfor thekeyword“expansion”couldgetavisualbestbetforhiringpoliciesinanewlyestablished department.Thesearchrefinementsmayincludefieldssuchasdepartment,clearancelevel,or policytype. Alloftheseuser-sidefeaturescanbeaddedthroughsignificantlylessexpensivesearchextensions, suchasthosereviewedearlierinthischapter.ThefeaturesthatmakeFASTSearchServerforSharePoint 2010standoutarethoseonthebackend.FASTSearchServerforSharePoint2010replacesSharePoint 2010’ssearcharchitecturewithanextremelyscalablesearchengine.WhileSharePoint2010’snative searchindexcanhandleupto100millionitems,FASTSearchServerforSharePoint2010canbescaled toindexbillionsofitemswhileretainingsub-secondquerytimes.LiketheGoogleSearchAppliance, scalabilityisdependentonlicensingandhardware.FASTSearchServer2010forSharePointrequiresits owndedicatedhardware.ItcannotbeinstalledonthesameserverasSharePointServer2010.The minimumhardwarerequirementsincludeadedicatedserverwith4GBRAM,4CPUcores,and50GBof diskspace,but16GBRAM,8CPUcores,and1TBofdiskspaceonRAIDarehighlyrecommendedto achievetheintendedperformance.Duetotheenterprisenatureofthesearchengine,however,most deploymentscontainaboutfourserversdedicatedtoFASTSearchServer2010forSharePoint.
454
CHAPTER11■SEARCHEXTENSIONS
Inadditiontoanextremelyscalableindex,FASTprovidesmuchgreatercontrolovertheindex pipeline.SharePoint2010Searchwasdesignedtomakeaccesstopowerfulsearchrelativelysimple.Asa result,somelimitationswereimplementedinwhatcanbemanipulatedinregardstorelevancyduring indexing.SharePoint2010’sindexpipelinecanbeconsideredablackbox,withverylittleabilityfor manipulation.SharePoint2010andFAST’sdefaultrelevancyisdesignedtoprovideaccurateresultson intranetsagainstlargesetsofdifferentdata.Eachorganization’sneedsaredifferent,andbecause relevancyisperceiveddifferentlyamongdifferentusersandorganizations,itmaybehelpfultotune relevancyaccordingtospecificneeds.Organizationsthatwishtodirectlyinfluencerelevancyalgorithms candosousingFASTSearchServerforSharePoint2010.Administratorswithprogrammingand WindowsPowerShellexperiencecanblendmultiplerankcomponentssuchascontentcontext, authority,termproximity,andquality.Keyword-driven,statistic,dynamic,andlinguisticrelevancecan allbemanipulatedtoaffecttheorderofitemsinaresultset. FASTallowsadministratorstoextractmetadataatindextime,executebusinessintelligence activitiesonthefly,andbuildcustomqueriesusingFAST’sproprietaryFQLquerylanguage.FAST’s metadataextractionissimilartotheauto-classificationsolutionsreviewedearlierinthischapter, althoughitdoesrequireabitmoremanualattention.Metadatacanbeextractedfromtheplaintext withinitemsastheyareindexed,evenifnoformalstructureexistswithinthefile.Thisallowsfor significantlyimprovedconnectionofstructuredconceptsandpropertiestodocuments.Thismetadata canthenbeusedtoenhancesearchrelevancyandprovidemoreaccuraterefinementoptionstousers. Finally,muchoftherealpotentialforlargeenterprisesthatchoosetoimplementFASTSearch ServerforSharePoint2010istiedtotheabilitytouseitforacoretocustomsearch-basedapplication (SBA)development.Microsofthastakenthefirststeptopullingsearchtechnologiesoutofthesearch centerandintootherapplications.Forexample,FASTcanbeconnectedtobusinessintelligence solutionssuchasExcelworkbooksandReportingServicesreports.Thisallowsforadvanceddiscoveryof statisticalinformationthatmaybeusefulformanagementteamstounderstandhowemployeesare workingandutilizingdata.Italsoprovidestheabilityformarketingteamstousesearchtounderstand howclientsmaybenavigatingapublicSharePointsiteorwhatbestbetsaremosteffectiveinconverting sitebrowserstoclients.DevelopersandconsultantscanutilizetheFASTSearchServerforSharePoint 2010asthecoreinfrastructureforadvancedsystemsorportalsthatrelyoninformationaccessand reporting.Examplesincludesearch-basedapplicationssuchasresearchanddevelopmentportals, productsupportdashboards,supplychainmanagementtrackers,andcompliancetools. Asmentionedearlier,FASTSearchServerforSharePoint2010islicensedseparatelyfromSharePoint 2010.UnliketheGoogleSearchAppliance,whichincludeseverythingneededinonepackage, organizationsthatwishtoimplementFASTmustpurchasehardware,WindowsServer,SQL,andFAST SearchServerlicensing.Usersmusthavetheenterpriseclientaccesslicense(ECAL)toaccesstheFAST features.Attheendof2010,pricingperserverforFASTSearchServer2010forSharePointstartedat aboutUS$22,000.
ChoosingtheBestOption Thissectionwasmeanttoprovideonlyahigh-leveloverviewofthemostpopularoptionsforreplacing SharePoint2010’snativesearchengine.Thereareentirebooksdedicatedtothissubject,andany organizationthatfindsthatitsneedsreachbeyondthecapabilitiesofSharePoint2010shouldseekthe guidanceofanexperiencedconsultant.Consideringthefinancialandtimeinvestmentsrequiredto implemententerprisesearchengines,eventhosethataremarketedtobesimple,athoroughanalysisof thebestsolutiontomeetanorganization’sparticularneedsshouldbeconducted.Ahastyjumpintoa mixedplatformmayprovetobeacostlywasteofresourcesifbetterhardwareoruserinterface extensionswouldmeetneedswithgreaterefficiency.Table11-6willassistwithaninitialanalysisof options.
455
CHAPTER11■SEARCHEXTENSIONS
Table11-6.SharePoint2010,GSA,andFASTComparison
Feature
SharePoint 2010
Google Search FAST Search Server Appliance 2010 for SharePoint
Front end Basicsearch
X
X
X
X
X
X
Customproperties
X
X
Propertyextraction
Limited
X
Querysuggestions
X
X
X
Searchasyoutype
X
Similarresults
X
VisualBestBets
X
X
Sortresultsonmanagedpropertiesorrankprofiles
X
Shallowresultsrefinement
X
X
X
Deepresultsrefinement
X
Resultclustering
X
X
DocumentPreviewers
X
x
X
ScopesX Searchenhancementsbasedonusercontext
AlertsX
456
Queryfederation
X
X
X
Windows7federation
X
X
X
Peoplesearch
X
X
X
Socialsearch
X
X
X
CHAPTER11■SEARCHEXTENSIONS
Feature
SharePoint 2010
Google Search FAST Search Server Appliance 2010 for SharePoint
Back end Taxonomyintegration
X
X
*Multi-tenanthosting
X
X
X
X
Richwebindexingsupport SupportforMySites,profilespages,socialtagging, andothersocialcomputingfeatures Automaticrelevancytuningbydocumentorsite promotions Manuallytunablerelevancewithmultiplerank profiles LanguagesupportformostLatin-basedlanguages
XX
X
LimitedX
X
X
X
X
X
X
LanguagesupportforAsiancharacters
X
Real-timelanguagetranslationforqueriesandresults
X
Metadataextractionduringindexing
X
IntegrationofadvancedBItasks
X
X
X
X
X
X
Multiple servers
Multiple servers
Multiple servers
Accesstoline-of-business(LOB)datasystems Sitemapauto-generationforglobalsearchengines Topologyscalability
Maximumindexcapacity
Approx. 100million items
BillionsBilli
ons
457
CHAPTER11■SEARCHEXTENSIONS
■NoteOneespeciallyimportantitemtonotefromtheprevioustableisthatunlikestandardSharePoint2010and GSA,FASTSearchServerforSharePointisnotcapablemulti-tenanthosting.FASTSearchServermustbe deployedonafarmdedicatedtoasingleSharePointcustomerandcannotbeofferedthroughhostingprovidersas asharedservice.
Summary ThischapterhasdescribedthebasicwaysSharePoint2010canbeenhancedusingthird-partysolutions. BothopensourceandcommercialsolutionsareavailabletoexpandSharePoint’ssearchfeaturesand meetneedsbeyondwhatiscapablewiththenativeplatform.EnhancementsrangefromsimpleWeb Parts,todocumentpreviewpanes,toauto-classificationtools.Inextremecases,whereSharePoint2010 cannotbeenhancedthroughconfiguration,customdevelopment,orcommercialenhancements,the searchcapabilitiescanbereplacedwithalternativeenterprisesearchengines.Thisfinalchapter providedthefootingforinvestigationofsolutionstosearchneedsbeyondthisbook.Thereareextensive librariesofknowledgecateringtopossibilitiesthatareopenedupthroughSharePoint2010Search. Leveragethoseresourcestoexploretheendlesspossibilitiesforenhancement.
458
Index ■Special Characters and Numbers
AboutMesection,175
!importantsyntax,242
accesscontrollist(ACL),19
%ProgramFiles%\MicrosoftOffice Servers\14.0\Binfolder,386
accuracyindex,changing,267–268
%windir%\system32folder,102
■A
ACL(accesscontrollist),19
*operator,18,160
actionableresults,withOntolicaSearch, 427–428
:operator,158,165
Actions,BusinessDataWebPart,299
+icon,164
ActiveDirectory(AD),17
+operator,155
ActiveDirectorymenuitem,70