mDocument.add(Field.Text(LuceneFields.L_H_SUBJECT, filename)); mDocument.add(Field.Text(LuceneFields.L_CONTENT, filename));
mDocument.add(new Field(LuceneFields.L_H_SUBJECT, filename, false, true, true)); mDocument.add(new Field(LuceneFields.L_CONTENT, filename,  false, true, true));
    private void init(DocumentDataSource ds, String filename, String ctype, long createdDate)    throws ServiceException, IOException {        mFilename = filename;        mContentType = ctype;        mCreatedDate = createdDate;        try {            MimeHandler handler = MimeHandler.getMimeHandler(ctype);            assert(handler != null);            if (handler.isIndexingEnabled())                handler.init(ds);            handler.setFilename(filename);            handler.setPartName(LuceneFields.L_PARTNAME_TOP);            mFragment = Fragment.getFragment(handler.getContent(), false);            handler.setMessageDigest(mDigest = ds.getDigest());            mDocument = handler.getDocument();            mDocument.add(Field.Text(LuceneFields.L_SIZE, Integer.toString(mSize = ds.getSize())));            mDocument.add(Field.Text(LuceneFields.L_H_SUBJECT, filename));            mDocument.add(Field.Text(LuceneFields.L_CONTENT, filename));            mDocument.add(Field.Text(LuceneFields.L_FILENAME, filename));        } catch (MimeHandlerException mhe) {        	throw ServiceException.FAILURE("cannot create ParsedDocument", mhe);        } catch (ObjectHandlerException ohe) {        	throw ServiceException.FAILURE("cannot create ParsedDocument", ohe);        }    }