Hi Esteban! With the None approach, it fear it can get confusing when iterating over all authors (or whatever other field) as one then get None into the mix. If one really wants to get the first author, maybe calling "first_author" (where "first_author" is a direct lookup to "_first_author") is enough and then expecting a None or empty list is alright? I dunno, it seems to me that when asking for "give me all the authors", None does not belong there with "John Ellis".
Cheers, Jan Cheers, Jan --- Jan Age Lavik System Developer INSPIRE-HEP <http://inspirehep.net> Github: @jalavik <https://github.com/jalavik> Work phone: +41 22 76 78682 On Thu, Mar 27, 2014 at 3:38 PM, Esteban Gabancho < [email protected]> wrote: > Hey guys! > > I have a question about the aggregation of several fields into one. > > Taking the example of the authors, lets say I have two fields > `_first_author` and `_additional_authors` and I want to aggregate then into > `authors`. > The common case, and the easiest, is when I have one `_first_author` and > cero or more `_additional_authors`, in which case I just put a list with > the authors (what else right? :-) > The problem, or the question, comes when I don’t have a `_first_author` in > which case I’m not sure about the content of the `authors` field, it could > be i) only the list of `_additional_authors` or ii) `None` follow by the > the list of `_additional_authors`. > > I think the second solution is the closest one to reality, the `None` > express that the record doesn’t have a first author. And I also think that > we could apply this solution for other cases where we have this kind of > situation (like with the `110__` and `710__`). > > What do you think? > Lars, as you have already pu in production, how do you deal with this > problem? > > Cheers, > -- > Esteban J. G. Gabancho > >

