I need to make a change in the index (not contents) of my book: I need to change the en-dash ("long" dash) for the hyphen ("short" dash) when an entry of the index covers a group of pages (I mean, from page A to page B). What I have is this

and I need to replace that dashes (long dashes) for hyphens (short dashes).
How can I do it?
Thanks for your help.
EDIT: this is my preamble
\documentclass[reqno,twoside]{book}
\usepackage{imakeidx}
\usepackage[spanish,es-nosectiondot,es-lcroman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fontspec}
\usepackage{infwarerr}
\usepackage{xcolor}
\usepackage{geometry}
\usepackage{amssymb,amsmath,amsthm}
\usepackage{epsfig,graphicx,psfrag,float}
\usepackage[format=hang,labelsep=quad]{caption}%Configura el caption de las figuras
\usepackage{geometry}
\usepackage{ltxcmds}
\usepackage[all]{xy}
\usepackage{fancyhdr}
\usepackage[explicit,compact]{titlesec}
\usepackage{titlesec}
\usepackage{sectsty}
\usepackage{enumerate}
\usepackage{enumitem}%Paquete para crear listas (enumerate, itemize) personalizadas
\usepackage{hyperref}
\usepackage{multicol}
\usepackage[many]{tcolorbox}
\usepackage{lettrine}
\usepackage{caption}
\usepackage{pdfpages}
\usepackage{setspace}
\usepackage[titletoc,toc,page]{appendix}
\usepackage{titletoc}
\usepackage[titles]{tocloft}%"titles" permite cambiar tocloft con los comandos latex estándar para los títulos
\usepackage{natbib}%Paquete para citaciones
\usepackage{emptypage}
\usepackage{tasks}%Paquete para hacer listas enumeradas horizontalmente
%\usepackage{etoolbox}
\makeindex%[name=Índice analítico,columns=2]
%\makeindex[columns=2]
.
.
.
\begin{document}
.
.
.
\include{Index}
\printindex
.
.
.
\end{document}
As you can see, I tried to use the imakeidx package but I didn't do it.

emdash, not the endash. – Bernard Sep 10 '17 at 22:30\include{Index}and\printindexwould duplicate the index, assuming that the file namedIndex.texis present. but it wouldn't be created byimakeidx. whatimakeidxdoes create is an.idxfile, which is then sent through themakeindexprogram to create an.indfile, which is read in directly with the\printindexcommand. the--is inserted into the page spans by the makeindex program. i believe this can be modified by an.istfile, but you haven't provided any real data that can be used to experiment. – barbara beeton Sep 11 '17 at 01:20