Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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);
 }