Andrew, Abe,
I'll commit some helpful changes and doco that should make the procedure for using JNDI in jetty straightforward (it does work surprisingly).
Cheers,
Simon
________________________________________
From: andrew walsh [awalsh@anonymised.com]
Sent: Friday, 14 December 2012 2:17 PM
To: Richard (Abe) Coughlin
Cc: geonetwork-users@lists.sourceforge.net
Subject: Re: [GeoNetwork-users] How do I get spatial searches to use the postgis spatial index table?
Hi Richard,
Thanks, I will take a look at that Jetty HowTo. I will be useful for us to work out
JNDI configuration with Jetty.
Regards,
Andrew
----- Original Message -----
From: Richard (Abe) Coughlin
To: andrew walsh
Cc: geonetwork-users@lists.sourceforge.net
Sent: Friday, December 14, 2012 2:01 PM
Subject: Re: [GeoNetwork-users] How do I get spatial searches to use the postgis spatial index table?
The JNDI data connection is meant to work in Jetty (see http://wiki.eclipse.org/Jetty/Howto/Configure_JNDI_Datasource).
I've followed the directions 'Advanced Configuration' (http://geonetwork-opensource.org/manuals/trunk/eng/users/admin/advanced-configuration/index.html) with no luck. However this article is for release 2.7. I've been trying on 2.6.4 although the article suggests it was possible on earlier versions. However, the improvements to the JNDI DB pool connection were done late last year and I think will be available in the next release.
@Simon, it's good to hear that Lucene is this good. I know I won't have a million records for a while yet.
Some background info on setting up Tomcat JNDI datasources - Apache Tomcat 7 (7.0.109) - JNDI Datasource HOW-TO
Abe.
Richard "Abe" Coughlin
SPATIAL DATA & APPLICATIONS SPECIALIST
Pacific Islands Ocean Observing System
University of Hawaii 1-808-956-0822
www.pacioos.org
On 12/13/2012 2:18 PM, andrew walsh wrote:
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" <rac88@anonymised.com146...>
To: <geonetwork-users@lists.sourceforge.net>
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" <awalsh@anonymised.com>
To: <geonetwork-users@lists.sourceforge.net>
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
Best Open Source Mac Front-Ends 2024
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
geonetwork-users List Signup and Options
GeoNetwork OpenSource is maintained at GeoNetwork - Geographic Metadata Catalog download | SourceForge.net
------------------------------------------------------------------------------
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
Best Open Source Mac Front-Ends 2024
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
geonetwork-users List Signup and Options
GeoNetwork OpenSource is maintained at GeoNetwork - Geographic Metadata Catalog download | SourceForge.net