2

Does Lucene's Standard Tokenizer remove whitespaces and blank lines? I've been reading the API (StandardTokenizer) but it's not specified. Maybe tokenizers do it by default, I don't know.

JJJ
  • 32,902
  • 20
  • 89
  • 102
synack
  • 1,699
  • 3
  • 24
  • 50

1 Answers1

1

Yes. Lucene tokenizers grab indexable terms from documents, which does not include whitespace. They do preserve the token's offsets in the original document, though.

This is documented in the docs for StandardTokenizer:

  • Splits words at punctuation characters, removing punctuation.

(Whitespace is punctuation.)

Fred Foo
  • 355,277
  • 75
  • 744
  • 836