Getting Started
This guide explains how to use the core search and analysis features in Krugle. These features apply to all versions of Krugle (including Krugle Enterprise, Krugle Opensearch and Krugle Basic). If you do not have a version of Krugle installed at your site, you can "test drive" Krugle Opensearch here.
Sample Projects
Beyond these simple examples, Krugle projects are extremely flexible and can be configured by the Krugle administrator. The administrator can also choose the set of users who may access or search projects and the frequency with which projects are re-crawled to ensure updates are added to the index. In addition, Krugle will crawl the check-in comments for projects and make these searchable too.
Code & Document Search
To search for a keyword in Krugle, simply enter that string in the search box. In the example below, we have searched for "getParameter":
Search results are shown 10 per page and each result includes the name of the file, the language, the project name, the time when the project was last crawled, and a 5 line snippet from the file that shows the best matches from that file, and with the search term highlighted.
The search may be refined using the facets in the left-hand margin: by Project, by Document Type, by Author or by Date. In the example below, we have refined the search to return only results where "getParameter" is found in Java files within the project "Apache SOLR":
Searches are executed by entering search terms into the search box. Search type options ( Basic | Reg Exp | Solr ) are available to specify a variety of search term patterns found in technical information and software (code):
In addition, searches can be performed on snippets (blocks or multiple lines of text that have usually been copied) with the Advanced Search option available directly to the right of the search button.
Note that every set of search criteria generates a unique URL, which is displayed in the browser address bar after the Search button is pressed. This URL can be saved for later use, and/or shared with colleagues via email, text messages or through wikis or other shared work portal. When a user clicks on one of these saved URLs, their browser will open an instance of the Krugle Enterprise web client and execute the specified search, returning the latest results from projects that the given user has access to.
These URLs enable the user to take advantage of browser tabs to display multiple search results by simply opening search results in a new tab. Generally, new browser tabs can be opened on Windows via Ctrl+Click on Windows and via Command+Click on a Mac.
Clicking a file name opens the file in the browser and shows the location of the file within the project:
Krugle has built-in MIME-type detection that distinguishes between over 50 programming, scripting and markup languages as the files are crawled out of the SCM repositories.
In all cases throughout the Krugle interface, clicking on the project name from the search results or from the file display will open the Project Overview page for the project.
Advanced Code Search
A unique Krugle search feature is the ability to create searches that exploit the underlying structure - and design intent - of the software code. These searches can be created with Krugle query qualifiers. Krugle query qualifiers make your searches more accurate and effective.
For example, you can use Krugle to locate keywords or "tokens" in very specific portions of the files that Krugle searches: in comments that are included with the code files, in function or class names or in function calls, in object methods, etc. For example, to find all files that had an occurrence of the term Connection contained in a function call sequence of code, you would enter the search query functioncall:"Connection" in the Krugle search box. The functioncall option is called a qualifier. Qualifiers are available for project, filename, filetype, software language, site, software project, comments, class definition and function definition.
A complete list of advance Krugle query qualifiers and examples can be found here.
Issue Search
Krugle Opensearch includes a project that contains entries from the JIRA bug tracking system. Krugle indexes these records and makes information such as the issue summary, description and created/modified dates searchable too. Issues are classified as a special document type named "Issue", which allows searches to be narrowed to include just Issues by clicking on the appropriate facet, as well as restricting searches by author, data and project as normal.
In the example below, the user is searching for lang:issue (search file type "Issue") associated with the user "Robert Muir" :
Clicking on the second result (SOLR-1336) displays the Issue detail page
Notice that the issue page includes a URL to the original source issue, which can also be viewed directly:
Check-In Comment Search
When Krugle crawls files stored in version control systems such as Git or Subversion, it also crawls and indexes check-in comments for the project and makes this information completely searchable too. This is extremely useful for finding the set of changes that related to fixing a given bug or activities for a particular user. In the example below, we have searched for a specific bug id and Krugle Enterprise has returned a single result which has the search term in the check-in comment. By clicking on the revision ID we can then explore the details of the change set.
In the example below, the user searches for a reference to a bug ("SOLR 4221") in a "Check-in Comment" for the user "yonik". The result shows the check-in comment, the Subversion revision id of the commit, and the number of files that comprised the change set:
Clicking the revision number ("1526244" in this case) in the summary for the first result takes the user to a page summarizing the commit. The page lists the files added, deleted or modified by the commit:
Project Pages
Clicking on a project’s name will open the Project Overview page for that project, which displays a range of information:
Clicking on a bar of the chart presents additional information. In the image below, we see details for check-ins on April 1.
Clicking on the Revision number for any of the commits on a given day will open the change set page for that commit (see Check-In Comment Search section above).
Adding your own code
Now that you are familiar with the key functionality in Krugle, you will be able to search for code, documents and related information within your organization’s projects.
Important Note
To add, delete or modify projects, you will need to install either Krugle Enterprise or Krugle Basic inside your organization.
Important Note
For Krugle Basic users, before adding your own code you should first delete the sample projects that came preloaded with Krugle Basic. This will maximize space available to your projects.
You will add (and delete) searchable code projects in Krugle using the administration console. Through the administration console, you will also be able to
To add your own code, consult the Krugle Admin Guide V6.