public void reduce(IntWritable docId, Iterable<Text> termFrequencies,
				Context context)
				throws IOException {
			/* Dont collect to reduce rather write straight-away to $OUTPUT_FOLDER/Index/TermIndex/ */
			int[] finalTermFrq = new int[2];
		boolean mtTypeIncdence = false;	
		Configuration conf = context.getConfiguration(); 	
		String termCountString = conf.get("TermCount");
		int termCount = /*10000; 
	
  	 	conf.setIfUnset("TermCount", "10000");		
				
		if(termCountString != null)
			termCount =*/ Integer.parseInt(termCountString);
		

		System.out.println("Reducer Conf : Working on TermDocIndexer with "+conf.get("DocCount")+" documents using "+conf.get("TermCount")+" terms");
			float[] docVector = new float[termCount];			

			int termFreq = 0;

		for (Text termInformation : termFrequencies)
			{
				String termInfo[] = termInformation.toString().split("\t");
				System.out.println("Input is : "+termInformation);
				if(termInfo.length>=2)
				{
					int curTermIdx = Integer.parseInt(termInfo[0]);
					float curTermWt = Float.parseFloat(termInfo[1]);
					if(curTermWt == 2)
						mtTypeIncdence = true;
					if(curTermIdx<termCount && curTermIdx>=0)
						docVector[curTermIdx] += curTermWt;
					else {
						System.out.println("ERROR !! - TermIdx "+curTermIdx+" with frequency "+curTermWt+" out of range");
					}
				}
			}
			
		String val = "";
		for(int i=0;i<termCount;i++)
		{
			if(mtTypeIncdence==true)
			{
				if(docVector[i]!=0)
					val+="1\t";
				else val+="0\t";
			}
			else {	
				val+=docVector[i]+"\t";
			}
		}
			try {
				context.write(docId, new Text(val));
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				System.out.println("Failed emitting from reducer");
				e.printStackTrace();
			}
		}