public static void createInvertedIndex(Map<Integer, ArrayList<String> > forwardIndex) {
		
		int cnt = 0;
		for(String word: wordSet) {
			
			System.out.println(++cnt);
//			System.out.println(word);
			for(Map.Entry<Integer, ArrayList<String> > entry: forwardIndex.entrySet()) {
				Integer docId = entry.getKey();
				ArrayList<String> words = entry.getValue();
				
//				System.out.println(words);
				if(words.contains(word)) {
					if(globalInvertedIndex.containsKey(word)) {
						ArrayList<Integer> docs = globalInvertedIndex.get(word);
						docs.add(docId);
					}
					else {
						ArrayList<Integer> docs = new ArrayList<Integer>();
						docs.add(docId);
						globalInvertedIndex.put(word, docs);
					}
				}
			}
			
		}

		System.out.println(globalInvertedIndex);
		totalDoc = forwardIndex.size();
		IndexDAO.addInvertedIndex(globalInvertedIndex, totalDoc);
	}