A computer-implemented method of generating a reference index data structure enabling to find associated positions of M elements of a data pattern in a reference data structure, the reference data structure comprises N reference elements and P padding elements following the last reference element, each element having a position in the reference data structure and comprises an associated element value, and wherein N >> M, the method comprising: - retrieving the reference data structure; - generating from the reference data structure for each of the N references elements in the reference data structure an index structure which comprises for each of the N reference elements an index entry which defines a data linkage between a position of an element in the reference data structure and a reference data pattern, the reference data pattern comprises K elements which are obtained by combining the element value at said position in the reference database and the element values of K-1 neighbouring positions of the element in the reference data structure, K being an integer smaller than or equal to P+1; - sorting the index structure on the basis of the reference data patterns associated with each of the data linkages to obtain a sorted index, the sorted index comprises a data entry for each of the N reference elements of the reference data structure, a data entry comprises at least position information indicative for the position of a reference element in the reference data structure; and, - storing the sorted index and the reference data structure in a data storage as reference index data structure, characterized in that, the method further comprises: - generating a jump table with 2 J entries, J is an integer and corresponds to the number of bits representing an initial part of a reference data pattern, each entry of the jump table having a row number, a present field and a jump field, the present field is used to indicate whether the sorted index comprises a data entry associated with a reference data pattern which initial part is equal to the bits representing the row number, if the present field indicates that the sorted index comprises a data entry associated with a reference data pattern which initial part is equal to the bits representing the row number a jump value is stored in the jump field which jump value refers to the first entry in the sorted index which corresponding reference data pattern has an initial part which matches the bits representing the row number of said entry of the jump table, and - adding the jump table to the reference index data structure. - retrieving the reference data structure; - generating from the reference data structure for each of the N references elements in the reference data structure an index structure which comprises for each of the N reference elements an index entry which defines a data linkage between a position of an element in the reference data structure and a reference data pattern, the reference data pattern comprises K elements which are obtained by combining the element value at said position in the reference database and the element values of K-1 neighbouring positions of the element in the reference data structure, K being an integer smaller than or equal to P+1; - sorting the index structure on the basis of the reference data patterns associated with each of the data linkages to obtain a sorted index, the sorted index comprises a data entry for each of the N reference elements of the reference data structure, a data entry comprises at least position information indicative for the position of a reference element in the reference data structure; and, - storing the sorted index and the reference data structure in a data storage as reference index data structure, - generating a jump table with 2 J entries, J is an integer and corresponds to the number of bits representing an initial part of a reference data pattern, each entry of the jump table having a row number, a present field and a jump field, the present field is used to indicate whether the sorted index comprises a data entry associated with a reference data pattern which initial part is equal to the bits representing the row number, if the present field indicates that the sorted index comprises a data entry associated with a reference data pattern which initial part is equal to the bits representing the row number a jump value is stored in the jump field which jump value refers to the first entry in the sorted index which corresponding reference data pattern has an initial part which matches the bits representing the row number of said entry of the jump table, and - adding the jump table to the reference index data structure.