Index: backends/flint/flint_database.h
===================================================================
--- backends/flint/flint_database.h	(revision 7635)
+++ backends/flint/flint_database.h	(working copy)
@@ -224,8 +224,7 @@
 	mutable map<Xapian::docid, Xapian::termcount> doclens;
 
 	/// Modifications to posting lists.
-	mutable map<string, map<Xapian::docid,
-				pair<char, Xapian::termcount> > > mod_plists;
+	mutable map<string, vector<pair<Xapian::docid, Xapian::termcount> > > mod_plists;
 
 	/** The readonly database encapsulated in the writable database.
 	 */
Index: backends/flint/flint_database.cc
===================================================================
--- backends/flint/flint_database.cc	(revision 7635)
+++ backends/flint/flint_database.cc	(working copy)
@@ -623,14 +623,13 @@
 		}
 
 		// Add did to tname's postlist
-		map<string, map<docid, pair<char, termcount> > >::iterator j;
+		map<string, vector<pair<docid, termcount> > >::iterator j;
 		j = mod_plists.find(tname);
 		if (j == mod_plists.end()) {
-		    map<docid, pair<char, termcount> > m;
+		    vector<pair<docid, termcount> > m;
 		    j = mod_plists.insert(make_pair(tname, m)).first;
 		}
-		Assert(j->second.find(did) == j->second.end());
-		j->second.insert(make_pair(did, make_pair('A', wdf)));
+		j->second.push_back(make_pair(did, wdf));
 
 		if (term.positionlist_begin() != term.positionlist_end()) {
 		    database_ro.positionlist_table.set_positionlist(
@@ -679,6 +678,9 @@
     DEBUGCALL(DB, void, "FlintWritableDatabase::delete_document", did);
     Assert(did != 0);
 
+    did = did;
+    throw Xapian::UnimplementedError("delete_document not supported by this experimental patch");
+#if 0
     try {
 	// Remove the record.
 	database_ro.record_table.delete_record(did);
@@ -742,6 +744,7 @@
 
     if (++changes_made >= flush_threshold && !transaction_active())
 	do_flush_const();
+#endif
 }
 
 void
@@ -751,6 +754,10 @@
     DEBUGCALL(DB, void, "FlintWritableDatabase::replace_document", did << ", " << document);
     Assert(did != 0);
 
+    did = did;
+    (void)document;
+    throw Xapian::UnimplementedError("replace_document not supported by this experimental patch");
+#if 0
     try {
 	if (did > lastdocid) {
 	    lastdocid = did;
@@ -896,6 +903,7 @@
 
     if (++changes_made >= flush_threshold && !transaction_active())
 	do_flush_const();
+#endif
 }
 
 Xapian::doccount
@@ -981,16 +989,19 @@
 					get_doccount()));
     }
 
-    map<string, map<docid, pair<char, termcount> > >::const_iterator j;
+    map<string, vector<pair<docid, termcount> > >::const_iterator j;
     j = mod_plists.find(tname);
     if (j != mod_plists.end()) {
 	// We've got buffered changes to this term's postlist, so we need to
 	// use a FlintModifiedPostList.
+	throw Xapian::UnimplementedError("do_open_post_list of a modified term not supported by this experimental patch");
+#if 0
 	RETURN(new FlintModifiedPostList(ptrtothis,
 				 &database_ro.postlist_table,
 				 &database_ro.positionlist_table,
 				 tname,
 				 j->second));
+#endif
     }
 
     RETURN(new FlintPostList(ptrtothis,
Index: backends/flint/flint_postlist.cc
===================================================================
--- backends/flint/flint_postlist.cc	(revision 7635)
+++ backends/flint/flint_postlist.cc	(working copy)
@@ -1051,11 +1051,11 @@
 
 void
 FlintPostListTable::merge_changes(
-    const map<string, map<Xapian::docid, pair<char, Xapian::termcount> > > & mod_plists,
+    const map<string, vector<pair<Xapian::docid, Xapian::termcount> > > & mod_plists,
     const map<Xapian::docid, Xapian::termcount> & doclens,
     const map<string, pair<Xapian::termcount_diff, Xapian::termcount_diff> > & freq_deltas)
 {
-    map<string, map<Xapian::docid, pair<char, Xapian::termcount> > >::const_iterator i;
+    map<string, vector<pair<Xapian::docid, Xapian::termcount> > >::const_iterator i;
     for (i = mod_plists.begin(); i != mod_plists.end(); ++i) {
 	if (i->second.empty()) continue;
 	string tname = i->first;
@@ -1120,14 +1120,14 @@
 		add(current_key, tag);
 	    }
 	}
-	map<Xapian::docid, pair<char, Xapian::termcount> >::const_iterator j;
+	vector<pair<Xapian::docid, Xapian::termcount> >::const_iterator j;
 	j = i->second.begin();
 	Assert(j != i->second.end()); // This case is caught above.
 
 	Xapian::docid max_did;
 	PostlistChunkReader *from;
 	PostlistChunkWriter *to;
-	max_did = get_chunk(tname, j->first, j->second.first == 'A',
+	max_did = get_chunk(tname, j->first, true,
 			    &from, &to);
 	for ( ; j != i->second.end(); ++j) {
 	    Xapian::docid did = j->first;
@@ -1137,7 +1137,7 @@
 		Xapian::docid copy_did = from->get_docid();
 		if (copy_did >= did) {
 		    if (copy_did == did) {
-			Assert(j->second.first != 'A');
+			Assert(false);
 			from->next();
 		    }
 		    break;
@@ -1154,11 +1154,11 @@
 		goto next_chunk;
 	    }
 
-	    if (j->second.first != 'D') {
+	    if (true) {
 		map<Xapian::docid, Xapian::termcount>::const_iterator k = doclens.find(did);
 		Assert(k != doclens.end());
 		Xapian::termcount new_doclen = k->second;
-		Xapian::termcount new_wdf = j->second.second;
+		Xapian::termcount new_wdf = j->second;
 
 		to->append(this, did, new_wdf, new_doclen);
 	    }
Index: backends/flint/flint_postlist.h
===================================================================
--- backends/flint/flint_postlist.h	(revision 7635)
+++ backends/flint/flint_postlist.h	(working copy)
@@ -63,7 +63,7 @@
 
 	/// Merge added, removed, and changed entries.
 	void merge_changes(
-	    const map<string, map<Xapian::docid, pair<char, Xapian::termcount> > > & mod_plists,
+	    const map<string, vector<pair<Xapian::docid, Xapian::termcount> > > & mod_plists,
 	    const map<Xapian::docid, Xapian::termcount> & doclens,
 	    const map<string, pair<Xapian::termcount_diff, Xapian::termcount_diff> > & freq_deltas);
 
