Hello
I just want to index the word "Samsung" in the text below
Text: Samsung a30 mobile phone
I mean I want to separate the text above by space and just index the word I want (the word may change by location, for example I might want to index the third or second word of the text)
I use pattern_capture to do this
Pattern: (?<=^(\W+\s){1})(\w+)
But I get the following error
Error:
{
"error" : {
"root_cause" : [
{
"type" : "pattern_syntax_exception",
"reason" : "Look-behind group does not have an obvious maximum length near index 14\n(?<=^(\\w+\\s){1})(\\w+)\n ^"
}
],
"type" : "pattern_syntax_exception",
"reason" : "Look-behind group does not have an obvious maximum length near index 14\n(?<=^(\\w+\\s){1})(\\w+)\n ^"
},
"status" : 400
}
Do you have a solution?