To configure solr / local solr for th...

To configure solr / local solr for the ChefMoz example you must change a few configurations
in the local solr example.

Begin with downloading the local solr example
tar -xvzf solr-example.tgz

cd solr-example/apache-solr-1.3-dev/example/solr
#remove the demo data directory
rm -rf data

Download and expand the chefmoz-example files.

Replace the fields in schema.xml file with the ChefMoz version (full version available in the chefmoz-example)

<field name="id" type="string" indexed="true" stored="true"/>
<field name="location" type="text" indexed="true" stored="true"/>
<field name="title" type="text" indexed="true" stored="true" omitNorms="true"/>
<field name="address" type="text" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
<field name="city" type="string" indexed="true" stored="true"/>
<field name="state" type="string" indexed="true" stored="true"/>
<field name="country" type="text" indexed="true" stored="true"/>
<field name="phone" type="string" indexed="true" stored="true"/>
<field name="description" type="text" indexed="true" stored="true"/>
<field name="recommendations" type="text" indexed="true" stored="true"/>
<field name="overallrating" type="sdouble" indexed="true" stored="true"/>
<!-- local lucene field types -->
<field name="lat" type="sdouble" indexed="true" stored="true"/>
<field name="long" type="sdouble" indexed="true" stored="true"/>
<field name="geo_distance" type="sdouble" indexed="true"/>
<dynamicField name="_local*" type="sdouble" indexed="true" stored="true"/>

<!-- field to use to determine and enforce document uniqueness. -->

<!-- field for the QueryParser to use when an explicit fieldname is absent -->

Change the solrconfig.xml, again full version is available in the chefmoz-example

<factory name="standard" class="solr.ChainedUpdateProcessorFactory" default="true">
<chain class="">
<str name="latField">lat</str>
<str name="lngField">long</str>
<int name="startTier">9</int>
<int name="endTier">17</int>
<chain class="solr.LogUpdateProcessorFactory" >
<chain class="solr.RunUpdateProcessorFactory" />


<!-- local lucene request handler -->
<requestHandler name="geo" class="">
<!-- default values for query parameters -->
<str name="latField">lat</str>
<str name="lngField">long</str>
<lst name="defaults">
<str name="echoParams">explicit</str>