From: andrew w. <aw...@me...> - 2012-12-14 00:18:41
|
Hi Richard, Thanks for your help. Looks like thats the approach if you use Tomcat but I am using using Jetty and I found errors using <provider>jeeves.resources.dbms.JNDIPool</provider> so I instead use the <provider>jeeves.resources.dbms.ApacheDBCPool</provider>. Will the <provideDataStore>true</provideDataStore> work with Jetty and the ApacheDBCPool? Regards, Andrew ----- Original Message ----- From: "Richard (Abe) Coughlin" <ra...@ha...> To: <geo...@li...> Sent: Friday, December 14, 2012 10:59 AM Subject: Re: [GeoNetwork-users] How do I get spatial searches to use the postgis spatial index table? > In the database connection you have to modify the standard approach: > change from the DBMSPool to the JNDIPool, add a few lines in the > connection parameters and modify the context.xml file for Tomcat. > > see... > http://geonetwork-opensource.org/manuals/trunk/eng/users/admin/advanced-configuration/index.html > > <resource enabled="true"> > <name>main-db</name> > <provider>jeeves.resources.dbms.JNDIPool</provider> > <config> > <context>java:/comp/env</context> > <resourceName>jdbc/geonetwork</resourceName> > <url>jdbc:oracle:thin:@localhost:1521:oracle-XE</url> > <provideDataStore>true</provideDataStore> > </config> > </resource> > > > Abe. > > > Richard "Abe" Coughlin > > SPATIAL DATA & APPLICATIONS SPECIALIST > *Pacific Islands Ocean Observing System* > *University of Hawaii 1-808-956-0822 * > www.pacioos.org <http://www.pacioos.org> > On 12/13/2012 12:35 PM, andrew walsh wrote: >> Hi List, >> >> Still no answer. Anybody out there who knows about this? >> Is just lucene being used or the spatial index table? >> >> Andrew >> >> ----- Original Message ----- >> From: "andrew walsh" <aw...@me...> >> To: <geo...@li...> >> Sent: Friday, December 07, 2012 2:13 PM >> Subject: 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 >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> _______________________________________________ >> GeoNetwork-users mailing list >> Geo...@li... >> https://lists.sourceforge.net/lists/listinfo/geonetwork-users >> GeoNetwork OpenSource is maintained at >> http://sourceforge.net/projects/geonetwork > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > GeoNetwork-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geonetwork-users > GeoNetwork OpenSource is maintained at > http://sourceforge.net/projects/geonetwork > |