Skip to content

Home

Development

IDEs

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

Searching for Tracker documents

Martini provides a variety of ways to retrieve inbound and outbound data logged to the Tracker search index, all of which will be discussed in this page:

Using the user interface

Martini Desktop, Martini Online, and the Martini Runtime Admin web interface each present user interface elements for viewing and searching Tracker documents.

Viewing all documents

Accessing the Tracker view

The Tracker view displays all existing documents in the Tracker search index. To open this view, click the Tracker button from Martini Desktop's toolbar.

You can select which instance's Tracker data gets rendered in the view using the Martini Instance dropdown. Furthermore, you can update displayed results using the refresh button and Auto refresh checkbox.

Accessing the Tracker view

The Tracker view displays all existing documents in the Tracker search index. To open this view, click the Tracker button from Martini Online's toolbar; or as an alternative, the Tracker tab from the bottom panel.

Soon, the coupled instance's Tracker data will be dislplayed. You can update displayed results using the refresh button and Auto refresh checkbox.

Accessing the Tracker page

Go to the static search bar located at the top of the Martini Runtime Admin interface. Select Tracker from the dropdown, and click the search button to go to the Tracker page.

The Tracker page will display all documents residing in the instance's Tracker search index. To update displayed results, refresh the page.

Viewing document details

Viewing Tracker document details

To view the details of a specific Tracker document, click the document's row on the table displayed in the Tracker view. Soon, the Properties view would be populated with the selected document's data.

You will notice four tabs in the Properties view:

  • The Details tab displays general document properties.
  • The Properties tab displays Tracker document properties.
  • The States tab displays all states the document has transitioned through.
  • And lastly, The Logs tab displays all log messages produced for the document.

Viewing Tracker document details

To view the details of a specific Tracker document, right click the document's row on the table displayed in the Tracker view and then select Open Tracker Document from the appearing context menu. Soon, a new view would appear and display the selected document's data.

You will notice three tabs in said view:

  • The Properties tab displays general information regarding the document, and Tracker document properties.
  • The States tab displays all states the document has transitioned through.
  • And lastly, The Logs tab displays all log messages produced for the document.

Viewing Tracker document details

To view the details of a specific Tracker document, click the document's ID from the table displayed in the Tracker page. A modal on the right side of the page would appear with the requested information.

You'll notice the modal is split into four sections:

  • The Details section displays general document properties.
  • The Properties section displays Tracker document properties.
  • The States section displays all states the document has transitioned through.
  • And lastly, the Logs section displays all log messages produced for the document.
Download document state content

You can preview the content of certain document state by clicking the document state's entry in the Properties view. To download it, do a secondary click instead and select Download Content from the appearing context menu.

Document state context menu

Document state context menu

Document state context menu

Simple filter

Tracker search bar

Tracker search bar

Tracker search bar

Use the search bar in the Tracker user interface to look for documents containing field values that match the provided input string. Type the text to match in the search bar and then press .

Facet filter

Tracker facet filter

Tracker facet filter

You can also filter Tracker documents using facets. To show these facets in Martini, click the Quick Filter button. Click the facet field you want to filter by, and then select a value from the appearing dropdown. You'll notice next to each facet is a number. This number is the number of documents in the Tracker search index that match the facet.

Advanced filter

Advanced filter form

Advanced filter form

Advanced filter form

If you need finer-grained searches, you can use the Advanced Filter form. This type of search allows you to specify a value to match per field. In the IDE, you need to click the Advanced (Filter) button for the form to appear. For the Martini Runtime Admin interface, you need to click the inverted triangle beside the search button.

Query auto-complete

The Martini Runtime Admin UI's Tracker search bar features autocomplete (using a Solr Suggester). This means that as you type, you will be presented values and suggestions that match your query. However, this feature is disabled by default (as it may cause performance issues). To enable it, open the tracker Solr core's solrconfig.xml file and uncomment the following lines:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<searchComponent class="solr.SpellCheckComponent" name="suggest_phrase">
    <lst name="spellchecker">
        <str name="name">suggest_phrase</str>
        <str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
        <str name="lookupImpl">org.apache.solr.spelling.suggest.fst.FSTLookup</str>
        <str name="field">suggest_phrase</str>
        <str name="buildOnCommit">true</str>
    </lst>
</searchComponent>
<requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/suggest_phrase">
    <lst name="defaults">
        <str name="spellcheck">true</str>
        <str name="spellcheck.dictionary">suggest_phrase</str>
        <str name="spellcheck.onlyMorePopular">true</str>
        <str name="spellcheck.count">10</str>
        <str name="spellcheck.collate">false</str>
    </lst>
    <arr name="components">
        <str>suggest_phrase</str>
    </arr>
</requestHandler>

You may have noticed that the XML has a configuration property called buildOnCommit. Enabling this option rebuilds the autocomplete index every time a document is added to the index. If you feel that autocomplete is useful, but don't like the performance cost, you can change the value of buildOnCommit to false and then manually have Solr rebuild it for you. In situations like this, the Scheduler endpoint can be used. You can read more about the Suggester here.

Using RESTful web services

As with the other search indices, the Tracker search index can be queried and managed via the Solr Search API. Simply ensure the following path parameters are substituted when sending requests:

Parameter name Value
package core
core tracker

For example:

1
/esbapi/v1/solr/core/tracker/

For ease of use, there are also Tracker endpoints exposed in Martini's own REST API.

Using one-liners

You can look for Tracker documents in your code using TrackerMethods.searchTracker(...) methods.

In Gloop, you can do something like:

1
TrackerMethods.getTrackerDocument(internalId)

Meanwhile in Groovy, you can do something like:

1
2
SearchResult searchResult = TrackerMethods.searchTracker('hello')
List<Document> documents = searchResult.getResults()

One-liners for Tracker

Since the TrackerMethods class is exposed as an extension module in Groovy, you can also do the following:

1
2
SearchResult searchResult = 'hello'.searchTracker()
List<Document> documents = searchResult.getResults()