AI Search Service: How do I add a field?

Michael Schmidt 410 Reputation points
2024-10-15T12:00:28.08+00:00

Hi,

can somebody please tell me - and point me to the document I did not read closely enough?

After enriching a document with a skillset I have e.g. fields like ["pool"], ["lawnchairs", "sauna"] - but how do I add them/ summarize them, so that I get ["pool","lawnchairs", "sauna"]? On merge I overwrite one of the arrays (I cannot find the document anymore: Only if I erroneously specify an existing field as output field?)... I cannot pipe the split text skill, as it splits strings, not arrays...

Do I need to specify a new output field?

How do I get single fields (only for training, not sensibly or for real) from this array afterwards - do I specify the now-existing output field as input like ".../*" into a new output field? But with which skill?

Bye

Michael

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Sina Salam 27,796 Reputation points Volunteer Moderator
    2024-10-15T13:58:39.1833333+00:00

    Hello Michael Schmidt,

    Welcome to the Microsoft Q&A and thank you for posting your questions here. Meanwhile, you do not let us know what and which documents you've reading so far. Lols.

    I understand that you're referring to scenarios where fields are being overwritten or you're trying to append values into a single array field instead of having them replace each other.

    In high level difficulties, basic rudiments might really help as below: When you apply a skillset to enrich documents, it's possible to merge arrays in Azure Cognitive Search by ensuring that the output field is new or is designed to hold the merged data. So, avoid Overwriting Arrays and no Built-in Array Merge.

    Secondly, while Azure Cognitive Search doesn't have a native "array merge" skill, you can create a custom skill that merges the arrays as you desire. The output can then be placed into a new field.

    To merge array values manually, you'd either:

    • Use a custom web API skill to process and merge your arrays.
    • Alternatively, if you need to train or test based on individual elements, split the array into individual values using appropriate skills, and store them in separate fields.

    Thirdly, if you want to pull out single fields from an array for training purposes:

    • You can specify the field you want to extract with .../* syntax. This is useful when working with a collection of items within a document.
    • For this extraction, you could use skills like the text extraction skill or a regex skill if you're extracting based on patterns.

    You might be using output Field correctly, make sure you read more in the links provided for further reference:

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.