# Biber: Filter bibliography with existing keywords by author name

A bibliography having entries from a specific author only should be created using biber's sourcemap feature. Answer https://tex.stackexchange.com/a/65145/99345 shows how to do it with adding a certain keyword to each matching entry. This works for me as well, as long as no keywords were still present in matching bib entries. Thus, the following example produces a references list with only one entry instead of both entries.

Removing the existing keyword foo in the second entry makes both entries appear in the list, as expected.

\begin{filecontents}{\jobname.bib}
@book{first, author = {Doe, John}, title = {First}}
@book{second, author = {Doe, John}, title = {Second}, keywords = {foo}}
\end{filecontents}

\documentclass{article}
\usepackage[backend=biber]{biblatex}

\DeclareSourcemap{
\maps[datatype=bibtex, overwrite]{
\map{
\step[fieldsource=author, match=Doe, final]
\step[fieldset=keywords, fieldvalue=doe, append]
}
}
}

\begin{document}
\nocite{*}
\printbibliography[keyword=doe]
\end{document}


With overwrite and append attributes set, I assumed that also existing keywords can be modified that way. How can the intended behavior be achieved?

The keyword field is a comma separated list. If you just append doe to a list like keya,keyb you get keya,keybdoe, but of course you want keya,keyb,doe, so you need to append ,doe (that may leave you with an empty entry if the keyword field was empty, you might even get a warning, but you can ignore it). You would then use
\DeclareSourcemap{