Commit 5d989813 authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

patch lucene indexeing behaviour for inline elements

parent e185c03a
......@@ -82,6 +82,9 @@
<target name="build" depends="exist-git">
<echo message="building eXist"/>
<echo message="patching lucene inlining"/>
<patch patchfile="${resources.dir}/lucene-inline.patch" originalfile="${exist.dest}/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java" ignorewhitespace="true" failonerror="false" />
<!-- add some more xar packages to autodeploy -->
<copy file="${resources.dir}/local.build.properties.override" tofile="${exist.dest}/build.properties" />
......@@ -101,7 +104,6 @@
</replace>
<!-- former patch, now replaced <patch patchfile="${resources.dir}/conf.xml.cqlparser.patch" originalfile="${exist.dist}/conf.xml" ignorewhitespace="true" failonerror="true" /> -->
<echo message="building and integrating SADE"/>
<ant antfile="${sade.src}/build.xml" inheritAll="false" />
<!-- add xar files to autodeploy -->
......
--- a/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java
+++ b/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java
@@ -28,6 +28,10 @@ public class DefaultTextExtractor extends AbstractTextExtractor {
private boolean addSpaceBeforeNext = false;
public int startElement(QName name) {
+ if(isInlineNode(name)) {
+ addSpaceBeforeNext = false;
+ }
+
if (config.isIgnoredNode(name) || (idxConfig != null && idxConfig.isIgnoredNode(name)))
stack++;
else if (!isInlineNode(name) && buffer.length() > 0 && buffer.charAt(buffer.length() - 1) != ' ') {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment