This quick-start gets you started with Aspire in 20 minutes or less. You’ll learn how to use the Aspire Debug console to load applications, send content through a pipeline and review the results, and install a simple Groovy script component.
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
|
Info |
---|
Before you begin, you need to be registered to use Aspire (go to httphttps://aspire.searchtechnologies.com/) if you haven't already done that. You will need your user registration name and password in order to complete this tutorial. |
The version of Java you should use depends on the Aspire version you are targeting to:
Note that we recommend installing the Java JDK (Java Development Kit), just in case you want to create your own Aspire Components in the future. But really, only the JRE (Java Runtime Environment) is absolutely required.
up to Aspire 2.1.2:
Code Block |
---|
> java -version java version "1.6.0_18" Java(TM) SE Runtime Environment (build 1.6.0_18-b07) Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode) |
or as of Aspire (2.2 Release) :
Code Block |
---|
> java -version java version "1.7.0_79" Java(TM) SE Runtime Environment (build 1.7.0_79-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode) |
Download and unpack https://wiki.searchtechnologies.com/binaries/. Aspire Binaries. For purposes of this tutorial, we'll use "aspire-distribution-2.2.2" as the directory name to which you unpack Aspire.
Note |
---|
This is not the best way to create a new Aspire Distribution. The official method is to use the Distribution Archetype, which requires also downloading a Maven client. There's a separate tutorial for getting started using this method: Aspire Quick Start with Distribution Archetype (Aspire 2). |
The download will create a directory structure similar to that described in Directory Structure.
1) Go to the directory where you unpacked Aspire (such as "aspire-distribution-2.2.2") and type "config" to go to the configuration directory.
2) Open the settings.xml file with a text or XML editor.
3) Look for the maven repository tag.
Code Block |
---|
<repository type="maven"> <defaultVersion>2.2.2</defaultVersion> <remoteRepositories> <remoteRepository> <id>stPublic</id> <url> http://repository.searchtechnologies.com/artifactory/simple/community-public/ </url> <user>YOUR-USERNAME-HERE</user> <password>YOUR-PASSWORD-HERE</password> </remoteRepository> </remoteRepositories> </repository> |
4) Once you've entered your user name and password, save the file.
First, make sure you have access to the internet so that Aspire can download components.
In the Aspire directory you created, change to the bin directory and type "startupaspire" to launch Aspire.
Aspire may take a few seconds to load all of the necessary components.NOTE:
Note | ||||||||
---|---|---|---|---|---|---|---|---|
If you are downloading Aspire Community, ignore the error message about being unable to download the com.searchtechnologies:aspire-dcm-enterprise component. The aspire-dcm-enterprise component is available only with Enterprise systems (and is used for Distributed Processing). aspire-dcm-enterprise
|
In Aspire, every component in the system has its own web page. This is useful for debugging, testing, and manipulating the system through the Aspire Admin Interface.
For the next step, we're going to feed a document through the configured Aspire pipeline and check out the result.
1) To do this, we're going to go to the web page for the "FeedOne" component, which can be found here: http://localhost:50505/aspire/FeedOneExample/FeedOne/ .
2) Enter a URL to feed in the "URL to Feed" box (for example, "http://www.searchtechnologies.com")
3) Then click on "Feed".
4) Click on the "detail" link, as shown below:
Code Block |
---|
<doc> <fetchUrl>http://www.searchtechnologies.com</fetchUrl> <httpResponse code="200" source="FetchURLStage">OK</httpResponse> <protocol source="FetchURLStage/protocol">http</protocol> <host source="FetchURLStage/host">www.searchtechnologies.com</host> <mimeType source="FetchURLStage/mimeType">text/html</mimeType> <encoding source="FetchURLStage/encoding">utf-8</encoding> <extension source="FetchURLStage"> <field name="status">HTTP/1.1 200 OK</field> <field name="Date">Mon, 07 Mar 2011 03:22:12 GMT</field> <field name="Server">Microsoft-IIS/6.0</field> <field name="Cache-Control">private</field> <field name="Content-Type">text/html; charset=utf-8</field> <field name="Content-Length">12485</field> </extension> <title source="ExtractTextStage/title">Search Technologies: The search engine implementation experts</title> <contentType source="ExtractTextStage/Content-Type">application/xhtml+xml</contentType> <description source="ExtractTextStage/description">We architect, implement and tune leading search engines. Our 80+ experts will help your search implementation exceed expectations regardless of which search engine you use</description> <extension source="ExtractTextStage"> <field name="Content-Location">http://www.searchtechnologies.com</field> <field name="Content-Encoding">ISO-8859-1</field> </extension> <content source="ExtractTextStage"><![CDATA[ Home About Us Executive Team Careers Frequently Asked Questions . . . ]]></content> <domainName source="ExtractDomainImpl">searchtechnologies.com</domainName> </doc> |
Note the metadata which added to this document from all of the various pipeline stages:
For the final step, we're going to add a Groovy script component to the document processing pipeline to convert the title to ALL CAPS. This will require editing the Aspire system configuration file to add this new component, as well as adding it to the pipeline.
Note that you do not need to shut down Aspire to make this change.
1) To add the Groovy component, edit the "config/system-example.xml" file in your aspire-quick-start installation directory to include the following component:
Code Block |
---|
<component name="ExtractDomain" subType="default" factoryName="aspire-extract-domain" /> <!-- vvvv ADD THESE LINES BELOW vvv --> <component name="UpperCaseTitle" subType="default" factoryName="aspire-groovy"> <script> <![CDATA[ doc.set("title",doc.getText("title").toUpperCase()); ]]> </script> </component> <!-- ^^^ ADD THE LINES ABOVE ^^^ --> <component name="PrintToFile" subType="printToError" factoryName="aspire-tools"> <outputFile>exampleDebug.out</outputFile> </component> |
2) Next, add the new Groovy component to the pipeline:
Code Block |
---|
<pipelines> <pipeline name="doc-process" default="true"> <stages> <stage component="FetchUrl" /> <stage component="ExtractText" /> <stage component="DateChooser" /> <stage component="ExtractDomain" /> <stage component="UpperCaseTitle" /> <!-- ADD THIS LINE HERE --> <stage component="PrintToFile" /> </stages> </pipeline> </pipelines> |
3) Go to the Aspire home page (http://localhost:50505/aspire) and click on the "reload" button:
4) Go back to FeedOne and try feeding the http://www.searchtechnologies.com link again. Your title should now be in all CAPS, as follows:
Congratulations!!
You have completed the 20-minute quick start for creating applications.
Next, to see how to build Aspire distributions from scratch using Maven prototypes and Maven component repositories, try the Aspire Quick Start with Distribution Archetype.
To shut down Aspire, go to the home page (http://localhost:50505/aspire) and click on the "Shutdown" link. Or, you could go to the Aspire console window (where you started Aspire with "bin\startup") and type "shutdown" and then press the Return or Enter key. Either way will shut down Aspire.
Cheers!