[GeoNetwork-users] How do I get spatial searches to use the postgis spatial index table?

Hi All,

I am testing GN2.8RC2 with postgres+postgis as a database and a Jetty web server on Windows XP.

I wish to use the spatial index table for spatial searches (e.g bounding box on Advanced Search)
but is looks to me from the GN log that lucene queries are being done instead ?

When I switch on search debugging and I can see Lucene queries the GN log:

2012-12-07 13:46:29,921 INFO [jeeves.request] - HTML Request (from 127.0.0.1) : /geonetwork/srv/eng/main.search.embedded
2012-12-07 13:46:29,921 DEBUG [jeeves.request] - Method : GET
2012-12-07 13:46:29,921 DEBUG [jeeves.request] - Content type : null
2012-12-07 13:46:29,921 DEBUG [jeeves.request] - Accept : text/javascript, text/html, application/xml, text/xml, */*
2012-12-07 13:46:29,921 DEBUG [jeeves.request] - Session id is 1hubiis3rlr4zlep28hill5zv
2012-12-07 13:46:29,921 INFO [jeeves.service] - Dispatching : main.search.embedded
2012-12-07 13:46:29,921 INFO [jeeves.webapp.main.search.embedded] - Creating searchers
2012-12-07 13:46:29,921 DEBUG [geonetwork.search] - LuceneQueryBuilder: luceneQueryInput is:
owner:null group: 1 group: 0 isReviewer:false isUserAdmin:false isAdmin:false eastBL:[36.5625] southBL:[-9.8438] northBL:[4.2188] relation:[overlaps] westBL:[22.5000]
2012-12-07 13:46:29,921 DEBUG [geonetwork.search] - Lucene query: +(_op0:1 _op2:1 _op0:0 _op2:0) +eastBL:[22.5 TO 180.0] +westBL:[-180.0 TO 36.5625] +northBL:[-9.8438 TO 90.0] +southBL:[-90.0 TO 4.2188] +_isTemplate:n
2012-12-07 13:46:29,921 DEBUG [geonetwork.search] - Sorting by : relevance
2012-12-07 13:46:29,921 DEBUG [geonetwork.search] - Sorting by : [relevance,true]
2012-12-07 13:46:29,921 DEBUG [geonetwork.search] - Setting up the TFC with numHits 1000
2012-12-07 13:46:29,921 DEBUG [geonetwork.search] - Lucene query: +(_op0:1 _op2:1 _op0:0 _op2:0) +eastBL:[22.5 TO 180.0] +westBL:[-180.0 TO 36.5625] +northBL:[-9.8438 TO 90.0] +southBL:[-90.0 TO 4.2188] +_isTemplate:n
2012-12-07 13:46:29,937 DEBUG [geonetwork.search] - Building summary
2012-12-07 13:46:29,937 DEBUG [geonetwork.search] - ResultType is hits, SummaryKeys are {keyword={typeConfig=[Element: <typeConfig/>], max=10, order=freq, name=keyword, type=string, plural=keywords}}
2012-12-07 13:46:29,937 DEBUG [geonetwork.search] - Sorting 9 according to frequency of keyword
2012-12-07 13:46:29,937 DEBUG [geonetwork.search] - Hits found : 2

By the way my database configuration in WEB-INF/config.xml is this:

  <resource enabled="true">
   <name>main-db</name>
   <provider>jeeves.resources.dbms.ApacheDBCPool</provider>
   <config>
    <user>postgres</user>
    <password>admin</password>
    <!-- we use org.postgis.DriverWrapper in place of
    org.postgresql.Driver to support both postgresql and postgis -->
    <driver>org.postgis.DriverWrapper</driver>

    <url>jdbc:postgresql_postGIS://localhost:5432/GN2.8RC2</url>
    <poolSize>10</poolSize>
    <validationQuery>SELECT 1</validationQuery>
   </config>
  </resource>

How do I configure my GN to use the postgis spatial index table for spatial searches rather than Lucene?

Andrew