text: public void build(InputIterator iterator) throws IOException {if (iterator.hasPayloads()) {throw new IllegalArgumentException("this suggester doesn't support payloads");}if (iterator.hasContexts()) {throw new IllegalArgumentException("this suggester doesn't support contexts");}count = 0;trie = new JaspellTernarySearchTrie();trie.setMatchAlmostDiff(editDistance);BytesRef spare;final CharsRefBuilder charsSpare = new CharsRefBuilder();while ((spare = iterator.next()) != null) {final long weight = iterator.weight();if (spare.length == 0) {continue;}charsSpare.copyUTF8Bytes(spare);trie.put(charsSpare.toString(), Long.valueOf(weight));count++;}}