private void AddDoc(System.String text, IndexWriter iw, float boost) { Document doc = new Document(); Field f = new Field("key", text, Field.Store.YES, Field.Index.ANALYZED); f.Boost = boost; doc.Add(f); iw.AddDocument(doc); } }