This is explained in the
Formulas Action documentation, of which the function from_search() is part.
To summarize; from_search() pulls data from multiple books, so it can potentially take up several minutes depending on the size of library and nature of the query. While in template dialog, you cannot allow this to happen, because the template gets re-evaluated with every letter typed, so it can completely freeze the dialog.
As a solution to the above, when in template dialog, from_search() always returns a fixed list of five items (e.g. '1,2,3,4,5') no matter the query being given to it.
Edit: Even though it returns a fixed list, it still verifies the arguments (field_name and search_string), and will return an error if it finds a problem with either.
Edit2: The items of the list and the separator are changed based on the field_name.