Krugle User Guide V6

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

  • CoreFX - code files and documents crawled from the 2.1.3 tag of the .NET Foundation CoreFX project.
  • Flink - code files and documents crawled from the 1.6.0 tag of the Apache Flink™ project.
  • Hadoop - code files and documents crawled from the 3.0.2 branch of the Apache Hadoop™ project.
  • Keras - code files and documents crawled from the 2.2.0 tag of the Keras project.
  • Krugle Demo Documents - documents that demonstrate Krugle support for non-code files.
  • phpMyAdmin - code files and documents crawled from the 4.8.3 tag of the phpMyAdmin project.
  • Solr - code files and documents crawled from the 7.4.0 tag of the Apache Lucene™ project, and issues crawled JIRA repository for the Apache Solr™ project.
  • Subversion - code files and documents crawled from the 1.9.9 tag of the Apache Subversion™ project.
project_List

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":


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":


getParam2

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):

  • exact (literal) strings containing characters, numbers and symbols to be matched
  • partial strings to be matched
  • network address specifier and functional keyword or keyword stems
  • specific patterns of similar characters, numbers, symbols and word stems
  • combinations of the the above

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:


file_display

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" :


Issue1

Clicking on the second result (SOLR-1336) displays the Issue detail page


Issue2

Notice that the issue page includes a URL to the original source issue, which can also be viewed directly:


original_URL


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:


check1

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:


check2

Project Pages

Clicking on a project’s name will open the Project Overview page for that project, which displays a range of information:

  • SCM Link - a drop-down list of the location(s) within the source code management system from which code and other documents are drawn (https://svn.apache.org/repos/asf//lucene/dev/trunk/solr/src/ in this case).
  • Project Directory - a browsable tree in the left margin that shows the content of the project. Selecting a folder opens that folder; selecting a file will open that file in the browser.
  • Overview Tab - a summary of project information including:
    • project’s owner
    • open source license (if any)
    • a set of links to project resources
    • a display of the number of lines of code and number of files, broken down by language, and a count of files where open source licenses have been detected. Clicking on any one of these entries runs a search for items of that type.
project_overview
  • Activity Tab - charts indicating Krugle user activity related to the project, and SCM check-in activity over the last 30 days
project_activity

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).


project_activity_bar_chart

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.




You will add (and delete) searchable code projects in Krugle using the administration console. Through the administration console, you will also be able to

  • Access usage reports
  • Manage access control capabilities for Krugle end users
  • Adjust the frequency of project updates

To add your own code, consult the Krugle Admin Guide V6.