/// <summary>
        /// 新增某个用户的索引
        /// </summary>
        /// <param name="user"></param>
        public void AddUserIndex(List <UserInfo> users, int maxshopId)
        {
            var isNew          = false;
            var path           = _indexPath + "\\" + maxshopId;
            var directory      = FSDirectory.Open(path);
            var maxFieldLength = new IndexWriter.MaxFieldLength(IndexWriter.DEFAULT_MAX_FIELD_LENGTH);

            isNew = !IndexReader.IndexExists(directory);

            // 添加到文件索引
            var analyzer = new StandardAnalyzer(Version.LUCENE_30);

            using (var writer = new IndexWriter(directory, analyzer, isNew, maxFieldLength))
            {
                foreach (var user in users)
                {
                    var document = new Document();

                    document.Add(new Field("UserId", user.UserId.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    document.Add(new Field("ShopId", user.ShopId.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    document.Add(new Field("UPinYinShort", user.UPinYinShort.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    document.Add(new Field("UPinYinFull", user.UPinYinFull.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    document.Add(new Field("Name", user.Name.ToString(), Field.Store.YES, Field.Index.ANALYZED));

                    if (!string.IsNullOrWhiteSpace(user.Phone))
                    {
                        document.Add(new Field("Phone", user.Phone.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    }
                    if (!string.IsNullOrWhiteSpace(user.Number))
                    {
                        document.Add(new Field("Number", user.Number.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    }


                    writer.AddDocument(document);
                }

                writer.Optimize();
            }

            // 添加到内存索引
            var ramDirectory = RamDirectoryFactory.GetRamDirectory(path, directory);

            using (var writer = new IndexWriter(ramDirectory, analyzer, isNew, maxFieldLength))
            {
                foreach (var user in users)
                {
                    var document = new Document();

                    document.Add(new Field("UserId", user.UserId.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    document.Add(new Field("ShopId", user.ShopId.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    document.Add(new Field("UPinYinShort", user.UPinYinShort.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    document.Add(new Field("UPinYinFull", user.UPinYinFull.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    document.Add(new Field("Name", user.Name.ToString(), Field.Store.YES, Field.Index.ANALYZED));

                    if (!string.IsNullOrWhiteSpace(user.Phone))
                    {
                        document.Add(new Field("Phone", user.Phone.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    }
                    if (!string.IsNullOrWhiteSpace(user.Number))
                    {
                        document.Add(new Field("Number", user.Number.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
                    }

                    writer.AddDocument(document);
                }

                writer.Optimize();
            }
        }