Permalink
Browse files

remove extra update

  • Loading branch information...
1 parent 0fa4d4e commit 04d21e12da2c3636fd7ec752bf29c2344a506cde @tjake tjake committed Feb 15, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/solandra/SolandraIndexWriter.java
  2. +1 −1 test/lucandra/wikipedia/WikipediaIndexWorker.java
@@ -232,7 +232,7 @@ public int addDoc(AddUpdateCommand cmd) throws IOException
isBatch = true;
- // Is this an update?
+ // Is this an update? (only non batch mode)
if (docId == null && !isBatch)
{
docId = IndexManagerService.instance.getId(coreInfo.indexName, key);
@@ -241,7 +241,7 @@ public int addDoc(AddUpdateCommand cmd) throws IOException
isUpdate = true;
}
- if (docId != null)
+ if (docId != null && !isBatch)
{
isUpdate = true;
if(logger.isDebugEnabled())
@@ -41,7 +41,6 @@
private static AtomicInteger connectionCounter = new AtomicInteger(0);
private static CommonsHttpSolrServer oneClient;
public static final ArrayList<String> hosts = new ArrayList<String>();
- private static final Random r = new Random();
static int port = 8983;
@@ -106,6 +105,7 @@ private CommonsHttpSolrServer getIndexWriter() throws MalformedURLException {
indexWriter.setAllowCompression(true);
clientPool.set(indexWriter);
+ oneClient = indexWriter;
}
return indexWriter;

0 comments on commit 04d21e1

Please sign in to comment.