Skip to content

Commit

Permalink
Multilingual indexing
Browse files Browse the repository at this point in the history
git-svn-id: https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk@8750 ff403467-3f20-0410-99e5-ff581e626a08
  • Loading branch information
heikkidoeleman committed Mar 2, 2012
1 parent 79b06dd commit 3aac9f0
Show file tree
Hide file tree
Showing 214 changed files with 9,020 additions and 1,294 deletions.
24 changes: 24 additions & 0 deletions web/pom.xml
Expand Up @@ -129,6 +129,18 @@
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers</artifactId>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-misc</artifactId>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queries</artifactId>
</dependency>
<dependency>
<groupId>pcj</groupId>
<artifactId>pcj</artifactId>
</dependency>
<dependency>
<groupId>batik</groupId>
<artifactId>batik-ext</artifactId>
Expand Down Expand Up @@ -312,6 +324,18 @@
<artifactId>netcdf</artifactId>
<version>4.0.patch</version>
</dependency>
<!-- language detection -->
<dependency>
<groupId>com.cybozu.labs</groupId>
<artifactId>langdetect</artifactId>
<version>1.0.0.0</version>
</dependency>
<dependency>
<groupId>net.arnx.jsonic</groupId>
<artifactId>jsonic</artifactId>
<version>1.2.0</version>
</dependency>
<!-- end language detection -->
<dependency>
<groupId>opendap</groupId>
<artifactId>opendap</artifactId>
Expand Down
20 changes: 13 additions & 7 deletions web/src/main/java/org/fao/geonet/constants/Geonet.java
Expand Up @@ -40,7 +40,8 @@ public class Geonet
public static final Namespace OASIS_CATALOG_NAMESPACE = Namespace.getNamespace("urn:oasis:names:tc:entity:xmlns:xml:catalog");

public static final String CC_API_REST_URL = "http://api.creativecommons.org/rest/1.5/simple/chooser";

public static final String LUCENE_LOCALE_KEY = "_locale";

//--------------------------------------------------------------------------
//--- container for file names

Expand Down Expand Up @@ -391,6 +392,7 @@ public class SearchResult
public static final String BUILD_SUMMARY = "buildSummary";
public static final String SUMMARY_ONLY = "summaryOnly";


//-----------------------------------------------------------------------

public class ResultType
Expand Down Expand Up @@ -521,25 +523,29 @@ public class CodeList
public static final String SVN_MANAGER = GEONETWORK + ".svnmanager";
public static final String SCHEMA_MANAGER = GEONETWORK + ".schemamanager";
public static final String DB = GEONETWORK + ".database";
public static final String THESAURUS_MAN= GEONETWORK + ".thesaurus-man";
public static final String SEARCH_ENGINE= GEONETWORK + ".search";
public static final String THESAURUS_MAN = GEONETWORK + ".thesaurus-man";
public static final String THESAURUS = GEONETWORK + ".thesaurus";
public static final String SEARCH_ENGINE = GEONETWORK + ".search";
public static final String CUSTOM_ELEMENTSET = GEONETWORK + ".customelementset";
public static final String Z3950_SERVER = GEONETWORK + ".z3950server";
public static final String Z3950 = GEONETWORK + ".z3950";
public static final String INDEX_ENGINE = GEONETWORK + ".index";
public static final String INDEX_ENGINE = GEONETWORK + ".index";
public static final String LUCENE = GEONETWORK + ".lucene";
public static final String MEF = GEONETWORK + ".mef";
public static final String CSW = GEONETWORK + ".csw";
public static final String LDAP = GEONETWORK + ".ldap";
public static final String EDITOR = GEONETWORK + ".editor";
public static final String EDITOR = GEONETWORK + ".editor";
public static final String EDITORADDELEMENT = GEONETWORK + ".editoraddelement";
public static final String EDITOREXPANDELEMENT = GEONETWORK + ".editorexpandelement";
public static final String SPATIAL = GEONETWORK + ".spatial";
public static final String CSW_SEARCH = CSW + ".search";
public static final String CSW_SEARCH = CSW + ".search";
public static final String CSW_HARVEST = CSW + ".harvest";
public static final String SRU = GEONETWORK + ".sru";
public static final String SRU_SEARCH = SRU + ".search";
public static final String OAI = GEONETWORK + ".oai";
public static final String OAI_HARVESTER = OAI + ".provider";
// keys for logging search log
public static final String SEARCH_LOGGER= GEONETWORK + ".search-logger";
public static final String SEARCH_LOGGER = GEONETWORK + ".search-logger";
public static final String THREADPOOL = GEONETWORK + ".threadpool";

//--------------------------------------------------------------------------
Expand Down
Expand Up @@ -26,6 +26,7 @@
import jeeves.resources.dbms.Dbms;
import jeeves.server.ServiceConfig;
import jeeves.server.context.ServiceContext;
import jeeves.utils.Log;
import jeeves.utils.Xml;
import org.fao.geonet.GeonetContext;
import org.fao.geonet.constants.Geonet;
Expand Down Expand Up @@ -79,7 +80,7 @@ public Element exec(Element params, ServiceContext context) throws Exception {

result.addContent(cswEnabledElement);

System.out.println("\n\n\nget customelementset:\n" + Xml.getString(result));
Log.debug(Geonet.CUSTOM_ELEMENTSET, "get customelementset:\n" + Xml.getString(result));

return result;
}
Expand Down
Expand Up @@ -27,6 +27,7 @@
import jeeves.resources.dbms.Dbms;
import jeeves.server.ServiceConfig;
import jeeves.server.context.ServiceContext;
import jeeves.utils.Log;
import jeeves.utils.Xml;
import org.fao.geonet.GeonetContext;
import org.fao.geonet.constants.Geonet;
Expand Down Expand Up @@ -74,7 +75,8 @@ public Element exec(Element params, ServiceContext context) throws Exception {
* @throws Exception
*/
private void saveCustomElementSets(Element params, GeonetContext gc, Dbms dbms) throws Exception {
System.out.println("\n\n\nset customelementset:\n" + Xml.getString(params));
Log.debug(Geonet.CUSTOM_ELEMENTSET, "set customelementset:\n" + Xml.getString(params));

CustomElementSet customElementSet = new CustomElementSet();
List<Element> xpaths = params.getChildren("xpath");
for(Element xpath : xpaths) {
Expand Down
Expand Up @@ -98,7 +98,7 @@ public Element exec(Element params, ServiceContext context) throws Exception {
//
// re-initialize Lucene analyzer with changed stopwords
//
gc.getSearchmanager().createAnalyzer(settingInfo);
// gc.getSearchmanager().createAnalyzer(settingInfo);

response.addContent(new Element("displayRebuildIndex"));
return response;
Expand Down

0 comments on commit 3aac9f0

Please sign in to comment.