mirror of https://github.com/apache/lucene.git
SOLR-5652: in cursor tests, don't sort on 'plain' docvalue fields (i.e., those using standard Lucene sorting for missing values) when the codec doesn't support missing docvalues.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1566741 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b872f4b5c3
commit
88f16b6069
|
@ -634,21 +634,24 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
|
||||||
* </p>
|
* </p>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li><code>_version_</code> is removed</li>
|
* <li><code>_version_</code> is removed</li>
|
||||||
* <li><code>dv_last</code> and <code>dv_first</code> fields are removed
|
* <li>
|
||||||
* if the codec doesn't support them</li>
|
* <code>*_dv_last</code>, <code>*_dv_first</code> and <code>*_dv</code>
|
||||||
|
* fields are removed if the codec doesn't support missing DocValues
|
||||||
|
* </li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* @see #defaultCodecSupportsMissingDocValues
|
* @see #defaultCodecSupportsMissingDocValues
|
||||||
*/
|
*/
|
||||||
public static List<String> pruneAndDeterministicallySort(Collection<String> raw) {
|
public static List<String> pruneAndDeterministicallySort(Collection<String> raw) {
|
||||||
|
|
||||||
final boolean prune_dv_missing = ! defaultCodecSupportsMissingDocValues();
|
final boolean prune_dv = ! defaultCodecSupportsMissingDocValues();
|
||||||
|
|
||||||
ArrayList<String> names = new ArrayList<String>(37);
|
ArrayList<String> names = new ArrayList<String>(37);
|
||||||
for (String f : raw) {
|
for (String f : raw) {
|
||||||
if (f.equals("_version_")) {
|
if (f.equals("_version_")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (prune_dv_missing && (f.endsWith("_dv_last") || f.endsWith("_dv_first")) ) {
|
if (prune_dv && (f.endsWith("_dv_last") || f.endsWith("_dv_first"))
|
||||||
|
|| f.endsWith("_dv")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
names.add(f);
|
names.add(f);
|
||||||
|
|
Loading…
Reference in New Issue