[Pdl] command line indexer search interface

Fee, Jeremy M. jmfee at usgs.gov
Tue Jul 17 23:28:46 UTC 2012


Hello,

Command line indexer search is a poorly documented (for now) feature of the indexer that has been around for some time.  I'm sending this to the list in case anyone is interested before we can add it to the documentation.


Normally, the indexer notifies about one product being added to the index.  Command line search can be used to query the indexer for events or products using a variety of criteria, and can be used by any system running an indexer.  It also is designed to simplify concurrency issues when using a sqlite product index.  You can see some of the options by running the command:

	java -jar ProductClient.jar --search --help


Here is an example command that finds products for the event ci11135362:

	java -jar ProductClient.jar --search --searchMethod=getProductSummary --eventSource=ci --eventSourceCode=11135362

Which produces xml output similar to:

<?xml version="1.0"?>
<searchresponse xmlns="http://earthquake.usgs.gov/distribution/indexer" xmlns:product="http://earthquake.usgs.gov/distribution/product">
    <result method="getProductSummary">
        <query method="getProductSummary" eventSource="ci" eventSourceCode="11135362" productSource="ci"/>
        <productSummary id="urn:usgs-product:ci:shakemap:ci11135362:1342204899970" updateTime="2012-07-13T18:41:39.970Z" status="UPDATE" source="ci" sourceCode="ci11135362" time="2012-07-12T17:54:28.000Z" latitude="34.0895000000000010231815394945442676544189453125" longitude="-116.392200000000002546585164964199066162109375" depth="10.2200000000000006394884621840901672840118408203125" magnitude="3.899999999999999911182158029987476766109466552734375" version="6" preferredWeight="181">
            <product:property name="eventtime" value="2012-07-12T17:54:28.000Z"/>
            <product:property name="map-status" value="RELEASED"/>
            <product:property name="process-timestamp" value="2012-07-13T18:41:09.000Z"/>
            <product:property name="event-description" value="5.8 km (3.6 mi) ESE of Yucca Valley, CA"/>
            <product:property name="eventsource" value="ci"/>
            <product:property name="magnitude" value="3.9"/>
            <product:property name="overlayHeight" value="312"/>
            <product:property name="eventsourcecode" value="11135362"/>
            <product:property name="maximum-latitude" value="34.922833"/>
            <product:property name="depth" value="10.22"/>
            <product:property name="version" value="6"/>
            <product:property name="minimum-latitude" value="33.256166"/>
            <product:property name="minimum-longitude" value="-117.642200"/>
            <product:property name="longitude" value="-116.392200"/>
            <product:property name="overlayWidth" value="468"/>
            <product:property name="latitude" value="34.089500"/>
            <product:property name="maximum-longitude" value="-115.142200"/>
            <product:property name="event-type" value="ACTUAL"/>
        </productSummary>
        <productSummary id="urn:usgs-product:ci:origin:ci11135362:1342540657000" updateTime="2012-07-17T15:57:37.000Z" status="UPDATE" source="ci" sourceCode="ci11135362" time="2012-07-12T17:54:28.800Z" latitude="34.0895000000000010231815394945442676544189453125" longitude="-116.391300000000001091393642127513885498046875" depth="10.800000000000000710542735760100185871124267578125" magnitude="3.899999999999999911182158029987476766109466552734375" version="5" preferredWeight="156">
            <product:property name="magnitude-type" value="Ml"/>
            <product:property name="eventsourcecode" value="11135362"/>
            <product:property name="location-method-class" value="Geiger's Method and Least Squares"/>
            <product:property name="version" value="5"/>
            <product:property name="horizontal-error" value="0.2"/>
            <product:property name="magnitude-num-stations-used" value="99"/>
            <product:property name="minimum-distance" value="0.01796631"/>
            <product:property name="longitude" value="-116.3913"/>
            <product:property name="event-type" value="earthquake"/>
            <product:property name="cube-location-method" value="h"/>
            <product:property name="standard-error" value="0.14"/>
            <product:property name="eventtime" value="2012-07-12T17:54:28.800Z"/>
            <product:property name="cube-magnitude-type" value="L"/>
            <product:property name="eids-feeder" value="manaslu"/>
            <product:property name="azimuthal-gap" value="32.4"/>
            <product:property name="eventsource" value="ci"/>
            <product:property name="magnitude" value="3.9"/>
            <product:property name="eids-feeder-sequence" value="212600"/>
            <product:property name="depth" value="10.8"/>
            <product:property name="magnitude-error" value="0.1"/>
            <product:property name="num-phases-used" value="132"/>
            <product:property name="vertical-error" value="0.5"/>
            <product:property name="latitude" value="34.0895"/>
            <product:property name="location-method-algorithm" value="Hypoinverse"/>
            <product:property name="review-status" value="REVIEWED"/>
        </productSummary>
    </result>
</searchresponse>



Thanks,

Jeremy



More information about the PDL mailing list