{
key0: ....,
key1: ...,
key2: [
{
value: [/* Here is the result after splitting the word. */],
source: /* Here is the original string before splitting. */
},
......
}
}
Now, if I turn on the includeMatches option, I can only get the location of the searched string in key2.value, but I want to be able to get the location of the searched result in key2 in order for me to read source.
I wanted to split the search content in advance because the direct search results were not ideal, but the split was effective in improving accuracy.
My data structure is as follows:
My configuration is as follows:
Now, if I turn on the
includeMatches
option, I can only get the location of the searched string inkey2.value
, but I want to be able to get the location of the searched result inkey2
in order for me to readsource
.I wanted to split the search content in advance because the direct search results were not ideal, but the split was effective in improving accuracy.