private void processDocument(String content, Document doc, int docId) {

		if (content == null || doc == null || docId < 0) {
			System.out.println("null");
			return;
		}
		
		Vector<String> terms = Utilities.getStemmed(content);
		for (String t : terms) {
			t = t.trim();
			if (t.length() > 0) {
				if (!_invertedIndex.containsKey(t)) {
					_invertedIndex.put(t, new HashMap<Integer, Integer>());
				}

				if (_invertedIndex.get(t).containsKey(docId)) {
					_invertedIndex.get(t).put(docId,
							_invertedIndex.get(t).get(docId) + 1);
				} else {
					_invertedIndex.get(t).put(docId, 1);
				}
			}
		}
		
		String uri = doc.baseUri();
		uri = uri==null ? "" : uri;
		uri = new File(uri).getName();
		
		String title = doc.title().trim();
		title = title.length()==0 ? uri : title;
		
		int wordsInDoc = terms.size();
		
		docInfo.append(docId);
		docInfo.append(_docInfoDelim);		
		docInfo.append(uri);
		docInfo.append(_docInfoDelim);
		docInfo.append(title);
		docInfo.append(_docInfoDelim);
		docInfo.append(wordsInDoc); // total words in the document
		docInfo.append("\n");
	}