Index: Term.java
===================================================================
--- Term.java	(revision 719114)
+++ Term.java	(working copy)
@@ -17,6 +17,11 @@
  * limitations under the License.
  */
 
+import java.io.ObjectOutput;
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+
 /**
   A Term represents a word from text.  This is the unit of search.  It is
   composed of two elements, the text of the word, as a string, and the name of
@@ -25,7 +30,8 @@
   Note that terms may represent more than words from text fields, but also
   things like dates, email addresses, urls, etc.  */
 
-public final class Term implements Comparable, java.io.Serializable {
+public final class Term implements Comparable, Externalizable {
+  private static final long serialVersionUID = 10L;
   String field;
   String text;
 
@@ -112,11 +118,16 @@
   }
 
   public final String toString() { return field + ":" + text; }
-
-  private void readObject(java.io.ObjectInputStream in)
-    throws java.io.IOException, ClassNotFoundException
-  {
-      in.defaultReadObject();
-      field = field.intern();
+  
+  public void writeExternal(ObjectOutput out) throws IOException {
+	out.writeLong(serialVersionUID);
+	out.writeUTF(field);
+	out.writeUTF(text);
   }
+  
+  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+	long serialVersionUID = in.readLong(); // can be used in the future
+	field = in.readUTF().intern();
+	text = in.readUTF();
+  }
 }
