Commit 45268788 authored by Nick Craver's avatar Nick Craver

Cleanup: NRediSearch

parent 72eb2581
...@@ -58,10 +58,12 @@ public void BasicUsage() ...@@ -58,10 +58,12 @@ public void BasicUsage()
// use meta-programming / reflection instead in .NET // use meta-programming / reflection instead in .NET
// Adding documents to the index: // Adding documents to the index:
var fields = new Dictionary<string, RedisValue>(); var fields = new Dictionary<string, RedisValue>
fields.Add("title", "hello world"); {
fields.Add("body", "lorem ipsum"); ["title"] = "hello world",
fields.Add("price", 1337); ["body"] = "lorem ipsum",
["price"] = 1337
};
Assert.True(client.AddDocument("doc1", fields)); Assert.True(client.AddDocument("doc1", fields));
......
...@@ -14,11 +14,10 @@ namespace NRediSearch ...@@ -14,11 +14,10 @@ namespace NRediSearch
/// </summary> /// </summary>
public class Document public class Document
{ {
public string Id { get; } public string Id { get; }
public double Score { get; } public double Score { get; }
public byte[] Payload { get; } public byte[] Payload { get; }
private Dictionary<String, RedisValue> properties = new Dictionary<string, RedisValue>(); private readonly Dictionary<String, RedisValue> properties = new Dictionary<string, RedisValue>();
public Document(string id, double score, byte[] payload) public Document(string id, double score, byte[] payload)
{ {
......
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