NASA - National Aeronautics and Space Administration

+ NASA Homepage
+ NASA en Español
+ Contact NASA
Go
Planetary Data System - Engineering Node Banner

Operation

The Search Service tool operates as a standalone web application on a Tomcat server. Once it is deployed, operations include modifying the configuration and leveraging the PDS and PDAP protocols to query data and metadata that has been extracted from the Registry (see the Search Core for more information). The following topics will be covered below:

Admin Interface

The Admin Interface screen can be viewed from http://localhost:8080/search-service (or http://pdsops.jpl.nasa.gov//search-service). For the PDS core, go to http://localhost:8080/search-service/#/pds. Go to http://searchhub.org/2013/01/22/lucenesolr-4-management-administrative-user-interface/ and/or https://cwiki.apache.org/confluence/display/solr/Using+the+Solr+Administration+User+Interface for more information on the various capabilities of the interface.

From the query page, you can perform various queries against the available end points. You can find out about what the query parameters mean at http://wiki.apache.org/solr/CommonQueryParameters. The most useful of these being the wt parameter. When this is set wt=xslt you can view the output as it is queried from the Search UI and Product Search UI.

Configuration

See the Apache Solr website and wiki for more information on configuring Apache Solr. More Search Service configuration changes TBD.

Add A Facet

The following steps will allow a new facet to be added to the search service output. The facets are the categories in the left sidebar of the Search UI that provide a means for browsing through the data. The name for the facet should not yet be a field in the schema, because a new field specifically dedicated to the faceting will be created. For instance, if you wanted to facet on agency_name, we will create a facet named facet_agency. These steps assume that the Search Service was installed at /usr/local/search-service. If not, substitute the installation directory as needed. For the following example, we will be creating a facet on the node_id field.

  1. Add the following to /usr/local/search-service/pds/conf/xslt/facets.xml:

    <facet name="facet node" caption="Node" />
    
    <facet name="node id" caption="Node" />
                
  2. Update /usr/local/search-service/pds/conf/xslt/add-hierarchy.xsl:

    <xsl:template match="field[@name = 'node_id']">
      <xsl:copy-of select="." >
      <field name="facet_node_id"><xsl:value-of select="concat('1,',.)" /></field>
    </xsl:template>
                
  3. Update /usr/local/search-service/pds/conf/solrconfig_defaults.xml:

    <str name="facet.field">facet_node_id</str>
    
    <str name="f.facet_node_id.facet.prefix">1,</str>
                
  4. Update /usr/local/search-service/pds/conf/schema.xml by finding the area where facet fields are being declared (search for facet_) and adding the following:

    <field name="facet_node" type="string_lc" indexed="true" stored="false" \
      multiValued="false" />
                
  5. Restart Tomcat

Update Output Format

  • To update the output queried through the Search UI (archive-filter endpoint), make updates to /usr/local/search-service/pds/conf/xslt/data-search.xsl.
  • To update the output queried through the Product Search UI (product-search endpoint), make updates to /usr/local/search-service/pds/conf/xslt/product-search.xsl.

Add Field To Schema

Update /usr/local/search-service/pds/conf/schema.xml. This example will add the field my_field:

<field name="my_field" type="text_general" indexed="true" stored="false" \
multiValued="false" />
        

See the Solr Documentation for more information on update the Solr schema.

Search Protocols

PDS Search Protocol

See the PDS Search Protocol Document for more information on querying the Search Service for PDS data and metadata.

PDAP Protocol

TBD

Common Errors

org.xml.sax.SAXParseException: A pseudo attribute name is expected.

This error usually means there is a typo in the Search Service Tomcat context file. More specifically, make sure the first line in $TOMCAT_HOME/conf/Catalina/localhost/search-service.xml matches this exactly:

<?xml version="1.0" encoding="utf-8" ?>
        

See Deploying the Application in the Install Guide for more information on creating this file.

Provider net.sf.saxon.TransformerFactoryImpl not found

This error occurs when the saxon-9.jar is not in the classpath. The following are mitigation strategies:

  • Verify the following line is in $TOMCAT_HOME/conf/Catalina/localhost/search-service.xml:
    <Loader className="org.apache.catalina.loader.VirtualWebappLoader" 
        virtualClasspath="/usr/local/search-service/lib/saxon-9.jar"/>
                

    See Deploying the Application in the Install Guide for more information on creating this file.

  • Verify the path specified for virtualClasspath actually exists.

XSLT transformation error java.io.IOException: XSLT transformation error

This error occurs when the CATALINA_OPTS environment variable is not properly set, or set multiple times in /usr/local/tomcat/catalina.sh (or /etc/init.d):

export CATALINA_OPTS="${CATALINA_OPTS} -Dsolr.pds.home=/usr/local/search-service"
        

All Searches Return 0 Results

This error occurs when the Search Service is not populated with data. See the Search Core for information on populating the Search Service.


FirstGov Logo
+ Freedom of Information Act
+ NASA 2003 Strategic Plan
+ NASA Privacy Statement, Disclaimer, and
   Accessiblity Certification

+ Copyright/Image Use Policy
NASA Logo
Curator: Emily.S.Law
Webmaster: Maryia Sauchanka-Davis
NASA Official: William Knopf
Last Updated:
+ Comments and Questions