0

How to achieve search capabilities supported by DSE search / Solr in DSE graph. DSE graph supports to create index of type 'search' for fields but this is limited and does not offer all search engine capabilities. Do we need to have separate instance of DSE search (which requires defining Cassandra tables) and move data from DSE graph to DSE search to enable search capabilities provided by DSE search?

Thanks

Tilak
  • 323
  • 1
  • 5
  • 18

2 Answers2

0

As per my understanding you dont have to move on your data into another tables , but what you can do is create a seprate SOLR CORE on the table using the DSETOOL create_core command and then can use the SOLRJ API to interact and fire solr query direclty on your data .So this way you can take the advantage of SOLR for searching . An Example that might help you : - https://blog.knoldus.com/2016/12/13/solr-relevance-search-using-solrj-in-scala/

Piyush_Rana
  • 305
  • 3
  • 15
0

You should be running DSE Graph on a DSE Search node. When you create a search index in graph - a corresponding solr core will also be created. So:

schema.propertyKey('name').Text().create()
schema.propertyKey('favorite_number').Int().create()
schema.propertyKey('favorite_words').Text().create()
schema.propertyKey('a_third_thing').Int().create()
schema.vertexLabel('person').properties('name','favorite_number','favorite_words','a_third_thing').create()

//This last line is the index creation
schema.vertexLabel('person').index('search').search().by('name').asString().by('favorite_number').by('favorite_words').asText().add()

Would create a core with fields for name, favorite_number, and favorite_words (but not a_third_thing).

https://docs.datastax.com/en/latest-dse/datastax_enterprise/graph/using/useSearchIndexes.html

ASpitzer
  • 1
  • 1