% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
% arara: pdflatex
\documentclass{article}

\usepackage[colorlinks]{hyperref}
\usepackage{glossaries-extra}

\makeglossaries

% Don't use with indexonlyfirst setting!

\GlsXtrSetDefaultGlsOpts{noindex}
\GlsXtrSetAltModifier{>}{noindex=false}

\newglossaryentry{sample}{name={sample},description={an example}}

\begin{document}
This is a sample document.
The \gls{sample} entry is used on this page but isn't indexed.

\newpage
The \gls>{sample} entry is used on this page and is indexed.

\newpage
The \gls{sample} entry is used on this page but isn't indexed.

\newpage
\printglossaries

\end{document}
