Re: Getting the actual token from Token's term buffer

2007-12-08 Thread Michael McCandless
Otis Gospodnetic wrote: > Is the idea to: > 1) get the char[] buffer from Token > 2) get its real length via termLength() Yes. And, on getting the char[] buffer, if you need more space than its current length, call resizeTermBuffer(int newSize), which returns a buffer of size >= newSize.

Getting the actual token from Token's term buffer

2007-12-08 Thread Otis Gospodnetic
Hi, It's been a while since I've written a custom TokenFilter, and I'm not having luck getting tokens out of the TokenStream using 2.3-dev. I'm hitting that default term buffer of the size 10 using the following: public final Token next(Token result) throws IOException { result = inp

Re: Applying SpellChecker to a phrase

2007-12-08 Thread Karl Wettin
You might want to take a look at the TokenPhraseSuggester in LUCENE-626. It is more or less a FuzzySpanQuery, built from a matrix of tokens, but places one search for each possible query out of the matrix (with some optional parameters to minimze the query) to find a score and the hits for