mirror of
				https://github.com/simon987/sist2.git
				synced 2025-11-04 01:36:51 +00:00 
			
		
		
		
	fix for elasticsearch 6.8
This commit is contained in:
		
							parent
							
								
									0d4deb3eb3
								
							
						
					
					
						commit
						ef79681024
					
				@ -70,7 +70,7 @@ void elastic_flush() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    while (line != NULL) {
 | 
					    while (line != NULL) {
 | 
				
			||||||
        char action_str[512];
 | 
					        char action_str[512];
 | 
				
			||||||
        snprintf(action_str, 512, "{\"index\":{\"_id\": \"%s\"}}\n", line->uuid_str);
 | 
					        snprintf(action_str, 512, "{\"index\":{\"_id\": \"%s\", \"_type\":\"_doc\"}}", line->uuid_str);
 | 
				
			||||||
        size_t action_str_len = strlen(action_str);
 | 
					        size_t action_str_len = strlen(action_str);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        size_t line_len = strlen(line->line);
 | 
					        size_t line_len = strlen(line->line);
 | 
				
			||||||
@ -187,7 +187,7 @@ void elastic_init(int force_reset) {
 | 
				
			|||||||
        printf("Update settings <%d>\n", r->status_code);
 | 
					        printf("Update settings <%d>\n", r->status_code);
 | 
				
			||||||
        free_response(r);
 | 
					        free_response(r);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        snprintf(url, 4096, "%s/sist2/_mappings", IndexCtx.es_url);
 | 
					        snprintf(url, 4096, "%s/sist2/_mappings/_doc", IndexCtx.es_url);
 | 
				
			||||||
        r = web_put(url, mappings_json, "Content-Type: application/json");
 | 
					        r = web_put(url, mappings_json, "Content-Type: application/json");
 | 
				
			||||||
        printf("Update mappings <%d>\n", r->status_code);
 | 
					        printf("Update mappings <%d>\n", r->status_code);
 | 
				
			||||||
        free_response(r);
 | 
					        free_response(r);
 | 
				
			||||||
 | 
				
			|||||||
@ -5,7 +5,7 @@
 | 
				
			|||||||
#define EPILOG "Made by simon987 <me@simon987.net>. Released under GPL-3.0"
 | 
					#define EPILOG "Made by simon987 <me@simon987.net>. Released under GPL-3.0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const char *const Version = "1.0.0";
 | 
					static const char *const Version = "1.0.1";
 | 
				
			||||||
static const char *const usage[] = {
 | 
					static const char *const usage[] = {
 | 
				
			||||||
        "sist2 scan [OPTION]... PATH",
 | 
					        "sist2 scan [OPTION]... PATH",
 | 
				
			||||||
        "sist2 index [OPTION]... INDEX",
 | 
					        "sist2 index [OPTION]... INDEX",
 | 
				
			||||||
@ -196,7 +196,7 @@ int main(int argc, const char *argv[]) {
 | 
				
			|||||||
    index_args_t *index_args = index_args_create();
 | 
					    index_args_t *index_args = index_args_create();
 | 
				
			||||||
    web_args_t *web_args = web_args_create();
 | 
					    web_args_t *web_args = web_args_create();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    char * common_es_url;
 | 
					    char * common_es_url = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    struct argparse_option options[] = {
 | 
					    struct argparse_option options[] = {
 | 
				
			||||||
            OPT_HELP(),
 | 
					            OPT_HELP(),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user