Getting Started with Indexing Version 2.2
This edition refers to Version 2.2 of Black Duck Code Sight. This document created or updated August 21, 2012. Please send your comments and suggestions to: Black Duck Software, Incorporated 8 New England Executive Park, Suite 221 Burlington, MA 01803 USA Copyright 2009-2012 by Black Duck Software, Inc. All rights reserved. All use of this documentation is subject to the license agreement between Black Duck Software, Inc. and the licensee. No part of the contents of this help system may be reproduced or transmitted in any form or by any means without the prior written permission of Black Duck Software, Inc. Black Duck, Know Your Code and the Black Duck logo are registered trademarks of Black Duck Software, Inc. in the United States and other jurisdictions. Black Duck Suite, Black Duck Code Center, Black Duck Protex, Black Duck Export, Black Duck Transact, and Koders are trademarks of Black Duck Software, Inc. All other trademarks or registered trademarks are the sole property of their respective owners.
GETTING STARTED WITH INDEXING There are two categories of users for Code Sight Administrators and Searchers. This document deals with administrative tasks. 1 INDEXING 1.1 Setup Assumptions This document assumes: You have a Code Sight user account with the Indexer role, which allows creating and indexing projects. The system where Code Sight is installed has the necessary SCM clients installed, and they are in its path. Accessible code exists somewhere that Code Sight can go out and crawl. This could be open source projects or projects behind your own firewall. 1.2 Logging In Open a browser tab and navigate to the system where the Code Sight software is installed. This is in the form of: http://<codesightserver>. You do not need to enter any qualifiers. You can search and run reports as an anonymous user. However, to create and index projects, you must log in with a privileged account. Click the Login link, and then enter the username and password created by your system administrator (note that the password is case-sensitive).
4 GETTING S TARTED WITH INDEXING After logging in, click the Admin link in the top-right corner of the screen. This enters you into the Administrative area of the product, where you define how Code Sight gets to the code it needs to index. The default screen when you enter shows the current status of indexing on this machine. The status may show as RUNNING if the machine has been configured to run the indexer continuously, always looking for new projects. Alternately, it could be turned on and off with the built-in scheduler. 1.3 Create a New Project The basic entity within Code Sight is the project. A project describes the location of your sources, who can access them, and how often the files should be revisited. The source code location represents a directory or folder within a Source Control Management (SCM) repository. Just as you access your SCM with a client program so that you can check-out and edit them, Code Sight also needs access so it can read your files and look for changes. The Code Sight server sees and recognizes these clients in its path. Click on the Projects tab to see the projects already configured on this system. As you can see, Code Sight manages multiple projects from multiple repository types. Let s add a new project from the Subversion repository storing the Apache open source project. Click the Create Project button to get started.
On the popup dialog, enter a unique name for the project. Note that the name and description are both searchable. Select the Subversion SCM type, and the display shows the appropriate fields: username, password, and connection string. This example uses a Subversion repository, but Code Sight knows how to access other types as well: AccuRev Bazaar Borland StarTeam CVS Git IBM Clearcase Mercurial Microsoft Team Foundation Server Microsoft Visual SourceSafe Perforce Subversion Zip
6 GETTING S TARTED WITH INDEXING Tip: Git, Subversion, and the File System types are built in and do not require external clients. Enter the following connection string: http://svn.apache.org/repos/asf. Next, click the Browse Repository button. Code Sight then goes out to visit the remote repository and returns with a listing of the available folders. For this exercise, please drill down and select ant/core/trunk/src. Click OK and Save. (Other folders would work, but we know that this directory contains 173k lines of code, which should index quickly.) As soon as you save the new project, Code Sight begins crawling, indexing, and publishing. Look at the status in the Projects table it shows that the new project is flagged for the next round of indexing. By default, this occurs based on your global schedule setting. The time required is dependent on many factors, including what else is happening on the remote repository server and on your local Code Sight server. You can track the progress using the project s History tab. While waiting for Code Sight to finish with the project, take a look at the project info (Setup, Status, History, and Team Members). The History tab records events as Code Sight goes to the repository to crawl the project, builds an index based on the source code structures in the project files, and then combines this index with the master index.
Tip: You can verify that your project published correctly by searching for it. Try it with the project you just created. Depending on what else is on your system, Code Sight may find matches in the project name, file contents, and actual file names. 1.4 Modify the Indexing Schedule There are several ways to start the indexing process for a project: Immediately when the project is created. The first crawl starts automatically when you add and save a new source code location. Based on a global schedule (go to Settings Index Settings Global Schedule) Tip: The No schedule setting can be used to disable indexing. Based on an individual schedule (select the project, choose the Setup tab, and click Edit Project)
8 GETTING S TARTED WITH INDEXING On-demand with the Index Queue for next job setting