@Override
	public void run() {
		HashMap<String, Posting> pList = new HashMap<String, Posting>();
		for (String docId : input.get(term)) {
			if (!pList.containsKey(docId)) {
				pList.put(docId, new Posting(docId));
			}
			pList.get(docId).increaseTf();
		}

		ArrayList<Posting> result = new ArrayList<Posting>(pList.size());
		ArrayList<String> docIds = new ArrayList<String>(pList.keySet());
		Collections.sort(docIds);
		for (String docId : docIds) {
			int tf = pList.get(docId).getTf();
			if (tf < minThreshold)
				continue;
			if (maxThreshold != -1 && tf > maxThreshold)
				continue;
			result.add(pList.get(docId));
		}
		
		if (!result.isEmpty()) {
			index.put(term, result);
		}
	}