mirror of https://github.com/apache/lucene.git
LUCENE-882: Spellchecker doesn't need to store ngrams
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@539727 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0f7d981498
commit
52acd10f63
|
@ -166,7 +166,11 @@ Optimizations
|
||||||
TestBoolean2 test to keep passing.
|
TestBoolean2 test to keep passing.
|
||||||
(Paul Elschot via Otis Gospodnetic)
|
(Paul Elschot via Otis Gospodnetic)
|
||||||
|
|
||||||
Documentation:
|
4. LUCENE-882: Spellchecker doesn't store the ngrams anymore but only indexes
|
||||||
|
them to keep the spell index small. (Daniel Naber)
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
|
||||||
1. LUCENE 791 && INFRA-1173: Infrastructure moved the Wiki to http://wiki.apache.org/lucene-java/ Updated the links in the docs and wherever else I found references. (Grant Ingersoll, Joe Schaefer)
|
1. LUCENE 791 && INFRA-1173: Infrastructure moved the Wiki to http://wiki.apache.org/lucene-java/ Updated the links in the docs and wherever else I found references. (Grant Ingersoll, Joe Schaefer)
|
||||||
|
|
||||||
2. Fixed the javadoc for ScoreDocComparator.compare() to be consistent with
|
2. Fixed the javadoc for ScoreDocComparator.compare() to be consistent with
|
||||||
|
|
|
@ -349,14 +349,14 @@ public class SpellChecker {
|
||||||
String end = null;
|
String end = null;
|
||||||
for (int i = 0; i < len - ng + 1; i++) {
|
for (int i = 0; i < len - ng + 1; i++) {
|
||||||
String gram = text.substring(i, i + ng);
|
String gram = text.substring(i, i + ng);
|
||||||
doc.add(new Field(key, gram, Field.Store.YES, Field.Index.UN_TOKENIZED));
|
doc.add(new Field(key, gram, Field.Store.NO, Field.Index.UN_TOKENIZED));
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
doc.add(new Field("start" + ng, gram, Field.Store.YES, Field.Index.UN_TOKENIZED));
|
doc.add(new Field("start" + ng, gram, Field.Store.NO, Field.Index.UN_TOKENIZED));
|
||||||
}
|
}
|
||||||
end = gram;
|
end = gram;
|
||||||
}
|
}
|
||||||
if (end != null) { // may not be present if len==ng1
|
if (end != null) { // may not be present if len==ng1
|
||||||
doc.add(new Field("end" + ng, end, Field.Store.YES, Field.Index.UN_TOKENIZED));
|
doc.add(new Field("end" + ng, end, Field.Store.NO, Field.Index.UN_TOKENIZED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue