Commit 5611f149 by Shwetha GS

ATLAS-102 Issue with SolrIndex (suma.shivaprasad via shwethags)

parent 57a7d1bc
...@@ -863,41 +863,9 @@ ...@@ -863,41 +863,9 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.thinkaurelius.titan</groupId> <groupId>com.vividsolutions</groupId>
<artifactId>titan-solr</artifactId> <artifactId>jts</artifactId>
<version>${titan.version}</version> <version>1.13</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>org.eclipse.jetty</groupId>
</exclusion>
<exclusion>
<artifactId>*</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
<exclusion>
<artifactId>*</artifactId>
<groupId>org.jruby.joni</groupId>
</exclusion>
<exclusion>
<artifactId>*</artifactId>
<groupId>org.eclipse.jetty.orbit</groupId>
</exclusion>
<exclusion>
<artifactId>*</artifactId>
<groupId>org.restlet.jee</groupId>
</exclusion>
<exclusion>
<artifactId>*</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
<exclusion>
<artifactId>*</artifactId>
<groupId>org.apache.solr</groupId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -9,6 +9,7 @@ ATLAS-54 Rename configs in hive hook (shwethags) ...@@ -9,6 +9,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (suma.shivaprasad via shwethags) ATLAS-3 Mixed Index creation fails with Date types (suma.shivaprasad via shwethags)
ALL CHANGES: ALL CHANGES:
ATLAS-102 Issue with SolrIndex (suma.shivaprasad via shwethags)
ATLAS-194 Thread pool in hive hook should be static (shwethags) ATLAS-194 Thread pool in hive hook should be static (shwethags)
ATLAS-180 Cleanup atlas doc packaging (shwethags) ATLAS-180 Cleanup atlas doc packaging (shwethags)
ATLAS-147 Fix a code issue when defineTypes (ltfxyz via shwethags) ATLAS-147 Fix a code issue when defineTypes (ltfxyz via shwethags)
......
...@@ -90,8 +90,8 @@ ...@@ -90,8 +90,8 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.thinkaurelius.titan</groupId> <groupId>com.vividsolutions</groupId>
<artifactId>titan-solr</artifactId> <artifactId>jts</artifactId>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -44,7 +44,6 @@ import com.thinkaurelius.titan.diskstorage.indexing.IndexProvider; ...@@ -44,7 +44,6 @@ import com.thinkaurelius.titan.diskstorage.indexing.IndexProvider;
import com.thinkaurelius.titan.diskstorage.indexing.IndexQuery; import com.thinkaurelius.titan.diskstorage.indexing.IndexQuery;
import com.thinkaurelius.titan.diskstorage.indexing.KeyInformation; import com.thinkaurelius.titan.diskstorage.indexing.KeyInformation;
import com.thinkaurelius.titan.diskstorage.indexing.RawQuery; import com.thinkaurelius.titan.diskstorage.indexing.RawQuery;
import com.thinkaurelius.titan.diskstorage.solr.transform.GeoToWktConverter;
import com.thinkaurelius.titan.diskstorage.util.DefaultTransaction; import com.thinkaurelius.titan.diskstorage.util.DefaultTransaction;
import com.thinkaurelius.titan.graphdb.configuration.PreInitializeConfigOptions; import com.thinkaurelius.titan.graphdb.configuration.PreInitializeConfigOptions;
import com.thinkaurelius.titan.graphdb.database.serialize.AttributeUtil; import com.thinkaurelius.titan.graphdb.database.serialize.AttributeUtil;
...@@ -959,4 +958,19 @@ public class Solr5Index implements IndexProvider { ...@@ -959,4 +958,19 @@ public class Solr5Index implements IndexProvider {
} }
} }
private static class GeoToWktConverter {
/**
* {@link com.thinkaurelius.titan.core.attribute.Geoshape} stores Points in the String format: point[X.0,Y.0].
* Solr needs it to be in Well-Known Text format: POINT(X.0 Y.0)
*/
static String convertToWktString(Geoshape fieldValue) throws BackendException {
if (fieldValue.getType() == Geoshape.Type.POINT) {
Geoshape.Point point = fieldValue.getPoint();
return "POINT(" + point.getLongitude() + " " + point.getLatitude() + ")";
} else {
throw new PermanentBackendException("Cannot index " + fieldValue.getType());
}
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment