From 95add343dd0ca1e5aac1192862927d942f2d8497 Mon Sep 17 00:00:00 2001
From: Geoff Williams <G.Williams2@bom.gov.au>
Date: Mon, 26 Nov 2012 15:49:31 +1100
Subject: [PATCH] Do not use createIndex flag to control if shapefile index is
 used or not

---
 .../java/org/geotools/data/shapefile/ShapefileDataStoreFactory.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/plugin/shapefile/src/main/java/org/geotools/data/shapefile/ShapefileDataStoreFactory.java b/modules/plugin/shapefile/src/main/java/org/geotools/data/shapefile/ShapefileDataStoreFactory.java
index 789fd78..9b767e2 100644
--- a/modules/plugin/shapefile/src/main/java/org/geotools/data/shapefile/ShapefileDataStoreFactory.java
+++ b/modules/plugin/shapefile/src/main/java/org/geotools/data/shapefile/ShapefileDataStoreFactory.java
@@ -279,12 +279,13 @@ public class ShapefileDataStoreFactory extends AbstractDataStoreFactory implemen
             boolean useMemoryMappedBuffer = isLocal
                     && isMemoryMapped.booleanValue();
             boolean createIndex = isCreateSpatialIndex.booleanValue() && isLocal;
+            boolean enableIndex = true && isLocal;
     
             try {
             	ShapefileDataStore store;
-                if (createIndex) {
+                if (enableIndex) {
                     store = new IndexedShapefileDataStore(url, namespace,
-                            useMemoryMappedBuffer, cacheMemoryMaps, true, IndexType.QIX, dbfCharset);
+                            useMemoryMappedBuffer, cacheMemoryMaps, createIndex, IndexType.QIX, dbfCharset);
                 } else {
                     store = new ShapefileDataStore(url, namespace,
                             useMemoryMappedBuffer, cacheMemoryMaps, dbfCharset);
-- 
1.7.11.3

