package com.kryptnostic.indexing.v1;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Preconditions;

public class ObjectSearchPair {
    public static final String INDEX_PAIR_FIELD = "indexPair";
    private final byte[]       objectSearchPair;

    @JsonCreator
    public ObjectSearchPair( @JsonProperty( INDEX_PAIR_FIELD ) byte[] objectSearchPair ) {
        Preconditions.checkState( objectSearchPair.length == 2080, "Index pair must be 2080 bytes long." );
        this.objectSearchPair = objectSearchPair;
    }

    @JsonProperty( INDEX_PAIR_FIELD )
    public byte[] getSearchPair() {
        return objectSearchPair;
    }
}

@@ -247,21 +247,22 @@
  String 
-INDEX
+SEARCH
 _PAIR_FI
@@ -268,21 +268,22 @@
 IELD = %22
-index
+search
 Pair%22;%0A 
@@ -384,37 +384,38 @@
  @JsonProperty( 
-INDEX
+SEARCH
 _PAIR_FIELD ) by
@@ -628,13 +628,14 @@
 ty( 
-INDEX
+SEARCH
 _PAI

update JSON property name