On Tue, 12 Jun 2007 09:36:15 +1200,
<[EMAIL PROTECTED]> wrote:

I have several issues I have been trying to solve and have been getting
stuck.
The two issues I have been trying to solve are using the
StandardAnalyzer:
- Tokenize strings that the standard grammar is considering serial
numbers, e.g.  "ABC-2007-5-22" is being stored as "ABC-2006-5-22"
instead of "ABC" "2006" "5" "22".

You could write your own tokenizer, like this:

    Public Class AlphaNumericTokenizer
         Inherits Analysis.WhitespaceTokenizer

         Sub New(ByVal myreader As TextReader)
             MyBase.New(myreader)
         End Sub

         Protected Overrides Function IsTokenChar(ByVal aChar As Char) As
Boolean
             Return (Char.IsLetterOrDigit(aChar) OrElse aChar = "-")
         End Function
     End Class
--
[EMAIL PROTECTED]

Reply via email to