Commit 45268788 authored by Nick Craver's avatar Nick Craver

Cleanup: NRediSearch

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