Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Install the patch of GeoRSS ResponseWriter from https://issues.apache.org/jira/browse/SOLR-2074Image Removed. Please make sure you install the latest version.

Add the following configuration to the Solr solrconfig.xml file (you may add this manually or use the earliest version of the GeoRSS ResponseWriter patch to do this)

Code Block
<queryResponseWriter name="georss"/>

Indexing in Solr

When you perform indexing in Solr, please make sure you also index the following fields:

Panel

name, link, location (type="location"),  pubDate (or timestamp, type="date"),  features (optional)

You need to edit the Solr schema.xml file before indexing the above fields, e.g. adding the following lines if they do not exist: 

Code Block

   <field name="name" type="text_general" indexed="true" stored="true"/>
   <field name="link" type="string" indexed="true" stored="true"/>
   <field name="location" type="location" indexed="true" stored="true"/>
   <field name="pubDate" type="date" indexed="true" stored="true" multiValued="false"/>

Test the Solr GeoRSS

Restart the Solr. Suppose your Solr URL is under http://localhost:8080/solr/.

In the browser, enter http://localhost:8080/solr/select/?q=*:*&wt=georss, and then "view page source". If you have installed GeoRSS ResponseWriter successfully and indexed the required fields, you should be able to see the output similar to the following.

Code Block

<?xml version='1.0'?>
<rss version='2.0' xmlns:geo='http://www.w3.org/2003/01/geo/wgs84_pos#'>
	<channel>
		<title>Solr Search Results</title>
		<description>GeoRSS Formatted Search Results</description>
		<item>
			<title>00000001 pages 1-249.pdf</title>
			<link>http://localhost:8080/solr/vault/00000001 pages 1-249.pdf</link>
			<pubDate>Sat, 28 Apr 2012 23:01:48 PDT</pubDate>
			<geo:lat>37.25022</geo:lat>
			<geo:long>-119.75126</geo:long>
		</item>
		<item>
			<title>00000001 pages 250-461.pdf</title>
			<link>http://localhost:8080/solr/vault/00000001 pages 250-461.pdf</link>
			<pubDate>Sat, 28 Apr 2012 23:01:48 PDT</pubDate>
			<geo:lat>37.25022</geo:lat>
			<geo:long>-119.75126</geo:long>
		</item>
		<item>
			<title>100-342146 Section 1 -6.PDF</title>
			<link>http://localhost:8080/solr/vault/100-342146 Section 1 -6.PDF</link>
			<pubDate>Sat, 28 Apr 2012 23:01:48 PDT</pubDate>
			<geo:lat>32.31872</geo:lat>
			<geo:long>-102.54572</geo:long>
		</item>
     </channel>
</rss>

SIS Webapp Configuration

Add the URL used in Solr GeoRSS to the sis_location_config.xml file for the SIS webapp. Make sure to encode all the '&' to '&'  in the URL. Remove all the other RSS URLs from the file. After editing the file, it should look similar to the following:

Code Block

<sis:locationConfig xmlns:sis="http://incubator.apache.org/sis/1.0">
    <capacity>4</capacity>
    <depth>10</depth>
    <url>http://localhost:8080/solr/select/?q=*:*&amp;wt=georss&amp;start=0&amp;rows=2000</url>
</sis:locationConfig>

Running The SIS Demo Image Added