Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

change from rdoc to markdown

  • Loading branch information...
commit 135b6496c24e7d36f37a27deb6fe28687f272526 1 parent fac359f
@erwaller erwaller authored
Showing with 41 additions and 2 deletions.
  1. +41 −2 README.rdoc → README.markdown
View
43 README.rdoc → README.markdown
@@ -1,4 +1,5 @@
-= Soulmate
+Soulmate
+========
Soulmate is a tool to help solve the common problem of developing a fast autocomplete feature. It uses Redis's sorted sets to build an index of partial words and corresponding top matches, and provides a simple sinatra app to query them. Soulmate finishes your sentences.
@@ -16,6 +17,9 @@ Soulmate can offer suggestions for multiple types of items in a single query. An
Where `id` is a unique identifier (within the specific type), `term` is the phrase you wish to provide completions for, `score` is a user-specified ranking metric (redis will order things lexigraphically for items with the same score), and `data` is an optional container for metadata you'd like to return when this item is matched (at SeatGeek we're including a url for the item as well as a subtitle for when we present it in an autocomplete dropdown).
+Getting Started
+---------------
+
You can load data into Soulmate by piping items into `soulmate load`.
Here's a sample `venues.json` (in the JSON lines format -- i.e. one JSON item per line):
@@ -34,7 +38,42 @@ Once it's loaded, we can query this data by starting `soulmate-web`:
$ soulmate-web --foreground --redis=redis://localhost:6379/0 --no-launch
-And viewing the service in your browser: <a href="http://localhost:5678/search?types[]=venue&term=stad">http://localhost:5678/search?types[]=venue&term=stad</a>.
+And viewing the service in your browser: <a href="http://localhost:5678/search?types[]=venue&term=stad">http://localhost:5678/search?types[]=venue&term=stad</a>. You should see something like:
+
+ {
+ "term": "stad",
+ "results": {
+ "venue": [
+ {
+ "id": 28,
+ "term": "Angel Stadium",
+ "score": 85,
+ "data": {
+ "url": "/angel-stadium-tickets/",
+ "subtitle": "Anaheim, CA"
+ }
+ },
+ {
+ "id": 1,
+ "term": "Dodger Stadium",
+ "score": 85,
+ "data": {
+ "url": "/dodger-stadium-tickets/",
+ "subtitle": "Los Angeles, CA"
+ }
+ },
+ {
+ "id": 29,
+ "term": "Sun Life Stadium",
+ "score": 84,
+ "data": {
+ "url": "/sun-life-stadium-tickets/",
+ "subtitle": "Miami, FL"
+ }
+ }
+ ]
+ }
+ }
== Contributing to soulmate
Please sign in to comment.
Something went wrong with that request. Please try again.