You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2011/04/29 11:20:38 UTC
svn commit: r1097740 [5/10] - in /incubator/stanbol/trunk: entityhub/
entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/mapping/
entityhub/generic/servicesapi/src/main/java/org/apache/stanbol/entityhub/servicesapi/mapping/
entityhu...
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/pom.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/pom.xml?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/pom.xml (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/pom.xml Fri Apr 29 09:20:31 2011
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.entityhub.indexing.parent</artifactId>
+ <version>0.9-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.entityhub.indexing.destination.solryard</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Stanbol Entityhub Indexing SolrYard destination</name>
+ <description>
+ Implementation of the IndexingTarget interface for the Stanbol Entityhub SolrYard.
+ </description>
+ <scm>
+ <connection>
+ scm:svn:http://svn.apache.org/repos/asf/incubator/stanbol/trunk/entityhub/indexing/destination/solryard
+ </connection>
+ <developerConnection>
+ scm:svn:https://svn.apache.org/repos/asf/incubator/stanbol/trunk/entityhub/indexing/destination/solryard
+ </developerConnection>
+ <url>http://incubator.apache.org/stanbol</url>
+ </scm>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>
+ org.apache.stanbol.entityhub.indexing.destination.solryard;version=${pom.version},
+ </Export-Package>
+ <!-- <Private-Package>
+ </Private-Package> -->
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.entityhub.servicesapi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.entityhub.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.entityhub.indexing.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.entityhub.yard.solr</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <!-- dependencies for testing -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <!-- Testing the SolrYard needs all Solr/Lucene dependencies -->
+ <dependency> <!-- because the SolrYard uses ConfigurationExceptions -->
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-solrj</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-analyzers</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-highlighter</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-memory</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-misc</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-queries</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-snowball</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-spellchecker</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-commons-csv</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- The Solr-Core depends on the Servlet API and in case of running an
+ EmbeddedSolrServer the servlet-api is not available -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java Fri Apr 29 09:20:31 2011
@@ -0,0 +1,518 @@
+package org.apache.stanbol.entityhub.indexing.destination.solryard;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.ServiceLoader;
+import java.util.Map.Entry;
+
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.stanbol.entityhub.core.mapping.FieldMappingUtils;
+import org.apache.stanbol.entityhub.core.site.CacheUtils;
+import org.apache.stanbol.entityhub.indexing.core.Indexer;
+import org.apache.stanbol.entityhub.indexing.core.IndexingDestination;
+import org.apache.stanbol.entityhub.indexing.core.config.IndexingConfig;
+import org.apache.stanbol.entityhub.indexing.core.impl.IndexerConstants;
+import org.apache.stanbol.entityhub.servicesapi.mapping.FieldMapper;
+import org.apache.stanbol.entityhub.servicesapi.mapping.FieldMapping;
+import org.apache.stanbol.entityhub.servicesapi.model.rdf.RdfResourceEnum;
+import org.apache.stanbol.entityhub.servicesapi.yard.Yard;
+import org.apache.stanbol.entityhub.servicesapi.yard.YardException;
+import org.apache.stanbol.entityhub.yard.solr.SolrDirectoryManager;
+import org.apache.stanbol.entityhub.yard.solr.defaults.SolrConst;
+import org.apache.stanbol.entityhub.yard.solr.impl.EmbeddedSolrPorovider;
+import org.apache.stanbol.entityhub.yard.solr.impl.SolrYard;
+import org.apache.stanbol.entityhub.yard.solr.impl.SolrYardConfig;
+import org.apache.stanbol.entityhub.yard.solr.impl.install.SolrIndexInstaller;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SolrYardIndexingDestination implements IndexingDestination {
+
+ private static final Logger log = LoggerFactory.getLogger(SolrYardIndexingDestination.class);
+
+ /**
+ * Parameter used to refer to the name of the properties file containing the
+ * field names as key and the {@link Float} boost factors as values. As
+ * default no boosts will be used for indexing.
+ */
+ public static final String PARAM_FIELD_BOOST_CONFIG = "boosts";
+ /**
+ * Parameter used to explicitly set the name of the creates SolrYard
+ * configuration. The default value will be set to the name of the dataSet
+ * and adding "Index" to the end.
+ */
+ public static final String PARAM_YARD_NAME = "name";
+ /**
+ * Parameter used to explicitly set the name of the created Solr Index. The
+ * default will be set to the name of the dataset to be indexed as returned
+ * by {@link IndexingConfig#getName()}.
+ */
+ public static final String PARAM_SOLR_INDEX_NAME = "indexName";
+
+ /**
+ * Parameter used to set the name of the directory used as root for the
+ * SolrIndex. The value is relative to the
+ * {@link IndexingConfig#getDestinationFolder()}. The default value is
+ * {@link #DEFAULT_SOLR_INDEX_DIRECTORY}
+ */
+ public static final String PARAM_SOLR_INDEX_DIRECTORY = "solrDir";
+ /**
+ * Parameter used to specify the name of the directory relative to the
+ * {@link IndexingConfig#getConfigFolder()} that contains the
+ * Solr configuration used for indexing. The default is that the config is
+ * searches under a folder with the name proveded by
+ * {@link #PARAM_SOLR_INDEX_NAME} (that defaults to
+ * {@link IndexingConfig#getName()}). <p>
+ * However note that when this parameter is missing this configuration is
+ * optional (meaning that if it is not found the
+ * default Solr Configuration is used). When this parameter is used, than
+ * the configuration is required and an {@link IllegalArgumentException} is
+ * thrown it not found.<p>
+ * To use the default, but marking the configuration as required one can
+ * add this parameter without a value.
+ */
+ public static final String PARAM_SOLR_CONFIG = "solrConf";
+ /**
+ * The default value for the directory holding the Solr index set to
+ * {@link SolrDirectoryManager#DEFAULT_SOLR_DATA_DIR}
+ */
+ public static final String DEFAULT_SOLR_INDEX_DIRECTORY =
+ SolrDirectoryManager.DEFAULT_SOLR_DATA_DIR;
+ /**
+ * The field used to boost documents while indexing. This is set to
+ * {@link RdfResourceEnum#signRank}
+ */
+ public static final String DOCUMENT_BOOST_FIELD = RdfResourceEnum.signRank.getUri();
+ /**
+ * The extension of the distribution file
+ */
+ public static final String SOLR_INDEX_ARCHIVE_EXTENSION = ".solrindex.zip";
+ /**
+ * The extension of the solrIndex reference file
+ */
+ public static final String SOLR_INDEX_ARCHIVE_REF_EXTENSION = ".solrindex.ref";
+
+ /**
+ * The location of the SolrIndex. This MUST BE an absolute Path in case it
+ * refers to a directory of the local file system and <code>null</code> in
+ * case an external SolrServer is used.
+ * Also NOTE that this can be an different value than returned by calling
+ * {@link SolrYardConfig#getSolrServerLocation()} on {@link #solrIndexConfig}
+ */
+ private File solrIndexLocation;
+ /**
+ * The directory used in case an embedded Solr server is used. This value
+ * is also available by the System property with the name
+ * {@link SolrDirectoryManager#MANAGED_SOLR_DIR_PROPERTY}
+ */
+ private File managedSolrDir;
+
+ /**
+ * Directory holding the specialised Solr configuration or <code>null</code>
+ * if the default configuration should be used
+ */
+ private File solrIndexConfig;
+
+ /**
+ * The configuration used to instantiate the {@link SolrYard} returned by
+ * {@link #getYard()}.
+ */
+ private SolrYardConfig solrYardConfig;
+
+ private SolrYard solrYard;
+
+ /**
+ * File used to write the ZIP archive containing the solr index.
+ */
+ private File solrArchive;
+ /**
+ * File used to write the properties file that refers to {@link #solrArchive}.
+ * This is typically included in distributions of huge indexes and will
+ * request the user to download the archive with the actual data.
+ */
+ private File solrArchiveRef;
+ /**
+ * This provides metadata about what fields and languages are indexed in the
+ * created SolrIndex.
+ */
+ private Collection<FieldMapping> indexFieldConfiguration;
+
+ /**
+ * This Constructor relays on a subsequent call to
+ * {@link #setConfiguration(Map)} to parse the required configuration
+ */
+ public SolrYardIndexingDestination(){
+
+ }
+ /**
+ * Constructs an SolrYard based IndexingTarget based on the parsed parameters
+ * @param yardName the name of the SolrYard
+ * @param solrLocation the location of the SolrYard
+ */
+ public SolrYardIndexingDestination(String yardName,String solrLocation){
+ this(yardName,solrLocation,null,null,null);
+ }
+ /**
+ * Constructs an SolrYard based IndexingTarget based on the parsed parameters
+ * @param yardName the name of the SolrYard
+ * @param parsedSolrLocation the location of the SolrYard
+ * @param solrConfig directory holding the Solr schema used for the indexing or
+ * <code>null</code> to use the default
+ * @param indexFieldConfig The field and languages indexed in this index
+ * @param fieldBoostMap A map containing field names as key and boost factors
+ * as values. Parse <code>null</code> to use no boosts.
+ */
+ public SolrYardIndexingDestination(final String yardName,
+ final String parsedSolrLocation,
+ final String solrConfig,
+ Collection<FieldMapping> indexFieldConfig,
+ Map<String,Float> fieldBoostMap){
+ if(yardName == null || yardName.isEmpty()){
+ throw new IllegalArgumentException("Tha name of the Yard MUST NOT be NULL nor empty!");
+ }
+ if(parsedSolrLocation == null || parsedSolrLocation.isEmpty()){
+ throw new IllegalArgumentException("Tha parsed Solr location MUST NOT be NULL nor empty!");
+ }
+ this.indexFieldConfiguration = indexFieldConfig;
+ this.solrYardConfig = new SolrYardConfig(yardName, parsedSolrLocation);
+ this.solrYardConfig.setMultiYardIndexLayout(Boolean.FALSE);
+ //init the manages solr directory relative to the working directory
+ File managedDirectory = new File(
+ System.getProperty("user.dir"),DEFAULT_SOLR_INDEX_DIRECTORY);
+ File distDirectory = new File(
+ System.getProperty("user.dir"),"dist");
+ //init the solr directory and validate the parsed values
+ File[] solrDirectories = initSolrDirectories(parsedSolrLocation, solrConfig,
+ managedDirectory,distDirectory);
+ this.solrIndexLocation = solrDirectories[0];
+ this.solrIndexConfig = solrDirectories[1];
+ this.solrArchive = solrDirectories[2];
+ this.solrArchiveRef = solrDirectories[3];
+ //set Boost related stuff
+ solrYardConfig.setDocumentBoostFieldName(DOCUMENT_BOOST_FIELD);
+ if(fieldBoostMap != null){
+ solrYardConfig.setFieldBoosts(fieldBoostMap);
+ }
+ }
+ /**
+ * Processes the parsed solr index location (may be an URL, an absolute path
+ * or a relative one) and the optional solr schema configuration (only valid
+ * in case an relative path was parsed as location) and does all the
+ * initialisation work (including to set the
+ * {@link SolrDirectoryManager#MANAGED_SOLR_DIR_PROPERTY} system property)
+ * @param parsedSolrLocation the parsed location of the SolrServer (may be
+ * an URL, an absolute path or a relative one)
+ * @param solrConfig the path to the directory holding the configuration
+ * for the Solr index used for the indexing or <code>null</code> to use the
+ * default (only supported in case parsedSolrLocation is a relative path)
+ * @param managedDirectory the directory used to manage the Solr index (only
+ * needed in case parsedSolrLocation is an
+ * @return An array with the length 4 where index <ul>
+ * <li>"0" contains the File pointing to the directory holding the
+ * index on the local file system
+ * <li>"1" contains the File pointing to the directory containing the
+ * configuration used to initialise the index.
+ * <li>"2" contains the File used to create the compressed ZIP archive with
+ * the indexed data
+ * <li>"3" contains the File used to create the properties file used to link
+ * to the Solr index archive.
+ *
+ * All files will be <code>null</code> if the values are not applicable to
+ * the current configuration.
+ */
+ private File[] initSolrDirectories(final String parsedSolrLocation,
+ final String solrConfig,
+ File managedDirectory,
+ File distDirectory) {
+ File solrIndexLocation;
+ File solrConfigLocation;
+ File solrIndexArchive;
+ File solrIndexArchiveRef;
+ //set the SolrLocation and init the SolrDirectoryManager system property
+ //in case the solrLocation is not an remote SolrServer
+ if(parsedSolrLocation.startsWith("http")
+ && parsedSolrLocation.indexOf("://") > 0){ //matches http[s]://{host}
+ solrIndexLocation = null;
+ if(solrConfig != null){
+ //rather throw an error as indexing for some hours to an index
+ //with the wrong schema!
+ throw new IllegalArgumentException(String.format(
+ "Parsing special Solr Configurations (directory=%s) is not " +
+ "supported for remote SolrServer (url=%s",
+ parsedSolrLocation,solrConfig));
+ }
+ solrConfigLocation = null; //no configuration supported
+ solrIndexArchive = null;
+ solrIndexArchiveRef = null;
+ } else { // local Directory
+ File parsedSolrLocationFile = new File(parsedSolrLocation);
+ if(parsedSolrLocationFile.isAbsolute()){ //if not absolute
+ //-> assume an already configured Solr index
+ if(distDirectory == null){ //check that a dist dir is configured
+ throw new IllegalStateException("In case the Solr index location"+
+ "points to a local directory the Distribution Directory" +
+ "MUST NOT BE NULL!");
+ }
+ solrIndexLocation = parsedSolrLocationFile;
+ if(solrConfig != null){
+ throw new IllegalArgumentException(String.format(
+ "Parsing special Solr Configurations (directory=%s) is not " +
+ "supported for Embedded SolrServer configured via an absolute" +
+ "file path (path=%s", parsedSolrLocation,solrConfig));
+ }
+ solrConfigLocation = null; //no solr conf supported
+ } else { //relative path -> init the Solr directory
+ //set the managed directory
+ if(managedDirectory == null){
+ throw new IllegalStateException("In case the Solr index location"+
+ "is a relative path the parsed managed directory MUST NOT be NULL!");
+ }
+ System.setProperty(SolrDirectoryManager.MANAGED_SOLR_DIR_PROPERTY,
+ managedDirectory.getAbsolutePath());
+ //add the name of the core and save it to solrLocation
+ solrIndexLocation = new File(managedDirectory,parsedSolrLocation);
+ //check if there is a special SolrLocation
+ if(solrConfig != null){
+ solrConfigLocation = new File(solrConfig);
+ if(!solrConfigLocation.isDirectory()){
+ throw new IllegalArgumentException("The parsed Solr Configuration "+
+ solrConfigLocation+" does not exist or is not an direcotry!");
+ } //else the directory exists ...
+ //lets assume it is a valid configuration
+ //otherwise an exception will be thrown in initialise().
+ } else {
+ solrConfigLocation = null; //no configuration parsed
+ }
+ }
+ //for all local indexes configure the distribution file names
+ if(!distDirectory.isDirectory()){
+ if(!distDirectory.mkdirs()){
+ throw new IllegalStateException("Unable to create distribution "+
+ "Directory"+distDirectory.getAbsolutePath());
+ }
+ }
+ solrIndexArchive = new File(distDirectory,
+ solrIndexLocation.getName()+SOLR_INDEX_ARCHIVE_EXTENSION);
+ solrIndexArchiveRef = new File(distDirectory,
+ solrIndexLocation.getName()+SOLR_INDEX_ARCHIVE_REF_EXTENSION);
+ }
+ return new File[]{solrIndexLocation,solrConfigLocation,
+ solrIndexArchive,solrIndexArchiveRef};
+ }
+
+ @Override
+ public void setConfiguration(Map<String,Object> config) {
+ IndexingConfig indexingConfig = (IndexingConfig)config.get(IndexingConfig.KEY_INDEXING_CONFIG);
+ String yardName;
+ //read the Yard name configuration
+ Object value = config.get(PARAM_YARD_NAME);
+ if(value == null || value.toString().isEmpty()){
+ yardName = indexingConfig.getName()+"Index";
+ } else {
+ yardName = value.toString();
+ }
+ //read the Solr index name configuration
+ String indexName;
+ value = config.get(PARAM_SOLR_INDEX_NAME);
+ if(value == null || value.toString().isEmpty()){
+ indexName = indexingConfig.getName();
+ } else {
+ indexName = value.toString();
+ }
+ this.solrYardConfig = new SolrYardConfig(yardName, indexName);
+ this.solrYardConfig.setMultiYardIndexLayout(Boolean.FALSE);
+ this.solrYardConfig.setName("SolrIndex for "+indexingConfig.getName());
+ //set the Index Field Configuration
+ this.indexFieldConfiguration = indexingConfig.getIndexFieldConfiguration();
+ //set a description for the yard
+ if(indexingConfig.getDescription() != null){
+ //reuse the description
+ solrYardConfig.setDescription(indexingConfig.getDescription());
+ } else {
+ solrYardConfig.setDescription("SolrYard based Index for "+indexingConfig.getName());
+ }
+ //get the directors holding the solr configuration
+ String solrConfig;
+ if(!config.containsKey(PARAM_SOLR_CONFIG)){ //not present -> allow default
+ File configDir = new File(indexingConfig.getConfigFolder(),indexName);
+ if(!configDir.isDirectory()){
+ log.info("use default Solr index configuration for index "+indexName);
+ solrConfig = null;
+ } else {
+ solrConfig = configDir.getAbsolutePath();
+ }
+ } else { //require the config
+ value = config.get(PARAM_SOLR_CONFIG);
+ if(value == null || value.toString().isEmpty()){
+ value = indexName; //use the indexName as default
+ }
+ File configDir = new File(indexingConfig.getConfigFolder(),value.toString());
+ if(!configDir.isDirectory()){
+ throw new IllegalArgumentException("Required Solr Configuration "+
+ value.toString()+" not found within the config directory "+
+ indexingConfig.getConfigFolder().getAbsolutePath());
+ } else {
+ solrConfig = configDir.getAbsolutePath();
+ }
+ }
+ //init the managed directory within the destination folder
+ //read the Solr directory configuration
+ String solrDir;
+ value = config.get(PARAM_SOLR_INDEX_DIRECTORY);
+ if(value == null || value.toString().isEmpty()){
+ solrDir = DEFAULT_SOLR_INDEX_DIRECTORY;
+ } else {
+ solrDir = value.toString();
+ }
+ File managedDirectory = new File(indexingConfig.getDestinationFolder(),solrDir);
+ File[] solrDirectories = initSolrDirectories(indexName, solrConfig,
+ managedDirectory,indexingConfig.getDistributionFolder());
+ this.solrIndexLocation = solrDirectories[0];
+ this.solrIndexConfig = solrDirectories[1];
+ this.solrArchive = solrDirectories[2];
+ this.solrArchiveRef = solrDirectories[3];
+ //init other configurations
+ solrYardConfig.setDocumentBoostFieldName(DOCUMENT_BOOST_FIELD);
+ value = config.get(PARAM_FIELD_BOOST_CONFIG);
+ if(value != null && !value.toString().isEmpty()){
+ Map<String,Float> fieldBoosts = new HashMap<String,Float>();
+ //load this configuration as required if set to cause an Exception
+ //if not found! -> an exception is the better option as creating an
+ //index with missing Field Boosts!
+ for(Entry<String,Object> entry : indexingConfig.getConfig(value.toString(),true).entrySet()){
+ try {
+ fieldBoosts.put(entry.getKey(), Float.valueOf(entry.getValue().toString()));
+ } catch (Exception e) {
+ //throw exception for any invalid entry!
+ throw new IllegalArgumentException(String.format(
+ "Unable to parse Field Boost entry from field {} and boost {}",
+ entry.getKey(),entry.getValue()),e);
+ }
+ }
+ solrYardConfig.setFieldBoosts(fieldBoosts);
+ }
+ }
+
+ @Override
+ public boolean needsInitialisation() {
+ return true;
+ }
+
+ @Override
+ public void initialise() {
+ //The constructors and the setConfiguration(..) only validate the parsed
+ //parameters and initialise the member variables. This method performs
+ //the the actual initialisation of the SolrYard!
+ //copy a custom configuration (if present)
+ if(solrIndexConfig != null){ //can only be != null if also solrIndexLocation
+ //copy the configuration
+ try {
+ FileUtils.copyDirectory(solrIndexConfig, solrIndexLocation);
+ } catch (IOException e) {
+ throw new IllegalStateException(String.format(
+ "Unable to copy the Solr index configuration from %s to %s!",
+ solrIndexConfig,solrIndexLocation),e);
+ }
+ //disallow the default initialisation
+ solrYardConfig.setDefaultInitialisation(Boolean.FALSE);
+ } else {
+ //allow the default initialisation
+ solrYardConfig.setDefaultInitialisation(Boolean.TRUE);
+ }
+ try {
+ this.solrYard = new SolrYard(solrYardConfig);
+ } catch (YardException e) {
+ throw new IllegalStateException("Unable to initialise SolrYard "+
+ solrYardConfig.getId(),e);
+ }
+ }
+
+ @Override
+ public Yard getYard() {
+ if(solrYard == null){
+ throw new IllegalStateException("SolrYard not initialised. Call initialise first!");
+ }
+ return solrYard;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void finalise() {
+ //write the indexing configuration
+ FieldMapper mapper = FieldMappingUtils.createDefaultFieldMapper(indexFieldConfiguration);
+ try {
+ CacheUtils.storeBaseMappingsConfiguration(solrYard, mapper);
+ } catch (YardException e) {
+ log.error("Unable to store FieldMapperConfiguration to the Store!",e);
+ }
+ //zip the index and copy it over to distribution
+ if(solrArchive != null){
+ //we need to get the length of the parent to calc the entry names for
+ //the archvie
+ int parentPathLength = solrIndexLocation.getAbsolutePath().length();
+ if(solrIndexLocation.getAbsolutePath().charAt(parentPathLength-1) != File.separatorChar){
+ parentPathLength++; //add the missing '/'
+ }
+ try {
+ ZipArchiveOutputStream out = new ZipArchiveOutputStream(solrArchive);
+ for(File file : (Collection<File>)FileUtils.listFiles(solrIndexLocation, null, true)){
+ if(!file.isHidden()){
+ String name = file.getAbsolutePath().substring(parentPathLength);
+ log.info("add "+name);
+ ZipArchiveEntry entry = new ZipArchiveEntry(file, name);
+ out.putArchiveEntry(entry);
+ if(!entry.isDirectory()){
+ FileInputStream fileIn = new FileInputStream(file);
+ IOUtils.copy(fileIn,out);
+ out.closeArchiveEntry();
+ IOUtils.closeQuietly(fileIn);
+ }
+ }
+ }
+ out.finish();
+ IOUtils.closeQuietly(out);
+ }catch (IOException e) {
+ log.error("Error while creating Solr Archive "+solrArchive.getAbsolutePath()+
+ "! The archive will not be created!");
+ log.error("As a Workaround you can manually create the Solr Archive " +
+ "by creating a ZIP archive with the contents of the Folder " +
+ solrIndexLocation+"!");
+ }
+ }
+ if(solrArchiveRef != null){
+ Properties properties = new Properties();
+ properties.setProperty("Index-Archive", solrArchive.getName());
+ properties.setProperty("Name", solrYardConfig.getName());
+ if(solrYardConfig.getDescription() != null){
+ properties.setProperty("Description", solrYardConfig.getDescription());
+ }
+ try {
+ properties.store(new FileOutputStream(solrArchiveRef), null);
+ } catch (IOException e) {
+ log.error("Error while creating Solr Archive Reference "+
+ solrArchiveRef.getAbsolutePath()+
+ "! The file will not be created!");
+ log.error("As a Workaround you can manually create this text file " +
+ "and adding \"Index-Archive="+solrArchive.getName()+"\"!");
+ }
+ }
+ }
+
+ @Override
+ public void close() {
+ //nothing todo
+ }
+
+}
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestinationTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestinationTest.java?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestinationTest.java (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestinationTest.java Fri Apr 29 09:20:31 2011
@@ -0,0 +1,148 @@
+package org.apache.stanbol.entityhub.indexing.destination.solryard;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import javax.naming.NameParser;
+
+import org.apache.stanbol.entityhub.indexing.core.IndexingDestination;
+import org.apache.stanbol.entityhub.indexing.core.config.IndexingConfig;
+import org.apache.stanbol.entityhub.servicesapi.defaults.NamespaceEnum;
+import org.apache.stanbol.entityhub.servicesapi.model.Representation;
+import org.apache.stanbol.entityhub.servicesapi.model.rdf.RdfResourceEnum;
+import org.apache.stanbol.entityhub.servicesapi.yard.Yard;
+import org.apache.stanbol.entityhub.servicesapi.yard.YardException;
+import org.apache.stanbol.entityhub.yard.solr.impl.SolrYard;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.Assert.*;
+
+/**
+ * What to test:
+ * - correct initialisation
+ * - special schema initialisation
+ * - default schema initialisation
+ * - finalisation
+ * - writing of the IndexFieldConfiguration
+ * - creating of the {name}.solrindex.zip
+ * - creating of the {name}.solrindex.ref
+ *
+ * Indexing needs not to be tested, because this is the responsibility of the
+ * Unit Tests for the used Yard implementation.
+ *
+ * @author Rupert Westenthaler
+ *
+ */
+public class SolrYardIndexingDestinationTest {
+
+ private static final Logger log = LoggerFactory.getLogger(SolrYardIndexingDestinationTest.class);
+ /**
+ * mvn copies the resources in "src/test/resources" to target/test-classes
+ */
+ private static final String TEST_CONFIGS_ROOT = "/target/test-classes/testConfigs/";
+
+ /**
+ * The path to the folder used as root for the tests
+ */
+ private static String testRoot;
+ @BeforeClass
+ public static void init(){
+ //initialise based on basedir or user.dir
+ String baseDir = System.getProperty("basedir");
+ if(baseDir == null){
+ baseDir = System.getProperty("user.dir");
+ }
+ testRoot = baseDir+TEST_CONFIGS_ROOT;
+ log.info("Test Root ="+testRoot);
+ }
+ @Test(expected=IllegalArgumentException.class)
+ public void testMissingBoostConfig(){
+ IndexingConfig config = new IndexingConfig(testRoot+"missingBoostConfig");
+ config.getIndexingDestination();
+ }
+ @Test(expected=IllegalArgumentException.class)
+ public void testInvalidBoostConfig(){
+ IndexingConfig config = new IndexingConfig(testRoot+"invalidBoostConfig");
+ config.getIndexingDestination();
+ }
+ /**
+ * Tests that the Solr configuration is required, but the name of the config
+ * file is the default. The referenced directory is missing
+ */
+ @Test(expected=IllegalArgumentException.class)
+ public void testMissingDefaultSolrSchemaConfig(){
+ IndexingConfig config = new IndexingConfig(testRoot+"missingDefaultSolrConf");
+ config.getIndexingDestination();
+ }
+ /**
+ * Tests that the Solr configuration is required and the name of the config
+ * file is specified. The referenced directory is missing
+ */
+ @Test(expected=IllegalArgumentException.class)
+ public void testMissingSolrSchemaConfig(){
+ IndexingConfig config = new IndexingConfig(testRoot+"missingSolrConf");
+ config.getIndexingDestination();
+ }
+ @Test
+ public void testSimple() throws YardException, IOException {
+ IndexingConfig config = new IndexingConfig(testRoot+"simple");
+ validateSolrDestination(config);
+ }
+ @Test
+ public void testWithSolrConf() throws YardException, IOException {
+ IndexingConfig config = new IndexingConfig(testRoot+"withSolrConf");
+ validateSolrDestination(config);
+ }
+
+ /**
+ * Checks if the SolrYardIndexingDestination returned by the
+ * {@link IndexingConfig} is valid and functional
+ * @param config the configuration
+ * @throws YardException indicates problems while working with the {@link SolrYard}
+ * returned by {@link IndexingDestination#getYard()}
+ * @throws IOException indicates problems while validating the SolrArchives
+ * created by the {@link IndexingDestination#finalise()} method
+ */
+ private void validateSolrDestination(IndexingConfig config) throws YardException,
+ IOException {
+ //get the destination
+ IndexingDestination destination = config.getIndexingDestination();
+ assertNotNull(destination);
+ assertEquals(destination.getClass(), SolrYardIndexingDestination.class);
+ //initialise
+ assertTrue(destination.needsInitialisation());
+ destination.initialise();
+ //test that the returned Yard instance is functional
+ Yard yard = destination.getYard();
+ assertNotNull(yard);
+ assertEquals(yard.getClass(), SolrYard.class);
+ Representation rep = yard.create("http://www.example.com/entity#123");
+ rep.add(NamespaceEnum.rdfs+"label", "test");
+ rep.add(NamespaceEnum.rdfs+"description", "Representation to test storage while indexing");
+ rep.add(RdfResourceEnum.signRank.getUri(), Float.valueOf(0.8f));
+ yard.store(rep);
+ //finalise
+ destination.finalise();
+ //test the archives
+ File expectedSolrArchiveFile =
+ new File(config.getDistributionFolder(),config.getName()+".solrindex.zip");
+ assertTrue(expectedSolrArchiveFile.isFile());
+ //TODO: validate the archive
+
+ //check for the solrArchive reference file and validate required properties
+ File expectedSolrArchiveReferenceFile =
+ new File(config.getDistributionFolder(),config.getName()+".solrindex.ref");
+ assertTrue(expectedSolrArchiveReferenceFile.isFile());
+ Properties solrRefProperties = new Properties();
+ solrRefProperties.load(new FileInputStream(expectedSolrArchiveReferenceFile));
+ assertTrue(solrRefProperties.getProperty("Index-Archive").equals(expectedSolrArchiveFile.getName()));
+ assertTrue(solrRefProperties.getProperty("Name") != null);
+ }
+
+}
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestinationTest.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/fieldBoosts.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/fieldBoosts.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/fieldBoosts.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/fieldBoosts.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,3 @@
+http://www.example.com/correct=2.0
+http://www.example.com/other=5
+http://www.example.com/wrong=abc
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/fieldBoosts.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexFieldConfig.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexFieldConfig.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexFieldConfig.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexFieldConfig.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,28 @@
+#This is a similar version of the dbPediaMappings.txt but excludes mapping rules
+# --- Define the Languages for all fields ---
+| @=null;en;de;fr;it
+
+# --- RDF, RDFS and OWL Mappings ---
+rdfs:label
+rdfs:comment
+rdf:type
+# used by LOD to link to URIs used to identify the same Entity
+owl:sameAs
+
+# --- Other Namespaces to include---
+dc:*
+dc-elements:*
+geo:*
+skos:*
+foaf:*
+
+# --- dbpedia specific
+# the "dbp-ont" defines knowledge mapped to the DBPedia ontology
+dbp-ont:*
+
+# the "DBpedia properties are all key values pairs extracted from the info boxes
+# on the right hand side of Wikipedia pages.
+# uncomment the next line to include all
+#dbp-prop:*
+# Currently only the population is added
+dbp-prop:population
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexFieldConfig.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexing.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexing.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexing.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexing.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,4 @@
+name=missingBoostFile
+description=Indexing Config with a missing Boost File
+indexingDestination=org.apache.stanbol.entityhub.indexing.destination.solryard.SolrYardIndexingDestination,boosts:fieldBoosts
+fieldConfiguration=indexFieldConfig.txt
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/config/indexing.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/resources/testEntityScore.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/resources/testEntityScore.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/resources/testEntityScore.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/resources/testEntityScore.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,3 @@
+http://www.example.org/entity/test 100
+http://www.example.org/entity/test2 10
+http://www.example.org/entity/test3 1
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/invalidBoostConfig/indexing/resources/testEntityScore.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexFieldConfig.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexFieldConfig.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexFieldConfig.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexFieldConfig.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,28 @@
+#This is a similar version of the dbPediaMappings.txt but excludes mapping rules
+# --- Define the Languages for all fields ---
+| @=null;en;de;fr;it
+
+# --- RDF, RDFS and OWL Mappings ---
+rdfs:label
+rdfs:comment
+rdf:type
+# used by LOD to link to URIs used to identify the same Entity
+owl:sameAs
+
+# --- Other Namespaces to include---
+dc:*
+dc-elements:*
+geo:*
+skos:*
+foaf:*
+
+# --- dbpedia specific
+# the "dbp-ont" defines knowledge mapped to the DBPedia ontology
+dbp-ont:*
+
+# the "DBpedia properties are all key values pairs extracted from the info boxes
+# on the right hand side of Wikipedia pages.
+# uncomment the next line to include all
+#dbp-prop:*
+# Currently only the population is added
+dbp-prop:population
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexFieldConfig.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexing.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexing.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexing.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexing.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,4 @@
+name=missingBoostFile
+description=Indexing Config with a missing Boost File
+indexingDestination=org.apache.stanbol.entityhub.indexing.destination.solryard.SolrYardIndexingDestination,boosts:notPresent
+fieldConfiguration=indexFieldConfig.txt
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/config/indexing.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/resources/testEntityScore.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/resources/testEntityScore.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/resources/testEntityScore.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/resources/testEntityScore.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,3 @@
+http://www.example.org/entity/test 100
+http://www.example.org/entity/test2 10
+http://www.example.org/entity/test3 1
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingBoostConfig/indexing/resources/testEntityScore.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexFieldConfig.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexFieldConfig.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexFieldConfig.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexFieldConfig.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,28 @@
+#This is a similar version of the dbPediaMappings.txt but excludes mapping rules
+# --- Define the Languages for all fields ---
+| @=null;en;de;fr;it
+
+# --- RDF, RDFS and OWL Mappings ---
+rdfs:label
+rdfs:comment
+rdf:type
+# used by LOD to link to URIs used to identify the same Entity
+owl:sameAs
+
+# --- Other Namespaces to include---
+dc:*
+dc-elements:*
+geo:*
+skos:*
+foaf:*
+
+# --- dbpedia specific
+# the "dbp-ont" defines knowledge mapped to the DBPedia ontology
+dbp-ont:*
+
+# the "DBpedia properties are all key values pairs extracted from the info boxes
+# on the right hand side of Wikipedia pages.
+# uncomment the next line to include all
+#dbp-prop:*
+# Currently only the population is added
+dbp-prop:population
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexFieldConfig.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexing.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexing.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexing.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexing.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,6 @@
+name=simple
+description=The name is used as default for the SolrConf
+
+indexingDestination=org.apache.stanbol.entityhub.indexing.destination.solryard.SolrYardIndexingDestination,solrConf
+
+fieldConfiguration=indexFieldConfig.txt
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/config/indexing.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/resources/testEntityScore.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/resources/testEntityScore.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/resources/testEntityScore.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/resources/testEntityScore.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,3 @@
+http://www.example.org/entity/test 100
+http://www.example.org/entity/test2 10
+http://www.example.org/entity/test3 1
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingDefaultSolrConf/indexing/resources/testEntityScore.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexFieldConfig.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexFieldConfig.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexFieldConfig.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexFieldConfig.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,28 @@
+#This is a similar version of the dbPediaMappings.txt but excludes mapping rules
+# --- Define the Languages for all fields ---
+| @=null;en;de;fr;it
+
+# --- RDF, RDFS and OWL Mappings ---
+rdfs:label
+rdfs:comment
+rdf:type
+# used by LOD to link to URIs used to identify the same Entity
+owl:sameAs
+
+# --- Other Namespaces to include---
+dc:*
+dc-elements:*
+geo:*
+skos:*
+foaf:*
+
+# --- dbpedia specific
+# the "dbp-ont" defines knowledge mapped to the DBPedia ontology
+dbp-ont:*
+
+# the "DBpedia properties are all key values pairs extracted from the info boxes
+# on the right hand side of Wikipedia pages.
+# uncomment the next line to include all
+#dbp-prop:*
+# Currently only the population is added
+dbp-prop:population
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexFieldConfig.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexing.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexing.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexing.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexing.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,6 @@
+name=simple
+description=The name is used as default for the SolrConf
+
+indexingDestination=org.apache.stanbol.entityhub.indexing.destination.solryard.SolrYardIndexingDestination,solrConf:missingConf
+
+fieldConfiguration=indexFieldConfig.txt
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/config/indexing.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/resources/testEntityScore.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/resources/testEntityScore.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/resources/testEntityScore.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/resources/testEntityScore.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,3 @@
+http://www.example.org/entity/test 100
+http://www.example.org/entity/test2 10
+http://www.example.org/entity/test3 1
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/missingSolrConf/indexing/resources/testEntityScore.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/dbPediaMappings.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/dbPediaMappings.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/dbPediaMappings.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/dbPediaMappings.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,61 @@
+# --- Define the Languages for all fields ---
+| @=null;en;de;fr;it
+
+# --- RDF, RDFS and OWL Mappings ---
+rdfs:label
+rdfs:comment
+rdf:type | d=entityhub:ref
+# used by LOD to link to URIs used to identify the same Entity
+owl:sameAs | d=entityhub:ref
+
+# --- Dublin Core (dc terms and dc elements) ---
+dc:*
+# all DC Elements (one could also define the mappings to the DC Terms counterparts here
+dc-elements:*
+
+# --- Spatial Things ---
+geo:lat | d=xsd:double
+geo:long | d=xsd:double
+geo:alt | d=xsd:int;xsd:float
+# one can also copy the valued from the DBpedia properties
+#dbp-prop:latitude | d=xsd:decimal > geo:lat
+#dbp-prop:longitude | d=xsd:decimal > geo:long
+
+# --- Thesaurus (via SKOS) ---
+#SKOS can be used to define hierarchical terminologies
+skos:*
+skos:broader | d=entityhub:ref
+skos:narrower | d=entityhub:ref
+skos:related | d=entityhub:ref
+skos:member | d=entityhub:ref
+skos:subject | d=entityhub:ref
+skos:inScheme | d=entityhub:ref
+skos:hasTopConcept | d=entityhub:ref
+skos:topConceptOf | d=entityhub:ref
+
+# --- Social Networks (via foaf) ---
+#The Friend of a Friend schema often used to describe social relations between people
+foaf:*
+foaf:knows | d=entityhub:ref
+foaf:made | d=entityhub:ref
+foaf:maker | d=entityhub:ref
+foaf:member | d=entityhub:ref
+foaf:homepage | d=xsd:anyURI
+# also use the DBpedia property website for oaf:homepage!
+dbp-prop:website | d=xsd:anyURI > foaf:homepage
+foaf:depiction | d=xsd:anyURI
+# also use the DBpedia thumbnail as oaf:depiction
+dbp-ont:thumbnail | d=xsd:anyURI > foaf:depiction
+foaf:img | d=xsd:anyURI
+foaf:logo | d=xsd:anyURI
+# Documents about the entity
+foaf:page | d=xsd:anyURI
+
+# --- dbpedia specific
+# the "dbp-ont" defines knowledge mapped to the DBPedia ontology
+dbp-ont:*
+# the "DBpedia properties are all key values pairs extracted from the info boxes
+# on the right hand side of Wikipedia pages.
+#dbp-prop:*
+# Copy only population for now (one could add additional if necessary)!
+dbp-prop:population | d=xsd:integer
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/dbPediaMappings.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/fieldBoosts.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/fieldBoosts.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/fieldBoosts.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/fieldBoosts.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,6 @@
+http://www.w3.org/2000/01/rdf-schema#label=3
+http://purl.org/dc/terms/title=3
+http://purl.org/dc/elements/1.1/title=3
+http://xmlns.com/foaf/0.1/name=3
+http://www.w3.org/2004/02/skos/core#prefLabel=3
+http://www.w3.org/2004/02/skos/core#altLabel=1.5
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/fieldBoosts.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexFieldConfig.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexFieldConfig.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexFieldConfig.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexFieldConfig.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,28 @@
+#This is a similar version of the dbPediaMappings.txt but excludes mapping rules
+# --- Define the Languages for all fields ---
+| @=null;en;de;fr;it
+
+# --- RDF, RDFS and OWL Mappings ---
+rdfs:label
+rdfs:comment
+rdf:type
+# used by LOD to link to URIs used to identify the same Entity
+owl:sameAs
+
+# --- Other Namespaces to include---
+dc:*
+dc-elements:*
+geo:*
+skos:*
+foaf:*
+
+# --- dbpedia specific
+# the "dbp-ont" defines knowledge mapped to the DBPedia ontology
+dbp-ont:*
+
+# the "DBpedia properties are all key values pairs extracted from the info boxes
+# on the right hand side of Wikipedia pages.
+# uncomment the next line to include all
+#dbp-prop:*
+# Currently only the population is added
+dbp-prop:population
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexFieldConfig.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexing.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexing.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexing.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexing.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,12 @@
+name=simple
+
+description=Simple Configuration
+
+scoreNormalizer=org.apache.stanbol.entityhub.indexing.core.normaliser.RangeNormaliser,config:range;org.apache.stanbol.entityhub.indexing.core.normaliser.NaturalLogNormaliser;org.apache.stanbol.entityhub.indexing.core.normaliser.MinScoreNormalizer,config:minIncomming
+
+entityIdIterator=org.apache.stanbol.entityhub.indexing.core.LineBasedEntityIterator,source:testEntityScore.txt,charset:UTF-8,encodeIds:false
+
+entityProcessor=org.apache.stanbol.entityhub.indexing.core.processor.FiledMapperProcessor,mappings:dbPediaMappings.txt
+fieldConfiguration=indexFieldConfig.txt
+
+indexingDestination=org.apache.stanbol.entityhub.indexing.destination.solryard.SolrYardIndexingDestination,boosts:fieldBoosts
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/indexing.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/minIncomming.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/minIncomming.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/minIncomming.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/minIncomming.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,2 @@
+inclusive=true
+min-score=2
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/minIncomming.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/range.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/range.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/range.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/range.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1 @@
+upper-bound=10
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/config/range.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/resources/testEntityScore.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/resources/testEntityScore.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/resources/testEntityScore.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/resources/testEntityScore.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,3 @@
+http://www.example.org/entity/test 100
+http://www.example.org/entity/test2 10
+http://www.example.org/entity/test3 1
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/simple/indexing/resources/testEntityScore.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/dbPediaMappings.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/dbPediaMappings.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/dbPediaMappings.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/dbPediaMappings.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,61 @@
+# --- Define the Languages for all fields ---
+| @=null;en;de;fr;it
+
+# --- RDF, RDFS and OWL Mappings ---
+rdfs:label
+rdfs:comment
+rdf:type | d=entityhub:ref
+# used by LOD to link to URIs used to identify the same Entity
+owl:sameAs | d=entityhub:ref
+
+# --- Dublin Core (dc terms and dc elements) ---
+dc:*
+# all DC Elements (one could also define the mappings to the DC Terms counterparts here
+dc-elements:*
+
+# --- Spatial Things ---
+geo:lat | d=xsd:double
+geo:long | d=xsd:double
+geo:alt | d=xsd:int;xsd:float
+# one can also copy the valued from the DBpedia properties
+#dbp-prop:latitude | d=xsd:decimal > geo:lat
+#dbp-prop:longitude | d=xsd:decimal > geo:long
+
+# --- Thesaurus (via SKOS) ---
+#SKOS can be used to define hierarchical terminologies
+skos:*
+skos:broader | d=entityhub:ref
+skos:narrower | d=entityhub:ref
+skos:related | d=entityhub:ref
+skos:member | d=entityhub:ref
+skos:subject | d=entityhub:ref
+skos:inScheme | d=entityhub:ref
+skos:hasTopConcept | d=entityhub:ref
+skos:topConceptOf | d=entityhub:ref
+
+# --- Social Networks (via foaf) ---
+#The Friend of a Friend schema often used to describe social relations between people
+foaf:*
+foaf:knows | d=entityhub:ref
+foaf:made | d=entityhub:ref
+foaf:maker | d=entityhub:ref
+foaf:member | d=entityhub:ref
+foaf:homepage | d=xsd:anyURI
+# also use the DBpedia property website for oaf:homepage!
+dbp-prop:website | d=xsd:anyURI > foaf:homepage
+foaf:depiction | d=xsd:anyURI
+# also use the DBpedia thumbnail as oaf:depiction
+dbp-ont:thumbnail | d=xsd:anyURI > foaf:depiction
+foaf:img | d=xsd:anyURI
+foaf:logo | d=xsd:anyURI
+# Documents about the entity
+foaf:page | d=xsd:anyURI
+
+# --- dbpedia specific
+# the "dbp-ont" defines knowledge mapped to the DBPedia ontology
+dbp-ont:*
+# the "DBpedia properties are all key values pairs extracted from the info boxes
+# on the right hand side of Wikipedia pages.
+#dbp-prop:*
+# Copy only population for now (one could add additional if necessary)!
+dbp-prop:population | d=xsd:integer
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/dbPediaMappings.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/fieldBoosts.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/fieldBoosts.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/fieldBoosts.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/fieldBoosts.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,6 @@
+http://www.w3.org/2000/01/rdf-schema#label=3
+http://purl.org/dc/terms/title=3
+http://purl.org/dc/elements/1.1/title=3
+http://xmlns.com/foaf/0.1/name=3
+http://www.w3.org/2004/02/skos/core#prefLabel=3
+http://www.w3.org/2004/02/skos/core#altLabel=1.5
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/fieldBoosts.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexFieldConfig.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexFieldConfig.txt?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexFieldConfig.txt (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexFieldConfig.txt Fri Apr 29 09:20:31 2011
@@ -0,0 +1,28 @@
+#This is a similar version of the dbPediaMappings.txt but excludes mapping rules
+# --- Define the Languages for all fields ---
+| @=null;en;de;fr;it
+
+# --- RDF, RDFS and OWL Mappings ---
+rdfs:label
+rdfs:comment
+rdf:type
+# used by LOD to link to URIs used to identify the same Entity
+owl:sameAs
+
+# --- Other Namespaces to include---
+dc:*
+dc-elements:*
+geo:*
+skos:*
+foaf:*
+
+# --- dbpedia specific
+# the "dbp-ont" defines knowledge mapped to the DBPedia ontology
+dbp-ont:*
+
+# the "DBpedia properties are all key values pairs extracted from the info boxes
+# on the right hand side of Wikipedia pages.
+# uncomment the next line to include all
+#dbp-prop:*
+# Currently only the population is added
+dbp-prop:population
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexFieldConfig.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexing.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexing.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexing.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexing.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,12 @@
+name=simple
+
+description=Simple Configuration
+
+scoreNormalizer=org.apache.stanbol.entityhub.indexing.core.normaliser.RangeNormaliser,config:range;org.apache.stanbol.entityhub.indexing.core.normaliser.NaturalLogNormaliser;org.apache.stanbol.entityhub.indexing.core.normaliser.MinScoreNormalizer,config:minIncomming
+
+entityIdIterator=org.apache.stanbol.entityhub.indexing.core.LineBasedEntityIterator,source:testEntityScore.txt,charset:UTF-8,encodeIds:false
+
+entityProcessor=org.apache.stanbol.entityhub.indexing.core.processor.FiledMapperProcessor,mappings:dbPediaMappings.txt
+fieldConfiguration=indexFieldConfig.txt
+
+indexingDestination=org.apache.stanbol.entityhub.indexing.destination.solryard.SolrYardIndexingDestination,solrConf,boosts:fieldBoosts
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/indexing.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/minIncomming.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/minIncomming.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/minIncomming.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/minIncomming.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1,2 @@
+inclusive=true
+min-score=2
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/minIncomming.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/range.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/range.properties?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/range.properties (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/range.properties Fri Apr 29 09:20:31 2011
@@ -0,0 +1 @@
+upper-bound=10
\ No newline at end of file
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/range.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/admin-extra.html
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/admin-extra.html?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/admin-extra.html (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/admin-extra.html Fri Apr 29 09:20:31 2011
@@ -0,0 +1,31 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- The content of this page will be statically included into the top
+of the admin page. Uncomment this as an example to see there the content
+will show up.
+
+<hr>
+<i>This line will appear before the first table</i>
+<tr>
+<td colspan="2">
+This row will be appended to the end of the first table
+</td>
+</tr>
+<hr>
+
+-->
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/admin-extra.html
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/elevate.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/elevate.xml?rev=1097740&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/elevate.xml (added)
+++ incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/elevate.xml Fri Apr 29 09:20:31 2011
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- If this file is found in the config directory, it will only be
+ loaded once at startup. If it is found in Solr's data
+ directory, it will be re-loaded every commit.
+-->
+
+<elevate>
+<!--
+ <query text="foo bar">
+ <doc id="1" />
+ <doc id="2" />
+ <doc id="3" />
+ </query>
+
+ <query text="ipod">
+ <doc id="MA147LL/A" /> <!- put the actual ipod at the top ->
+ <doc id="IW-02" exclude="true" /> <!- exclude this cable ->
+ </query>
+-->
+</elevate>
Propchange: incubator/stanbol/trunk/entityhub/indexing/destination/solryard/src/test/resources/testConfigs/withSolrConf/indexing/config/simple/conf/elevate.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain