mirror of https://github.com/apache/lucene.git
- A patch to FieldInfos.java that Doug Cutting suggested at:
http://marc.theaimsgroup.com/?l=lucene-user&m=100253044509125&w=2 This allows co-existence of indexed and non-indexed fields with the same name. PR: Obtained from: Submitted by: Guido Casper Reviewed by: otis git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149730 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6fe55d42eb
commit
a90504d2b6
|
@ -105,10 +105,8 @@ final class FieldInfos {
|
|||
if (fi == null)
|
||||
addInternal(name, isIndexed);
|
||||
else if (fi.isIndexed != isIndexed)
|
||||
throw new IllegalStateException("field " + name +
|
||||
(fi.isIndexed ? " must" : " cannot") +
|
||||
" be an indexed field.");
|
||||
}
|
||||
fi.isIndexed = true;
|
||||
}
|
||||
|
||||
private final void addInternal(String name, boolean isIndexed) {
|
||||
FieldInfo fi = new FieldInfo(name, isIndexed, byNumber.size());
|
||||
|
|
Loading…
Reference in New Issue