private string CreateInsert(AutoCompleteItem[] items)
        {
            var byWord = (from item in items
                from word in item.Text.ToLower().Split(_separadores).Select(s => s.Trim()).Where(s => s.Length > 0).Distinct()
                group item by word).ToList();

            var jsonObj = new
            {
                vocabulary = from w in byWord
                    group w.Key by w.Key.Substring(0, 1)
                    into grpKey
                    select new
                    {
                        letter = grpKey.Key,
                        words = grpKey.ToArray()
                    },
                index = from w in byWord
                    select new {wd = w.Key, it = w.Select(s => s.ItemKey).ToArray()},
                items = from item in items
                    select new
                    {
                        it = item.ItemKey,
                        sc = item.Priority
                    }
            };

            string parameter = JsonConvert.SerializeObject(jsonObj);
            return parameter;
        }
        private static AutoCompleteItem[] LoadAllItems()
        {
            var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("RedisAutocomplete.NetTests.itens.zip");

            GZipStream zipStream = new GZipStream(stream, CompressionMode.Decompress);
            string[] lines;
            var result = new List<AutoCompleteItem>();
            using (StreamReader sr = new StreamReader(zipStream, Encoding.Default))
            {
                while (!sr.EndOfStream)
                {
                    var line = sr.ReadLine().Trim();
                    var cols = line.Split('\t');
                    var ac = new AutoCompleteItem()
                    {
                        ItemKey = JsonConvert.SerializeObject(new {id = cols[0].Trim(), c = cols[1].Trim()}),
                        Priority = int.Parse(cols[1]),
                        Text = cols[2]
                    };

                    result.Add(ac);
                }
            }

            return result.ToArray();
            //var itens =
            //    File.ReadAllLines(@"c:\temp\itens.csv", Encoding.Default)
            //        .Select(l => l.Split('\t'))
            //        .Select(x =>
            //            new AutoCompleteItem()
            //            {
            //                ItemKey = JsonConvert.SerializeObject(new { id = x[0], c = x[1] }), Priority = int.Parse(x[1]), Text = x[2]
            //            })
            //        .ToArray();
            //return itens;
        }