using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Pullenti.Documentory.WebServer.Controllers
{
    public class ReindexController : Controller
    {
        //
        // GET: /Reindex/

        public ActionResult Index()
        {
            string id = null;
            var url = Request.RawUrl;
            int i = url.IndexOf('?');
            if (i > 0) id = url.Substring(i + 1);
            MvcApplication.Reindex(id);
            return Redirect("Home");
        }

    }
}
