Lucene 9.8 updates the vector dimension limit overridability. Moving it to the codec. 

We should switch our override to do this correctly now, instead of returning a `FieldType` overriding the value.

For now, this commit would belong in the `lucene_snapshot` branch.
server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java
}
    }
    static final Map<String, ElementType> namesToElementType = Map.of(
        ElementType.BYTE.toString(),
        ElementType.BYTE,
        ElementType.FLOAT.toString(),
        ElementType.FLOAT
    );
    enum VectorSimilarity {
        L2_NORM(VectorSimilarityFunction.EUCLIDEAN) {
            @Override
            float score(float similarity, ElementType elementType, int dim) {
                return switch (elementType) {
                    case BYTE, FLOAT -> 1f / (1f + similarity * similarity);
                };
            }
        },
        COSINE(VectorSimilarityFunction.COSINE) {
            @Override
            float score(float similarity, ElementType elementType, int dim) {
                return switch (elementType) {
                    case BYTE, FLOAT -> (1 + similarity) / 2f;
                };
            }
        },
        DOT_PRODUCT(VectorSimilarityFunction.DOT_PRODUCT) {
            @Override
            float score(float similarity, ElementType elementType, int dim) {
                return switch (elementType) {
                    case BYTE -> 0.5f + similarity / (float) (dim * (1 << 15));