lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Which is more efficient
Date Tue, 05 May 2009 11:42:11 GMT
Just wondered which was more efficient under the hood

  for (int i = 0; i < size; i++)
      terms[i] = new Term("id", doc_key[i]);

This

  writer.deleteDocuments(terms);
  for (int i = 0; i < size; i++)
      writer.addDocument(doc[i]);

Or this

  for (int i = 0; i < size; i++)
      writer.updateDocument(terms[i], doc[i]);


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message