mirror of
https://github.com/apache/lucene.git
synced 2025-03-08 01:25:19 +00:00
(LUCENE-539) Fix for deprecations in contrib/surround
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@391763 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a2c7eb1afe
commit
d490983a24
@ -131,19 +131,6 @@ public class SpanNearClauseFactory {
|
||||
spanQueries[i++] = sq;
|
||||
}
|
||||
|
||||
/* CHECKME: Does the underlying implementation of SpanQuery need sorting? */
|
||||
if (false) /* true when sorting needed */
|
||||
Arrays.sort(spanQueries, new Comparator() {
|
||||
public int compare(Object o1, Object o2) {
|
||||
SpanQuery sq1 = (SpanQuery) o1;
|
||||
SpanQuery sq2 = (SpanQuery) o2;
|
||||
/* compare the text of the first term of each SpanQuery */
|
||||
return ((Term)sq1.getTerms().iterator().next()).text().compareTo(
|
||||
((Term)sq2.getTerms().iterator().next()).text());
|
||||
}
|
||||
public boolean equals(Object o) {return false;}
|
||||
});
|
||||
|
||||
if (spanQueries.length == 1)
|
||||
return spanQueries[0];
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user