|
| 1 | +/* |
| 2 | + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one |
| 3 | + * or more contributor license agreements. Licensed under the Elastic License |
| 4 | + * 2.0; you may not use this file except in compliance with the Elastic License |
| 5 | + * 2.0. |
| 6 | + */ |
| 7 | + |
| 8 | +package org.elasticsearch.upgrades; |
| 9 | + |
| 10 | +import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; |
| 11 | + |
| 12 | +import org.elasticsearch.test.rest.ESRestTestCase; |
| 13 | +import org.junit.Assert; |
| 14 | + |
| 15 | +import java.util.ArrayList; |
| 16 | +import java.util.List; |
| 17 | + |
| 18 | +public class SparseVectorIndexOptionsUpgradeIT extends AbstractUpgradeTestCase { |
| 19 | + |
| 20 | + private final boolean testHasIndexOptions; |
| 21 | + private final boolean testIndexShouldPrune; |
| 22 | + private final boolean testQueryShouldNotPrune; |
| 23 | + private final boolean usePreviousIndexVersion; |
| 24 | + |
| 25 | + public SparseVectorIndexOptionsUpgradeIT( |
| 26 | + boolean setIndexOptions, |
| 27 | + boolean setIndexShouldPrune, |
| 28 | + boolean setQueryShouldNotPrune, |
| 29 | + boolean usePreviousIndexVersion |
| 30 | + ) { |
| 31 | + this.testHasIndexOptions = setIndexOptions; |
| 32 | + this.testIndexShouldPrune = setIndexShouldPrune; |
| 33 | + this.testQueryShouldNotPrune = setQueryShouldNotPrune; |
| 34 | + this.usePreviousIndexVersion = usePreviousIndexVersion; |
| 35 | + } |
| 36 | + |
| 37 | + @ParametersFactory |
| 38 | + public static Iterable<Object[]> parameters() throws Exception { |
| 39 | + List<Object[]> params = new ArrayList<>(); |
| 40 | + // create a matrix of all combinations |
| 41 | + // of our first three parameters |
| 42 | + for (int i=0; i < 8; i++) { |
| 43 | + params.add(new Object[] { |
| 44 | + (i & 1) == 0, (i & 2) == 0, (i & 4) == 0, false |
| 45 | + }); |
| 46 | + } |
| 47 | + // and add in overrides for the previous index versions |
| 48 | + params.add(new Object[] { false, false, false, true }); |
| 49 | + params.add(new Object[] { false, false, true, true }); |
| 50 | + return params; |
| 51 | + } |
| 52 | + |
| 53 | + public void testItPrunesTokensIfIndexOptions() { |
| 54 | + Assert.assertFalse(true); |
| 55 | + } |
| 56 | + |
| 57 | + public void testBehavioralAnalyticsDataRetention() throws Exception { |
| 58 | + Assert.assertFalse(true); |
| 59 | + } |
| 60 | +} |
0 commit comments