我为具有不同映射的模型提供了一个索引
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <sys/ptrace.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <stdlib.h>
#include <wait.h>
#include <linux/user.h>
int main()
{
struct user_regs_struct regs;
int pid, status; /* process id & status */
pid = fork(); /* create new process */
int data;
if(pid == 0) {
ptrace(PTRACE_TRACEME, 0, 0, 0);
if(execl("/home/neeraj/neerajgit/ptrace/tchild", "tchild", 0) == -1)
{
fprintf(stderr, "exec err \n"); /* err msg */
exit(EXIT_FAILURE);
}
}
else if(pid < 0) {
fprintf(stderr, "fork err\n");
}
else {
wait(&status);
if(WIFSTOPPED(status) ) { printf("child stopped \n"); }
printf("parent start\n");
kill(pid, SIGSTOP);
data = ptrace(PTRACE_GETREGS, pid, 0,®s); printf("%d\n", data);
data = 30;
ptrace(PTRACE_POKEDATA, pid, 201010 + 8 , &data );
ptrace(PTRACE_PEEKDATA, pid, 201010 + 8, NULL); printf("%d\n", data);
printf("child started\n");
printf("%ld \n", regs.rbx);
ptrace(PTRACE_CONT, pid, 0, 0);
sleep(5);
}
this is the tchild program
#include <stdio.h>
#include <sys/ptrace.h>
int data;
data = 20; /* tchild main */
int main()
{ printf("child started \n");
while(data != 30) ;
printf("child stopped %d\n", data);
}
我希望将ID类型更改为{
"user_index": {
"aliases": {
"entities": {}
},
"mappings": {
"user": {
"dynamic": "strict",
"_timestamp": {},
"properties": {
"firstName": {
"type": "string",
"index": "not_analyzed"
},
"id": {
"type": "string",
"index": "not_analyzed"
} ....
如何获取和复制此索引创建脚本,只需为工作台中的mysql的get import脚本等最小工作更改字段的类型?
答案 0 :(得分:0)
我猜您可以使用所需的更改推送新的索引映射,然后使用reindex api从旧索引中复制数据。