Пример #1
0
        public void IndexEvent(woo.data.entity.Event ev, woo.data.entity.User[] us)
        {
            var eventIndex = new EventSearchIndex
            {
                Id = ev.Id,
                Summary = ev.Summary,
                Time = ev.Since.ToBinary(),
                Users = string.Join(" ", us.Select(u => u.Id.ToString()))
            };

            var genericSearchItem = new GenericSearchItem(eventIndex);
            _hub.SendToTopicAsync("lucene", "any", genericSearchItem);
        }
        public Model Get(int id)
        {
            var model = new Model
            {
                Id = id,
                Name = id.ToString()
            };

            var genericSearchItem = new GenericSearchItem(model);

            _hub.SendToTopicAsync("lucene", "any", genericSearchItem);

            return model;
        }