thinkaurelius/titan — pull request #874 by graben1437 (2014-12-10 02:03:50+00:00)
Title: update sample solr schema.xml

Hi,

I made changes to the example and test schema.xml files for solr to remove deprecation warnings when starting solr:

2096 [coreLoadExecutor-4-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Solr loaded a deprecated plugin/analysis class [solr.IntField]. Please consult documentation how to replace it accordingly.
2101 [coreLoadExecutor-4-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Solr loaded a deprecated plugin/analysis class [solr.LongField]. Please consult documentation how to replace it accordingly.
2106 [coreLoadExecutor-4-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Solr loaded a deprecated plugin/analysis class [solr.FloatField]. Please consult documentation how to replace it accordingly.
2110 [coreLoadExecutor-4-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Solr loaded a deprecated plugin/analysis class [solr.DoubleField]. Please consult documentation how to replace it accordingly.
2116 [coreLoadExecutor-4-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Solr loaded a deprecated plugin/analysis class [solr.SortableIntField]. Please consult documentation how to replace it accordingly.
2120 [coreLoadExecutor-4-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Solr loaded a deprecated plugin/analysis class [solr.SortableLongField]. Please consult documentation how to replace it accordingly.
2124 [coreLoadExecutor-4-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Solr loaded a deprecated plugin/analysis class [solr.SortableFloatField]. Please consult documentation how to replace it accordingly.
2129 [coreLoadExecutor-4-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Solr loaded a deprecated plugin/analysis class [solr.SortableDoubleField]. Please consult documentation how to replace it accordingly.
2138 [coreLoadExecutor-4-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Solr loaded a deprecated plugin/analysis class [solr.DateField]. Please consult documentation how to replace it accordingly.

Tested this with Titan 0.5.2 and Solr 4.8.1:
gremlin> g=TitanFactory.open('./david.properties')
==>titangraph[cassandra:[9.30.182.235]]
gremlin> mgmt = g.getManagementSystem()
==>com.thinkaurelius.titan.graphdb.database.management.ManagementSystem@6b3dae61
gremlin> name = mgmt.makePropertyKey('name').dataType(String.class).make()
==>name
gremlin> mgmt.buildIndex('nameidx', Vertex.class).addKey(name, Mapping.STRING.getParameter()).buildMixedIndex("search")
==>com.thinkaurelius.titan.graphdb.database.management.TitanGraphIndexWrapper@33f571ad
gremlin> mgmt.commit()
==>null
gremlin> mgmt = g.getManagementSystem()
==>com.thinkaurelius.titan.graphdb.database.management.ManagementSystem@37a55e62
gremlin> coord1 = mgmt.makePropertyKey('coordinate').dataType(Geoshape.class).make()
==>coordinate
gremlin> mgmt.buildIndex('coordidx', Vertex.class).addKey(coord1).buildMixedIndex("search")
==>com.thinkaurelius.titan.graphdb.database.management.TitanGraphIndexWrapper@4e2c294e
gremlin> mgmt.commit()
==>null
gremlin> v1 = g.addVertex()
==>v[256]
gremlin> g.commit()
==>null
gremlin> v1.setProperty('name', 'schema xml for solr test')
==>null
gremlin> v1.setProperty('coordinate', Geoshape.point(38.1f, 23.7f))
==>null
gremlin> g.commit()
==>null
gremlin> g.V().has("coordinate", WITHIN, Geoshape.circle(37.97,23.72,50))
==>v[256]
gremlin> g.query().has('name', REGEX, 'schema.*').vertices()
==>v[256]
...
gremlin> mgmt = g.getManagementSystem()
==>com.thinkaurelius.titan.graphdb.database.management.ManagementSystem@3ca33ecb
gremlin> nametwo = mgmt.makePropertyKey('nametwo').dataType(String.class).make()
==>nametwo
gremlin> mgmt.buildIndex('nametwoidx',Vertex.class).addKey(nametwo).buildMixedIndex("search")
==>com.thinkaurelius.titan.graphdb.database.management.TitanGraphIndexWrapper@60d53e8d
gremlin> mgmt.commit()
==>null
gremlin> v1.setProperty('nametwo', 'schema xml for solr test 2')
==>null
gremlin> g.commit()
==>null
gremlin> v1.map()
==>nametwo=schema xml for solr test 2
==>coordinate=point[38.1,23.7]
==>name=schema xml for solr test 2
gremlin> g.query().has('nametwo', CONTAINS, 'schema').vertices()
==>v[256]
gremlin> g.query().has('nametwo', CONTAINS, 'xml').vertices()
==>v[256]
gremlin> g.query().has('nametwo', CONTAINS, '2').vertices()
==>v[256]
gremlin>