private bool DeleteFieldInLucene() { try { var requestString = $"http://*****:*****@"{{ delete-field: {{ name: '{0}' }} }}", this.Name); SolrOperation.LucenePostJson(requestString, json); } catch (Exception ex) { Solr.Utilities.SolrException.WriteError(ex); } return(false); }
public bool AddFieldInLucene() { try { var requestString = $"http://*****:*****@"{{ add-field: {{ name: '{0}', type: '{1}', stored: '{2}', indexed: '{3}', default: '{4}' }} }}", this.Name, this.Type, this.Stored == "Yes" ? "true" : "false", this.Indexed == "Yes" ? "true" : "false", this.DefaultValue); SolrOperation.LucenePostJson(requestString, json); } catch (Exception ex) { Solr.Utilities.SolrException.WriteError(ex); } return(false); }