diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanRelationPartQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanRelationPartQuery.java
index c5a58c4..bcdfca8 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanRelationPartQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanRelationPartQuery.java
@@ -17,28 +17,32 @@
  * 
  * 	@author margaretha
  * */
-public class SpanRelationPartQuery extends SpanWithIdQuery{
+public class SpanRelationPartQuery extends SpanRelationQuery{
 	
 	private static String elementStr = "s"; // default element interval type
 	
 	private SpanElementQuery elementQuery;
 	private boolean matchRight;  // if false, match left
-	private int window;
+	private boolean inverseRelation;  // if false, sort result by the left
+	private int window;	
 	
 	public SpanRelationPartQuery(SpanRelationQuery spanRelationQuery,
 			SpanWithIdQuery secondClause, // match tokenWithIdQuery, ElementQuery, RelationQuery
 			boolean matchRight,
+			boolean returnRight,
 			boolean collectPayloads) {
-		this(spanRelationQuery, secondClause, elementStr, matchRight, collectPayloads);		
+		this(spanRelationQuery, secondClause, elementStr, matchRight, returnRight, collectPayloads);		
 	}
 	
 	public SpanRelationPartQuery(SpanRelationQuery spanRelationQuery,
 			SpanWithIdQuery secondClause, 
 			String elementStr,
 			boolean matchRight,
+			boolean inverseRelation,
 			boolean collectPayloads) {
 		super(spanRelationQuery, secondClause, collectPayloads);
 		this.matchRight = matchRight;
+		this.inverseRelation = inverseRelation;
 		elementQuery = new SpanElementQuery(spanRelationQuery.getField(), elementStr);		
 	}
 	
@@ -46,9 +50,11 @@
 			SpanWithIdQuery secondClause, // match tokenWithIdQuery, ElementQuery, RelationQuery
 			int window,
 			boolean matchRight,
+			boolean inverseRelation,
 			boolean collectPayloads) {
 		super(spanRelationQuery, secondClause, collectPayloads);
 		this.matchRight = matchRight;
+		this.inverseRelation = inverseRelation;
 		this.window = window;
 	}
 	
@@ -65,6 +71,7 @@
 				(SpanWithIdQuery) this.secondClause,
 				this.elementQuery.getElementStr(),
 				this.matchRight, 
+				this.inverseRelation,
 				this.collectPayloads
 		);		
 		return sq;
@@ -101,6 +108,14 @@
 		this.matchRight = matchRight;
 	}
 
+	public boolean isInverseRelation() {
+		return inverseRelation;
+	}
+
+	public void setInverseRelation(boolean inverseRelation) {
+		this.inverseRelation = inverseRelation;
+	}
+
 	public SpanElementQuery getElementQuery() {
 		return elementQuery;
 	}
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanWithAttributeQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanWithAttributeQuery.java
index e5c0613..2c03fdc 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanWithAttributeQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanWithAttributeQuery.java
@@ -15,60 +15,56 @@
 import de.ids_mannheim.korap.query.spans.SpansWithAttribute;
 import de.ids_mannheim.korap.query.spans.ElementSpans;
 import de.ids_mannheim.korap.query.spans.RelationSpans;
+import de.ids_mannheim.korap.query.spans.TermSpansWithId;
 
-/**	Enumeration of spans (e.g. element or relation spans) having some specific attribute(s) or 
- * 	<em>not</em> having some attribute(s).
+/**	Enumeration of spans (e.g. element or relation spans) having some 
+ * 	specific attribute(s) or <em>not</em> having some attribute(s).
  * 
  * 	@author margaretha
  */
-public class SpanWithAttributeQuery extends SimpleSpanQuery{
+public class SpanWithAttributeQuery extends SpanWithIdQuery{
 		
 	private boolean isMultipleAttributes;
 	private String type;
 	
-	public SpanWithAttributeQuery(SpanElementQuery firstClause,
+	public SpanWithAttributeQuery(SpanWithIdQuery firstClause,
 			SpanAttributeQuery secondClause, boolean collectPayloads) {
 		super(firstClause, secondClause, collectPayloads);
-		type = "spanElementWithAttribute"; 
+		setType();
 	}
 	
-	public SpanWithAttributeQuery(SpanElementQuery firstClause,
+	public SpanWithAttributeQuery(SpanWithIdQuery firstClause,
 			List<SpanQuery> secondClauses, boolean collectPayloads) {
 		super(firstClause, secondClauses, collectPayloads);
 		isMultipleAttributes = true;
-		type = "spanElementWithAttribute";
-	}
+		setType();
+	}	
 	
-	public SpanWithAttributeQuery(SpanRelationQuery firstClause,
-			SpanAttributeQuery secondClause, boolean collectPayloads) {
-		super(firstClause, secondClause, collectPayloads);
-		type = "spanRelationWithAttribute";		
+	public String getType() {
+		return type;
 	}
-	
-	public SpanWithAttributeQuery(SpanRelationQuery firstClause,
-			List<SpanQuery> secondClauses, boolean collectPayloads) {
-		super(firstClause, secondClauses, collectPayloads);
-		isMultipleAttributes = true;
-		type = "spanRelationWithAttribute";		
+
+	public void setType() {
+		if (SpanElementQuery.class.isInstance(firstClause)){
+			type = "spanElementWithAttribute"; 
+		}
+		else if (SpanRelationQuery.class.isInstance(firstClause)){
+			type = "spanRelationWithAttribute";	
+		}
+		else if (SpanTermWithIdQuery.class.isInstance(firstClause)){
+			type = "spanTermWithAttribute";	
+		}
 	}
 
 	@Override
 	public SimpleSpanQuery clone() {
 		SpanWithAttributeQuery sq;
 		if (!isMultipleAttributes){			
-			if (type.equals("spanElementWithAttribute")){			
-				sq = new SpanWithAttributeQuery( 
-						(SpanElementQuery) firstClause.clone(), 
-						(SpanAttributeQuery) secondClause.clone(), 
-						collectPayloads);
-			}
-			else {
-				sq = new SpanWithAttributeQuery( 
-						(SpanRelationQuery) firstClause.clone(), 
-						(SpanAttributeQuery) secondClause.clone(), 
-						collectPayloads);
-			}
-		}
+			sq = new SpanWithAttributeQuery( 
+					(SpanWithIdQuery) firstClause.clone(), 
+					(SpanAttributeQuery) secondClause.clone(), 
+					collectPayloads);
+		}		
 		else {
 			List<SpanQuery> clauseList = new ArrayList<SpanQuery>();
 			SpanAttributeQuery saq;
@@ -76,19 +72,10 @@
 				saq = (SpanAttributeQuery) q;
 				clauseList.add(saq.clone());
 			}
-			
-			if (type.equals("spanElementWithAttribute")){			
-				sq = new SpanWithAttributeQuery( 
-						(SpanElementQuery) firstClause.clone(), 
-						clauseList, 
-						collectPayloads);
-			}
-			else {
-				sq = new SpanWithAttributeQuery( 
-						(SpanRelationQuery) firstClause.clone(), 
-						clauseList, 
-						collectPayloads);
-			}
+			sq = new SpanWithAttributeQuery( 
+					(SpanWithIdQuery) firstClause.clone(), 
+					clauseList, 
+					collectPayloads);
 		}
 		return sq;
 	}
@@ -103,8 +90,12 @@
 			return new SpansWithAttribute(this, (ElementSpans) spans, 
 					context, acceptDocs, termContexts);
 		}
+		else if (type.equals("spanRelationWithAttribute")){
+			return new SpansWithAttribute(this, (RelationSpans) spans,
+					context, acceptDocs, termContexts);
+		}
 		
-		return new SpansWithAttribute(this, (RelationSpans) spans,
+		return new SpansWithAttribute(this, (TermSpansWithId) spans,
 				context, acceptDocs, termContexts);
 	}
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanWithIdQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanWithIdQuery.java
index d117f98..aefd7ce 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanWithIdQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanWithIdQuery.java
@@ -1,5 +1,7 @@
 package de.ids_mannheim.korap.query;
 
+import java.util.List;
+
 import org.apache.lucene.search.spans.SpanQuery;
 
 public abstract class SpanWithIdQuery extends SimpleSpanQuery{
@@ -12,4 +14,9 @@
 			boolean collectPayloads) {
 		super(firstClause, secondClause, collectPayloads);
 	}
+	
+	public SpanWithIdQuery(SpanQuery firstClause,
+			List<SpanQuery> secondClauses, boolean collectPayloads) {
+		super(firstClause, secondClauses, collectPayloads);
+	}
 }
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
index b4c5dba..43163c8 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
@@ -3,6 +3,7 @@
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -27,14 +28,10 @@
 
 	private List<CandidateElementSpans> candidateList;
 	private int currentDoc, currentPosition;
-	//private short elementRef;
 	private TermSpans termSpans;	
 	
-	protected Logger logger = LoggerFactory.getLogger(ElementSpans.class);
+	private Logger logger = LoggerFactory.getLogger(ElementSpans.class);
 
-        // This advices the java compiler to ignore all loggings
-        public static final boolean DEBUG = false;
-	
 	public ElementSpans(SpanElementQuery spanElementQuery,
 			AtomicReaderContext context, Bits acceptDocs,
 			Map<Term, TermContext> termContexts) throws IOException {
@@ -71,8 +68,7 @@
 				return true;
 			}
 			else{
-			        if (DEBUG)
-				     logger.info("Setting candidate list");
+			    //logger.info("Setting candidate list");
 				setCandidateList();				
 				currentDoc = termSpans.doc();
 				currentPosition = termSpans.start();
@@ -126,8 +122,8 @@
 				cs.setSpanId((short) -1);
 			}
 			// Copy the start and end character offsets
-			byte[] b = new byte[8];
-			System.arraycopy(bb.array(), 0, b, 0, 8);
+			byte[] b = new byte[8];			
+			b = Arrays.copyOfRange(bb.array(), 0, 8);
 			cs.setPayloads(Collections.singletonList(b));
 	    }
 	    else {	
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/RelationBaseSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/RelationBaseSpans.java
new file mode 100644
index 0000000..528aec1
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/RelationBaseSpans.java
@@ -0,0 +1,56 @@
+package de.ids_mannheim.korap.query.spans;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.lucene.index.AtomicReaderContext;
+import org.apache.lucene.index.Term;
+import org.apache.lucene.index.TermContext;
+import org.apache.lucene.util.Bits;
+
+import de.ids_mannheim.korap.query.SpanWithIdQuery;
+
+public abstract class RelationBaseSpans extends SpansWithId{
+
+	protected short leftId, rightId;
+	protected int rightStart, rightEnd;
+	
+	public RelationBaseSpans(SpanWithIdQuery spanWithIdQuery,
+			AtomicReaderContext context, Bits acceptDocs,
+			Map<Term, TermContext> termContexts) throws IOException {
+		super(spanWithIdQuery, context, acceptDocs, termContexts);
+		// TODO Auto-generated constructor stub
+	}
+	
+	public short getLeftId() {
+		return leftId;
+	}
+
+	public void setLeftId(short leftId) {
+		this.leftId = leftId;
+	}
+
+	public short getRightId() {
+		return rightId;
+	}
+
+	public void setRightId(short rightId) {
+		this.rightId = rightId;
+	}
+
+	public int getRightStart() {
+		return rightStart;
+	}
+
+	public void setRightStart(int rightStart) {
+		this.rightStart = rightStart;
+	}
+
+	public int getRightEnd() {
+		return rightEnd;
+	}
+
+	public void setRightEnd(int rightEnd) {
+		this.rightEnd = rightEnd;
+	}
+}
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/RelationPartSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/RelationPartSpans.java
index 228c0ef..d3889f7 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/RelationPartSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/RelationPartSpans.java
@@ -23,17 +23,18 @@
  * 
  * 	@author margaretha
  * */
-public class RelationPartSpans extends SpansWithId{
+public class RelationPartSpans extends RelationBaseSpans{
 	
-	private RelationSpans relationSpans;
+	private RelationBaseSpans relationSpans;
 	private SpansWithId matcheeSpans;
 	private ElementSpans element;
 	private List<CandidateRelationSpan> candidateRelations;
 	
 	private boolean matchRight;
+	private boolean inverse;
 	private boolean hasMoreMatchees;
 	
-	private short leftId, rightId;
+//	private short leftId, rightId;
 	private int window;
 	
 	public RelationPartSpans(SpanRelationPartQuery query,	
@@ -47,7 +48,7 @@
 		else{
 			window = query.getWindow();
 		}
-		relationSpans = (RelationSpans) firstSpans;
+		relationSpans = (RelationBaseSpans) firstSpans;
 		matcheeSpans = (SpansWithId) secondSpans;		
 		// hack
 		matcheeSpans.hasSpanId = true;
@@ -59,6 +60,7 @@
   		}
 		candidateRelations = new ArrayList<CandidateRelationSpan>();
 		matchRight = query.isMatchRight();
+		inverse = query.isInverseRelation();
 	}
 
 	@Override
@@ -73,13 +75,17 @@
 			if (candidateRelations.size() > 0){
 				CandidateRelationSpan relationSpan = candidateRelations.get(0);				
 				matchDocNumber = relationSpan.getDoc();
-				if (matchRight){
+				if (!inverse){
 					matchStartPosition = relationSpan.getStart();
 					matchEndPosition = relationSpan.getEnd();
+					setRightStart(relationSpan.getRightStart());
+					setRightEnd(relationSpan.getRightEnd());
 				}					
-				else{
+				else{ // maybe a bit confusing -- inverse relation
 					matchStartPosition = relationSpan.getRightStart();
 					matchEndPosition = relationSpan.getRightEnd();
+					setRightStart(relationSpan.getStart());
+					setRightEnd(relationSpan.getEnd());
 				}
 				setLeftId(relationSpans.getLeftId());
 				setRightId(relationSpan.getRightId());
@@ -177,11 +183,11 @@
 	private int matchRelation(int i, CandidateRelationSpan r, int startPos, int endPos) throws IOException {
 		if(startPos == matcheeSpans.start() ){
 			if 	(endPos == matcheeSpans.end()){		
-				if (matchRight && r.getRightId() == matcheeSpans.getSpanId()){
+				if (!inverse && r.getRightId() == matcheeSpans.getSpanId()){
 					r.sortRight = false;
 					candidateRelations.add(r);
 				}
-				else if (!matchRight && r.getLeftId() == matcheeSpans.getSpanId()) {
+				else if (inverse && r.getLeftId() == matcheeSpans.getSpanId()) {
 					r.sortRight = true;
 					candidateRelations.add(r);
 				}
@@ -219,7 +225,7 @@
 		return 0;
 	}
 	
-	public short getLeftId() {
+	/*public short getLeftId() {
 		return leftId;
 	}
 
@@ -233,7 +239,7 @@
 
 	public void setRightId(short rightId) {
 		this.rightId = rightId;
-	}
+	}*/
 
 	class CandidateRelationSpan extends CandidateSpans implements Comparable<CandidateSpans>{
 		
@@ -241,7 +247,7 @@
 		private short leftId, rightId;
 		private boolean sortRight;
 		
-		public CandidateRelationSpan(RelationSpans span, boolean sortRight) 
+		public CandidateRelationSpan(RelationBaseSpans span, boolean sortRight) 
 				throws IOException {
 			super(span);
 			this.rightStart = span.getRightStart();
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java
index 487f841..380e899 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java
@@ -39,12 +39,12 @@
  * 
  * 	@author margaretha
  * */
-public class RelationSpans extends SpansWithId{
+public class RelationSpans extends RelationBaseSpans{
 
 	//short relationId;
-	private int rightStart, rightEnd;
+//	private int rightStart, rightEnd;
 	private int currentDoc, currentPosition;
-	private short leftId, rightId;
+//	private short leftId, rightId;
 	
 	private TermSpans relationTermSpan;
 	
@@ -181,27 +181,21 @@
 		this.rightEnd = rightEnd;
 	}
 
-
-
-	public short getLeftId() {
-		return leftId;
-	}
-
-	public void setLeftId(short leftId) {
-		this.leftId = leftId;
-	}
-
-
-
-	public short getRightId() {
-		return rightId;
-	}
-
-	public void setRightId(short rightId) {
-		this.rightId = rightId;
-	}
-
-
+//	public short getLeftId() {
+//		return leftId;
+//	}
+//
+//	public void setLeftId(short leftId) {
+//		this.leftId = leftId;
+//	}
+//
+//	public short getRightId() {
+//		return rightId;
+//	}
+//
+//	public void setRightId(short rightId) {
+//		this.rightId = rightId;
+//	}
 
 	class CandidateRelationSpan extends CandidateSpans implements Comparable<CandidateSpans>{
 		
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithAttribute.java b/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithAttribute.java
index 40b8d40..344d974 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithAttribute.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithAttribute.java
@@ -25,7 +25,7 @@
  *
  * 	@author margaretha
  * */
-public class SpansWithAttribute extends SimpleSpans{
+public class SpansWithAttribute extends SpansWithId{
 	
 	private SpansWithId withAttributeSpans;
 	private List<AttributeSpans> attributeList;
@@ -83,15 +83,16 @@
 	 * */
 	private boolean advance() throws IOException {
 		
-		while (hasMoreSpans && computeElementPosition()){			
+		while (hasMoreSpans && searchSpanPosition()){			
 		 	    //logger.info("element: " + withAttributeSpans.start() + ","+ withAttributeSpans.end() +
 				//	" ref:"+withAttributeSpans.getSpanId());
 			
-			if (checkElementRef() && checkNotElementRef()){			
+			if (checkSpanId() && checkNotSpanId()){			
 				this.matchDocNumber = withAttributeSpans.doc();
 				this.matchStartPosition = withAttributeSpans.start();
 				this.matchEndPosition = withAttributeSpans.end();
 				this.matchPayload = withAttributeSpans.getPayload();
+				this.spanId = withAttributeSpans.getSpanId();
 				
 				if (attributeList.size() > 0)
 					hasMoreSpans = attributeList.get(0).next();
@@ -108,7 +109,7 @@
 	/** Ensuring all the attribute spans having the same elementRef with 
 	 * 	the actual element's elementRef.
 	 * */
-	private boolean checkElementRef() throws IOException{
+	private boolean checkSpanId() throws IOException{
 		
 		for (AttributeSpans attribute: attributeList){			
 			if (withAttributeSpans.getSpanId() != attribute.getSpanId()){
@@ -128,7 +129,7 @@
 	/** Ensuring elements do not contain the not attributes. In other words, 
 	 * 	the elementRef is not the same as the not attribute's elementRefs. 
 	 * */
-	private boolean checkNotElementRef() throws IOException{
+	private boolean checkNotSpanId() throws IOException{
 		for (AttributeSpans notAttribute: notAttributeList){
 			if (!notAttribute.isFinish() && 
 					withAttributeSpans.start() == notAttribute.start() &&
@@ -144,7 +145,7 @@
 	/**	Search for a possible element having the same doc and start position as
 	 * 	the attributes.
 	 * */
-	private boolean computeElementPosition() throws IOException {		
+	private boolean searchSpanPosition() throws IOException {		
 
 		while (hasMoreSpans){
 			
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithId.java b/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithId.java
index b851e04..f1d836a 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithId.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithId.java
@@ -31,6 +31,4 @@
 	public void setSpanId(short spanId) {
 		this.spanId = spanId;
 	}
-		
-	
 }
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
index a693858..ace4662 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
@@ -350,13 +350,10 @@
 						new SpanTermQuery(new Term("base",">:child-of")),true
 				), 
 				new SpanElementQuery("base","np"), 
-				true, true); 
+				true, false, true); 
 				
 		kr = ki.search(rv,(short) 10);
-		/*for (KorapMatch km : kr.getMatches()){		
-		System.out.println(km.getStartPos() +","+km.getEndPos()+" "
-			+km.getSnippetBrackets());
-		}	*/
+		
 		assertEquals(7, kr.getTotalResults());
 		assertEquals(0,kr.getMatch(0).getStartPos());
 		assertEquals(1,kr.getMatch(0).getEndPos());
@@ -384,6 +381,23 @@
 		assertEquals(5,kr.getMatch(1).getStartPos());
 		assertEquals(6,kr.getMatch(1).getEndPos());
 		
+		// return all nps whose children are articles
+		SpanRelationPartQuery rv3 = 
+			new SpanRelationPartQuery(rv, 
+				new SpanTermWithIdQuery(new Term("base","pos:ART"), true), 
+				false, true, true); 
+		kr = ki.search(rv3,(short) 10);
+		
+		/*for (KorapMatch km : kr.getMatches()){		
+			System.out.println(km.getStartPos() +","+km.getEndPos()+" "
+				+km.getSnippetBrackets()
+					);
+		}	*/
+		assertEquals(2, kr.getTotalResults());
+		assertEquals(2,kr.getMatch(0).getStartPos());
+		assertEquals(4,kr.getMatch(0).getEndPos());
+		assertEquals(5,kr.getMatch(1).getStartPos());
+		assertEquals(7,kr.getMatch(1).getEndPos());
 	}
 	
 	/** Using the opposite relation
@@ -403,7 +417,7 @@
 		SpanRelationPartQuery rv =new SpanRelationPartQuery(
 				spanRelationQuery, 
 				new SpanElementQuery("base","np"), 
-				false, true);
+				false, true, true);
 		kr = ki.search(rv,(short) 10);
 		
 		/*for (KorapMatch km : kr.getMatches()){
@@ -444,7 +458,7 @@
 		SpanRelationPartQuery rv =new SpanRelationPartQuery(
 				spanRelationQuery, 
 				new SpanElementQuery("base","np"), 
-				true, true);
+				true, false, true);
 		kr = ki.search(rv,(short) 10);
 		
 		/*for (KorapMatch km : kr.getMatches()){
@@ -477,7 +491,7 @@
 						new SpanTermQuery(new Term("base",">:child-of")),true
 				), 
 				new SpanElementQuery("base","np"), 
-				false, true);
+				false, true, true);
 		kr = ki.search(rv,(short) 10);
 		/*for (KorapMatch km : kr.getMatches()){
 			System.out.println(km.getStartPos() +","+km.getEndPos()+" "
@@ -499,7 +513,7 @@
 				new SpanRelationQuery(
 						new SpanTermQuery(new Term("base",">:child-of")),true
 				),
-				rv, true, true);
+				rv, true, false, true);
 				
 		kr = ki.search(rv3,(short) 10);
 		
@@ -526,7 +540,7 @@
 						new SpanTermQuery(new Term("base",">:dep")),true
 				), 
 				new SpanTermWithIdQuery(new Term("base","pos:NN"), true), 
-				true, true);
+				true, false, true);
 		kr = ki.search(rv,(short) 10);
 		assertEquals(3, kr.getTotalResults());
 		assertEquals(1,kr.getMatch(0).getStartPos());
@@ -542,7 +556,7 @@
 						new SpanTermQuery(new Term("base","<:dep")),true
 				), 
 				new SpanTermWithIdQuery(new Term("base","pos:NN"),true), 
-				true, true);
+				true, false, true);
 		kr = ki.search(rv,(short) 10);
 		assertEquals(3, kr.getTotalResults());
 		assertEquals(2,kr.getMatch(0).getStartPos());
@@ -560,7 +574,7 @@
 						new SpanTermQuery(new Term("base",">:dep")),true
 				), 
 				new SpanTermWithIdQuery(new Term("base","pos:NN"),true), 
-				false, true);
+				false, true, true);
 		kr = ki.search(rv,(short) 10);
 			
 		assertEquals(3, kr.getTotalResults());
@@ -577,7 +591,7 @@
 						new SpanTermQuery(new Term("base","<:dep")),true
 				), 
 				new SpanTermWithIdQuery(new Term("base","pos:NN"),true), 
-				false, true);
+				false, true, true);
 		kr = ki.search(rv,(short) 10);
 		
 		/*for (KorapMatch km : kr.getMatches()){		
@@ -606,7 +620,7 @@
 						new SpanTermQuery(new Term("base",">:child-of")),true
 				), 
 				new SpanElementQuery("base","np"), 
-				6, true, true); 
+				6, true, false, true); 
 				
 		kr = ki.search(rv,(short) 10);
 		assertEquals(7, kr.getTotalResults());
@@ -616,7 +630,7 @@
 						new SpanTermQuery(new Term("base","<:dep")),true
 				), 
 				new SpanTermWithIdQuery(new Term("base","pos:NN"),true), 
-				3, false, true);
+				3, false, true, true);
 		kr = ki.search(rv,(short) 10);
 		assertEquals(3, kr.getTotalResults());
 		
