doc.add(Field.UnIndexed("type",     ti.toString() ));
doc.add(Field.UnIndexed("type",     ty.toString() ));
    private static void writeIndexRecord(IndexWriter iw, int type, int id, String handle,                                            HashMap textvalues )        throws IOException    {        Document doc     = new Document();        Integer  ti      = new Integer(id);        Integer  ty      = new Integer(type);        String   fulltext= "";        // do id, type, handle first        doc.add(Field.UnIndexed("id",       ti.toString() ));        doc.add(Field.UnIndexed("type",     ti.toString() ));        doc.add(Field.UnIndexed("handle",   handle        ));        // now iterate through the hash, building full text string        // and index all values        Iterator i = textvalues.keySet().iterator();        while(i.hasNext())        {            String key   = (String)i.next();            String value = (String)textvalues.get(key);            fulltext = fulltext + " " + value;            doc.add(Field.Text(key, value));        }        // add the full text        doc.add( Field.Text("default", fulltext) );        // index the document        iw.addDocument(doc);    }