Skip to content

Marcinthecloud/Solr-Amazon-Book-Demo

Repository files navigation

Solr Amazon Book Demo

This is a quick and dirty demo to get you started with DSE Search. With this dataset, you can run geospatial searches, joins, text searches, and faceted searches.

The dataset includes click stream data, books/categories, and ranks.

A special thank you to Matt Stump for helping put this together.

#####Prerequisites

#####How-to:

  1. Start DataStax Enterprise in search mode
  • for tarball installs: bin/dse cassandra -s
  • for package installs: set SOLR=1 in the /etc/default/dse file and run: service dse start
  1. Run solr_dataloader.py
  • NOTE: You need to change the contact points in solr_dataloder.py where cluster = Cluster(['ip1','ip2'])
  • This will create the CQL schemas and load the data
  1. Run create_core.sh
  • This will generate Solr cores and index the data
  1. Go wild!

#####Examples Queries:

SELECT * FROM amazon.metadata WHERE solr_query='{"q":"title:Noir~", "fq":"categories:Books", "sort":"title asc"}'  limit 10;

SELECT * FROM amazon.metadata WHERE solr_query='{"q":"title:Noir~", "facet":{"field":"categories"}}'  limit 10;

SELECT * FROM amazon.clicks WHERE solr_query='{"q":"asin:*", "fq":"+{!geofilt pt=\"37.7484,-122.4156\" sfield=location d=1}"}' limit 10;

SELECT * FROM amazon.metadata WHERE solr_query='{"q":"*:*", "fq":"{!join from=asin to=asin force=true fromIndex=amazon.clicks}area_code:415"}' limit 5;

SELECT * FROM amazon.metadata WHERE solr_query='{"q":"*:*", "facet":{"field":"categories"}, "fq":"{!join from=asin to=asin force=true fromIndex=amazon.clicks}area_code:415"}' limit 5;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published