/**
  * remove the index of the property.
  * @throws Exception
  * @return void
  */
 public function removePropertyIndex()
 {
     if (!tao_helpers_Request::isAjax()) {
         throw new Exception("wrong request mode");
     }
     if (!$this->hasRequestParameter('uri')) {
         throw new common_exception_MissingParameter("Uri parameter is missing");
     }
     if (!$this->hasRequestParameter('indexProperty')) {
         throw new common_exception_MissingParameter("indexProperty parameter is missing");
     }
     $indexPropertyUri = tao_helpers_Uri::decode($this->getRequestParameter('indexProperty'));
     //remove use of index property in property
     $property = new core_kernel_classes_Property(tao_helpers_Uri::decode($this->getRequestParameter('uri')));
     $property->removePropertyValue(new core_kernel_classes_Property(INDEX_PROPERTY), $indexPropertyUri);
     //remove index property
     $indexProperty = new \oat\tao\model\search\Index($indexPropertyUri);
     $indexProperty->delete();
     echo json_encode(array('id' => $this->getRequestParameter('indexProperty')));
 }