Skip to content

Commit 94c4386

Browse files
committed
fix: dont look for matches when there is no index config
1 parent 118e6dd commit 94c4386

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

extensions/indexes/lucene/src/main/java/org/exist/indexing/lucene/LuceneMatchListener.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import org.exist.util.serializer.AttrList;
4646
import org.xml.sax.SAXException;
4747

48+
import javax.annotation.Nullable;
4849
import javax.xml.stream.XMLStreamConstants;
4950
import javax.xml.stream.XMLStreamException;
5051
import java.io.IOException;
@@ -174,8 +175,10 @@ private void scanMatches(final NodeProxy p) {
174175
// Collect the text content of all descendants of p.
175176
// Remember the start offsets of the text nodes for later use.
176177
final NodePath path = getPath(p);
177-
final LuceneIndexConfig idxConf = config.getConfig(path).next();
178-
178+
@Nullable final LuceneIndexConfig idxConf = config.getConfig(path).next();
179+
if(idxConf == null) {
180+
return; // there is no index config so there can not be any matches
181+
}
179182
final TextExtractor extractor = new DefaultTextExtractor();
180183
extractor.configure(config, idxConf);
181184

0 commit comments

Comments
 (0)