private int[] getRange(QueryConfig config) {
		
		int[] ranges = new int[2];
		//Implementation
		int vec_index = index_map.get(config.getQuerystring());
 
		int i = vec_index;
		int dim = config.dim;
		
		//get low bound index in vector
		while(i > 0 && DataProcessor.getSiftDim(keylist.elementAt(i)) == dim 
				&& DataProcessor.getSiftValue(keylist.elementAt(i)) > config.getLowRange())
			i--;
		ranges[0] = i;
		
		//get up bound index in vector
		i = vec_index;
		while(DataProcessor.getSiftDim(keylist.elementAt(i)) == dim 
				&& DataProcessor.getSiftValue(keylist.elementAt(i)) < config.getUpRange()
				&& i < keylist.size())
			i++;
		ranges[1] = i;
		return ranges;
	}