External Access to Voyager's Index
In some circumstances, developers may need to access Voyager’s search results without having having direct access to Voyager. For example, they may need access to exported search results for use in another application, or they may need to integrate Voyager’s data directly with another application via a raw Solr query or an RSS/Atom feed.
Exporting Search ResultsÂ
You can export Voyager’s search results in several formats (CSV, SHP and XML) that can be opened and analyzed in other applications. You can also compress (zip) exported files to reduce file sizes.
How to Export Data
Select Tools > Export Result List from Voyager’s main menu bar
Advantages
You can use Voyager’s UI to specify the result fields to include, the file format and whether or not to use data compression.
Notes
Because it relies on Voyager’s UI, exporting data is not accessible programmatically.
Using Raw Solr Queries
Voyager is built on Apache Solr (Welcome to Apache Solr ), which stores the data index, enables searching and responds to query requests made through its REST API.
How to Access the Solr REST API
Viewing the Raw Solr Query for the Current SearchTo see the raw query, go to Admin Options > Show Raw Query from the list of Admin Tools located below the filter list at the bottom right of the main Voyager UI. This will display the raw query in either JSON or XML formats.
Accessing the Solr Query API directlyTo access the API directly, go to http://localhost:8888/solr/v0/select?<parameters>Â
Advantages
Solr queries are the most flexible in terms of input parameter specification, output response type and content.
Notes
Solr query results require another application for analysis. For more information, see the Solr documentation at: Resources
Using Atom/RSS Feeds
Voyager’s built-in Atom and RSS feeds provide the same level of flexibility as do raw Solr queries, but return results exclusively in Atom or (Geo) RSS formats.
See Using RSS and Atom to Access a Voyager Index for information about feeds.
Advantages
Feed formats allow a high degree of flexibly through programmatic access to Voyager’s search results.
Notes
Like Solr queries, RSS/Atom query results require another application for analysis . Unlike Solr queries, feed results are tied to specific schema which many, but not all, external applications will be able to read.
Usage Notes
When you open Raw Solr Queries or Feed results, Voyager applies your current search parameters to the request URL. This is very useful for learning and prototyping request query strings.
There is no canonical list of fields in the index, since information added to the index varies by data type, and can be customized with specific extractions/transformations. Many users will discover the fields they need, or the most common common index fields, by exposing all fields in the details view and cross-referencing that with the raw query results.
Exporting to SHP and Raw Query to XML present the path differently. For now, you can force the absolute path into the Raw Solr query responses using the undocumented [absolute] extract transformer feature, per the following examples:
In a raw query, paths are relative, as shown in https://odn.voyagersearch.com/daily/solr/v0/select?fl=id,name,path
In the next example, the internal transformer [absolute] presents the absolute path:
https://odn.voyagersearch.com/solr/v0/select?fl=id,name,path,[absolute]In the next example, the transformer maps the value of the absolute path to the new field "hello"Â
https://odn.voyagersearch.com/daily/solr/v0/select?fl=id,name,path,hello:[absolute]In the last example, the transformer overrides the path attribute (previously relative) with the absolute path:
https://odn.voyagersearch.com/daily/solr/v0/select?fl=id,name,path:[absolute]