Well, that would explain it, I hand't noticed the start and end values, I'm not experienced with analysis, but this is really interesting, I will look into this,
Thanks a lot Shawn! On Tue, Oct 11, 2016 at 7:31 AM, Shawn Heisey <apa...@elyograg.org> wrote: > On 10/11/2016 12:15 AM, Juan Fernando Mora wrote: > > Hi, I have been doing some research on highlighting partial matches, > > there are some information on google but is far from complete and I > > just can't get it to work. *I have highlighting working but it > > highlights complete words, example:* > > I have no experience with highlighting, but I think the reason that this > happens is because of how the Lucene index (specifically in this case, > the EdgeNGram filter) stores information in the index. I put your > fieldType into a 6.2 example index and did index analysis on > "computer". This is the result: > > https://www.dropbox.com/s/ph524b8ij1hk28o/solr-analysis- > computer-edgengrams.png?dl=0 > > Notice how every term has a start value of "0" and an end value of "8" > ... this is the character position inside the original indexed text. > Every term resolves to the original source text of "computer". > > I believe these start/end values in the index are how highlighting > decides *what* to highlight, though I admit I could have a flawed > understanding of how it works. If my understanding is correct, then > obtaining what you want would involve an alternate NGram filter that > writes different start/end values. I'm don't think that an alternative > like this to EdgeNGram exists. > > Thanks, > Shawn > >