Load Text (Aspire 2)

From wiki.searchtechnologies.com
Jump to: navigation, search

For Information on Aspire 3.1 Click Here


Load Text (Aspire 2)
Factory Name  com.searchtechnologies.aspire:aspire-tools
subType  loadText
Inputs  Either object['contentStream'] (an InputStream which contains the text file to be loaded) or object['contentBytes'] (an array of bytes which contains the text to be loaded).
Outputs  The text specified by the content stream or bytes will be loaded into memory and stored in a CDATA in a sub-element within the <doc> element attached to the AspireObject which is attached to the job.

The Load Text Stage stage loads text from a stream into the job's AspireObject. The text will be loaded as a sub-element.


Configuration

Element Type Default Description
target string text The element in to which the text will be loaded.
bufferSize int 1024 The size of the buffer used whilst loading the text.


Example Configuration

Simple

Stores text in a field called "text":

 <component name="LoadText" subType="loadText" factoryName="aspire-tools"/>


Complex

 <component name="LoadText" subType="loadText" factoryName="aspire-tools">
   <target>SEGMENTS</target>
   <bufferSize>524288</bufferSize>
 </component>

Example Output Document

 <doc>
   <protocol source="FetchURLStage/protocol">http</protocol>
   <expirationDate source="FetchURLStage/expirationDate">2012-12-07T14:29:06Z</expirationDate>
   <fetchUrl>http://10.40.40.117:15100/cgi-bin/search?pathInfo=/search&offset=0&feederLabel=QueryProxy&query=test&aspireHttpFeederServlet=&hits=10&</fetchUrl>
   <host source="FetchURLStage/host">10.40.40.117</host>
   <aspireHttpFeederServlet remotePort="53044" relativePath="/search" serverName="localhost" source="HTTPFeederServlet" remoteHost="127.0.0.1" serverPort="50505" remoteAddr="127.0.0.1" fullPath="/cgi-bin/search" servletPath="/cgi-bin">
     <queryString>offset=0&hits=10&query=test</queryString>
   </aspireHttpFeederServlet>
   <query source="HTTPFeederServlet">test</query>
   <engineUrl>http://10.40.40.117:15100/cgi-bin/search?pathInfo=/search&offset=0&feederLabel=QueryProxy&query=test&aspireHttpFeederServlet=&hits=10&</engineUrl>
   <url>http://10.40.40.117:15100/cgi-bin/search?pathInfo=/search&offset=0&feederLabel=QueryProxy&query=test&aspireHttpFeederServlet=&hits=10&</url>
   <extension source="FetchURLStage">
     <field name="status">HTTP/1.1 200 OK</field>
     <field name="Server">QRserver/1.12.0.9</field>
     <field name="Date">Fri, 07 Dec 2012 14:29:05 GMT</field>
     <field name="Content-Type">text/plain; charset=UTF-8</field>
     <field name="X-Fast-Info">- 0.002 0.072 0.085 18 200 No error has occured 0000</field>
     <field name="Expires">Fri, 07 Dec 2012 14:29:06 GMT</field>
     <field name="Allow">GET</field>
     <field name="Content-Length">53439</field>
   </extension>
   <hits source="HTTPFeederServlet">10</hits>
   <feederLabel>QueryProxy</feederLabel>
   <SEGMENTS><![CDATA[#SEG NAM webcluster
     #MTA SEP
     ####
     #QTF NAM Original query
     #QTF ACT NOP
     #QTF QRY test
     ####
     #QTF NAM FastQT_Definition
     #QTF ACT nop
     #QTF QRY noun
1. test, mental test, mental testing, psychometric test -- any standardized procedure for measuring sensitivity or memory or intelligence or aptitude or personality etc; "the test was standardized on a large sample of students"
2. test, trial, run -- the act of testing something; "in the experimental trials the amount of carbon was measured separately"; "he called each flip of the coin a new trial"
verb
1. test, prove, try, try out, examine, essay -- put to the test, as for its quality, or give experimental use to; "This approach has been tried with good results"; "Test this recipe" #QTF CUS test #QTF CUS test #QTF MSG Received match #QTF MID 4 #### #QTF NAM FastQT_Lemmatizer #QTF ACT nop #QTF QRY #QTF CUS No change to query #QTF MSG Lemmatization turned off for current query #QTF MID 16 #### #QTF NAM Final query #QTF ACT NOP #QTF QRY string("test") #QTF CUS FQL #### #NAV ENT 0 #### #FIR 1 #LAS 10 #HTS 10 #CNT 18 #TIM 0.0740 #MAR 25255 ###/ #### 1 #rank 10684 #ranklog #fcoid 0 #fcocount 0 #morehits 0 . . . ]]> </SEGMENTS> </doc>