From 7c7c7bd0777fb88940b031d2f9cf0dabab753460 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 26 Dec 2011 21:36:16 +0000 Subject: [PATCH] LUCENE-3662: add note git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1224823 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/search/spell/LuceneLevenshteinDistance.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/suggest/src/java/org/apache/lucene/search/spell/LuceneLevenshteinDistance.java b/modules/suggest/src/java/org/apache/lucene/search/spell/LuceneLevenshteinDistance.java index 5bb6bb4087f..151ae7c425b 100644 --- a/modules/suggest/src/java/org/apache/lucene/search/spell/LuceneLevenshteinDistance.java +++ b/modules/suggest/src/java/org/apache/lucene/search/spell/LuceneLevenshteinDistance.java @@ -45,6 +45,12 @@ public final class LuceneLevenshteinDistance implements StringDistance { IntsRef otherPoints; int n; int d[][]; // cost array + + // NOTE: if we cared, we could 3*m space instead of m*n space, similar to + // what LevenshteinDistance does, except cycling thru a ring of three + // horizontal cost arrays... but this comparator is never actually used by + // DirectSpellChecker, its only used for merging results from multiple shards + // in "distributed spellcheck", and its inefficient in other ways too... // cheaper to do this up front once targetPoints = toIntsRef(target);