With biblatex, do not capitalise prefixes for last names in the index

Sending bibliographical entries to the index with biblatex causes capitalisation of prefixes that is sometimes unwanted. For example, Dutch names with prefix van or French names with prefix de are sometimes not capitalised in indexes. Also, maybe a little more unusual but still possibly relevant, I've recently learned about a researcher who wishes to be cited with their name in lower case only (I believe this was somewhere in SocSci).

MWE:

\begin{filecontents}{test.bib}
@misc{vanTrijp2013,
author = {van Trijp, Remi},
date = {2013},
title = {A Comparison between approach A and B},
}
\end{filecontents}

\documentclass{article}
\usepackage[indexing=cite,style=authoryear,useprefix=true]{biblatex}
\makeindex
\begin{document}
\cite{vanTrijp2013}
\end{document}


This produces the following entry in the .dx file:

\indexentry{van Trijp, Remi@\MakeCapital {van} Trijp, Remi}{1}


And this produces the index entry Van Trijp, Remi, although van Trijp, Remi would be prefered. I would like the \MakeCapital to be optional without confusing the sorting of entries in the index.

The issue might be related to \mkbibindexname from biblatex.def, where \MakeCapital is hard-coded.

A possible solution is, using etoolbox, to simply delete the \MakeCapital from the definition:

\patchcmd{\mkbibindexname}{\ifdefvoid{#3}{}{\MakeCapital{#3} }}{\ifdefvoid{#3}{}{#3 }}{}{}


But I don't think changing the code of a package this way is a sustainable solution. Do you know of a better way to do this?

Even though the actual definition of \mkbibindexname looks a bit daunting, the user is supposed to change that macro if they don't like the output it produces. So it would be perfectly fine to patch the macro as you suggest. There is a general question of whether it is better to patch or to redefine a macro (see for example Biblatex's bibmacros, bibliography drivers, formats - patch or redefine?) and for 'small' macros like \mkbibindexname I would usually favour the redefine route instead of patching, but that is up to personal preference.

For this application we might redefine the macro in question as follows

\documentclass{article}
\usepackage[indexing=cite,style=authoryear,useprefix=true]{biblatex}
\usepackage{makeidx}

\makeatletter
\renewcommand*{\mkbibindexname}[4]{%
\ifuseprefix
{\ifdefvoid{#3}{}{#3 }%
\@firstofone #1% remove spurious braces
\ifdefvoid{#4}{}{ #4}%
\ifdefvoid{#2}{}{, #2}}
{\@firstofone #1% remove spurious braces
\ifdefvoid{#4}{}{ #4}%
\ifboolexpe{%
test {\ifdefvoid{#2}}
and
test {\ifdefvoid{#3}}}
{}
{,}%
\ifdefvoid{#2}{}{ #2}%
\ifdefvoid{#3}{}{ #3}}}
\makeatother

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{vanTrijp2013,
author = {van Trijp, Remi},
date   = {2013},
title  = {A Comparison between approach A and B},
}
\end{filecontents}

It should also be possible to optionally apply \MakeCapital to a name if a certain option is set, but then you would have to decide on how you would like to tell biblatex about this.