Re: Highlighting text for queries with huge numbers of terms

2006-02-19 Thread Daniel Noll
markharw00d wrote: Swing supports HTML and will do the highlight for you. SwingText=""+highlighter.getBestFragment(tokenStream,text)+""; If you don't like that approach and really do just want to just know the positions, plug in your own "Formatter" class which, instead of marking up the text,

Re: Highlighting text for queries with huge numbers of terms

2006-02-17 Thread markharw00d
Hi Daniel/Chris, Unfortunately, the contrib/highlighter code in source control fails to meet our needs in two ways: 1. We don't just want fragments, we want *all* of the text, with highlights in the appropriate places (although we do offer a means to display just the fragments as w

Re: Highlighting text for queries with huge numbers of terms

2006-02-16 Thread Daniel Noll
Chris Hostetter wrote: if you build a map whose keys are tokens which begin token lists for queries, each of which is is mapped to a value which is a list of lists of tokens, then you can make one pass over the tokens from the main text, and "lookup" wether or not this is the potential start of s

Re: Highlighting text for queries with huge numbers of terms

2006-02-16 Thread Chris Hostetter
: The existing highlighting code we wrote basically works like this... :1. Get the text out of the Swing component. :2. Break the text into tokens using the appropriate Analyzer. :3. For each term: :3.1. Break the term into tokens using the same Analyzer. :3.2. Iterate