Since the values will come from lucene, the values may change. This means the index may change and shouldn't be stored. So you should calculate the index by iterating through the values and looking for a match. So no need to store indexes. You get the current value by parsing the HTML and the possible values from lucene (or dummy data for now).