Here I want to replace the value of "patientName" field in "Summary" with some other String.
Is it possible. If yes, Can you please guide me through this?
Thanks for the suggestion @fbaligand but this is not working for me
Let me be clear from my end. I have two fields "patientName" and "Summary".
"Summary" field contains the "patientName" . I want to remove the name from Summary field. Please help
OK, I understand your need.
Note there is a little problem : content in "patientName" field is not exactly content contained in "Summary" field :
Mr Rakesh Kumar <=> Mr. Rakesh Kumar <=> Mr.Rakesh
Yeah that problem exist. But If there is a possibility to take the Content of the field "patientName", then we may use some regex to solve. I am stuck at the initial stage itself
"patientName" => "Mr.Rakesh Kumar"
"Summary" => "Student: Mr.Rakesh Kumar is not performing well in the class. Please take care of Mr.Rakesh Kumar to get better result."
I'm really not sure to understand the result you expect.
Can you give an example with input document (with "Name" and "history" fields) and expected output document ?
Sorry @fbaligand my bad, It's not "history", it is "summary".
The data in the field "StudentName" is "Mr. Rakesh Kumar". I want to replace whatever is present in the "StudentName" with "***" in the entire index. So, I have taken "Summary" field for testing.
As the Name in the "StudentName" is not same in the remaining fields in the index (might be "Rakesh" OR "Mr Rakesh OR "rakesh kumar" not sure), I have divided the "StudentName" field to "FName" and "LName".
So, I thought if I apply CaseInsensitivity for "FName" and "LName" and replace with "***" using gsub, task will be done.
Lets say "summary" = "rakesh is a good student. Rakesh kumar have to undergo some training. Mr rakesh Kumar will be provided a certificate."
After applying the filters, the final result should be
"summary" = "*** is a good student. *** *** have to undergo some training. Mr *** *** will be provided a certificate."
Hope you got the point. Please let me know if I should explain more!!!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.