jettro (10) [Avatar] Offline
#1
Hi, can you elaborate a bit on the reason you need to apply SENTINAL_BEGIN and SENTINAL_END. I do not understand what this accomplishes. Maybe you can add a few more lines of explanation or an example of using it with and without and what the difference is.
Doug Turnbull (15) [Avatar] Offline
#2
Well it's too late for that level of change. But feedback duly noted for the second edition!

The reason to use the SENTINEL is that it is a token that will be matched at search time. So if you just search for the phrase "william shatner" then it might match "don't you love william shatner the star trek captain".

But the goal here isn't to match phrases, it's to find exact matches. One way to do this is to inject tokens that represent the begin and end of the text and phrase match THAT. So if you search for

"SENTINEL_BEGIN William Shatner SENTINEL_END"

then the only thing to match would be what's in the index with those tokens

"SENTINEL_BEGIN William Shatner SENTINEL_END"

and this won't match the document that just mentions william shatner as a phrase ("don't you love william shatner the star trek captain")

Hope that helps
jettro (10) [Avatar] Offline
#3
Ah got it, thanks for the explanation.