String host = null;
try {
URL u = new URL(url.toString());
host = u.getHost();
} catch (MalformedURLException e) {
throw new IndexingException(e);
}
if (host != null) {
// add host as un-stored, indexed and tokenized
doc.add(new Field("host", host, Field.Store.NO, Field.Index.TOKENIZED));