Rename TestElementDistanceSpan to TestElementDistanceIndex
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/UnorderedDistanceSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/UnorderedDistanceSpans.java
new file mode 100644
index 0000000..9bc0d78
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/UnorderedDistanceSpans.java
@@ -0,0 +1,39 @@
+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.SpanDistanceQuery;
+
+public class UnorderedDistanceSpans extends SimpleSpans{
+
+	public UnorderedDistanceSpans(SpanDistanceQuery query,
+			AtomicReaderContext context, Bits acceptDocs,
+			Map<Term, TermContext> termContexts) throws IOException {
+		super(query, context, acceptDocs, termContexts);
+	}
+
+	@Override
+	public boolean next() throws IOException {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public boolean skipTo(int target) throws IOException {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public long cost() {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+}
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceSpan.java b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
similarity index 94%
rename from src/test/java/de/ids_mannheim/korap/index/TestElementDistanceSpan.java
rename to src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
index a450e9e..8cdd7ef 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceSpan.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
@@ -18,7 +18,7 @@
 import de.ids_mannheim.korap.query.SpanNextQuery;
 
 @RunWith(JUnit4.class)
-public class TestElementDistanceSpan {
+public class TestElementDistanceIndex {
 	
 	KorapResult kr;
     KorapIndex ki;   
@@ -81,13 +81,14 @@
 	}
 	
 	public SpanQuery createQuery(String elementType, String x, String y, 
-			int minDistance, int maxDistance){        
+			int minDistance, int maxDistance, boolean isOrdered){        
 		return new SpanDistanceQuery(
         		new SpanElementQuery("base", elementType), 
         		new SpanTermQuery(new Term("base",x)), 
         		new SpanTermQuery(new Term("base",y)), 
         		minDistance, 
         		maxDistance, 
+        		true,
         		true);
 	}
 	
@@ -106,7 +107,7 @@
         ki.commit();
         
         SpanQuery sq;        
-        sq = createQuery("s", "s:b", "s:c", 0, 2);        
+        sq = createQuery("s", "s:b", "s:c", 0, 2,true);        
         kr = ki.search(sq, (short) 10);
         
         assertEquals(4, kr.totalResults());
@@ -128,7 +129,7 @@
         ki.commit();
         
         SpanQuery sq;
-        sq = createQuery("p", "s:b", "s:d", 1, 1);
+        sq = createQuery("p", "s:b", "s:d", 1, 1,true);
         kr = ki.search(sq, (short) 10);
         
         assertEquals(1, kr.totalResults());
@@ -149,7 +150,7 @@
         ki.commit();
         
         SpanQuery sq, edq;
-        edq = createQuery("s", "s:b", "s:c", 1, 1);
+        edq = createQuery("s", "s:b", "s:c", 1, 1,true);
 		
         sq = new SpanNextQuery(edq, 
         		new SpanTermQuery(new Term("base", "s:d")));