Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed field cache, plus cleanup

  • Loading branch information...
commit 8d1ee798ce7fe3b924b74a1981e2369c451e19ac 1 parent 18a8f1b
@tjake authored
View
5 src/lucandra/IndexReader.java
@@ -28,6 +28,7 @@
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
+import java.util.UUID;
import org.apache.cassandra.db.IColumn;
import org.apache.cassandra.db.ReadCommand;
@@ -130,7 +131,7 @@ public synchronized void clearCache() {
docsHit.get().clear(0, numDocs);
if (fieldCacheRefs.get() != null)
- fieldCacheRefs.set(new Integer(1));
+ fieldCacheRefs.set(UUID.randomUUID());
}
@@ -324,7 +325,7 @@ public Object getFieldCacheKey() {
Object ref = fieldCacheRefs.get();
if(ref == null){
- ref = new Integer(1);
+ ref = UUID.randomUUID();
fieldCacheRefs.set(ref);
}
View
13 src/org/apache/solr/core/SolandraCoreContainer.java
@@ -153,19 +153,6 @@ public synchronized SolrCore readSchema(String indexName) throws IOException, Pa
IndexSchema schema = new IndexSchema(solrConfig, indexName, stream);
core = new SolrCore(indexName, "/tmp",solrConfig,schema, null);
-
-// //Something in solr 1.4.1 requires this inform
-// for(Map.Entry<String, SolrRequestHandler> e : core.getRequestHandlers().entrySet())
-// {
-// if(e.getValue() instanceof SolrCoreAware)
-// {
-// ((SolrCoreAware) e.getValue()).inform(core);
-// }
-//
-// if(e.getValue() instanceof ResourceLoaderAware ) {
-// ((ResourceLoaderAware) e.getValue()).inform(core.getResourceLoader());
-// }
-// }
logger.debug("Loaded core from cassandra: "+indexName);
View
7 wikipedia-demo/wikassandra_schema.xml
@@ -23,9 +23,10 @@
</fieldType>
</types>
<fields>
- <field name="url" type="string" indexed="true" stored="true"/>
- <field name="title" type="text" indexed="true" stored="true"/>
- <field name="text" type="text" indexed="true" stored="true"/>
+ <field name="url" type="string" indexed="true" stored="true"/>
+ <field name="title" type="text" indexed="true" stored="true"/>
+ <field name="text" type="text" indexed="true" stored="true"/>
+ <field name="category" type="string" indexed="true" stored="true"/>
</fields>
<defaultSearchField>title</defaultSearchField>
Please sign in to comment.
Something went wrong with that request. Please try again.