Type "dense_vector" not set on properties

I've tried defining a passage_embedding using both:

			"passage_embedding": {
				"type": "dense_vector",
				"dims": 768,
				"similarity": "cosine",
				"index": "true"
			},

and as follows:

			"passage_embedding.predicted_value": {
				"type": "dense_vector",
				"dims": 768,
				"similarity": "cosine",
				"index": "true"
			},

and I've also tried using a pipeline processor as:

		{
			"inference": {
				"model_id": "intfloat__multilingual-e5-base",
				"target_field": "passage_embedding",
				"field_map": {
					"passage": "text_field"
				}
			}
		},

as well as with an inference_config:

    {
      "inference": {
        "model_id": "intfloat__multilingual-e5-base",
        "target_field": "passage_embedding",
        "field_map": {
          "passage": "text_field"
        },
        "inference_config": {
          "text_embedding": {
            "results_field": "predicted_value"
          }
        }
      }
    },

however, while I do receive an array of floats under the passage_embedding.predicted_values field the definition does not show as dense_vector so attempting knn queries fails. What I get is:

              "passage_embedding": {
                "properties": {
                  "dims": {
                    "type": "long"
                  },
                  "index": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  },
                  "similarity": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  },
                  "type": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  }
                }
              },

Note, the size isn't getting set to 512 either.

It turns out I was not performing the sequence of setting my mappings and settings correctly. I've moved to doing everything at once when creating the index rather than calling them separately. This code seems to fix the issues with the weird mappings I was getting:

        if (!indexExists(client, indexName)) {
            try {
                IndexSettings is = getSettingsRequest(indexName, langFamily);
                TypeMapping mr = getMappingsRequest(indexName, langFamily);
                client.indices()
                    .create(cir -> cir.timeout(Time.of(t -> t.time("60s")))
                        .index(indexName)
                        .settings(is)
                        .mappings(mr));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }

        }

Before consolidating these actions, I'd created the index then sought to create the mappings by issuing a mapping request, and then I was trying to set the settings (but the mappings referenced analytics in the settings, and the empty mapping was already created when the index was created, so all kinds of problems...