Author: navssurtani
Date: 2009-03-19 14:08:54 -0400 (Thu, 19 Mar 2009)
New Revision: 7929
Modified:
searchable/trunk/pom.xml
searchable/trunk/src/main/java/org/jboss/cache/search/CacheEntityId.java
searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCoreListener.java
searchable/trunk/src/main/java/org/jboss/cache/search/Transformer.java
searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/IndexingInTransaction.java
Log:
@NodeRemoved not being picked up from the test in the IndexingInTransaction.java
Modified: searchable/trunk/pom.xml
===================================================================
--- searchable/trunk/pom.xml 2009-03-19 17:06:05 UTC (rev 7928)
+++ searchable/trunk/pom.xml 2009-03-19 18:08:54 UTC (rev 7929)
@@ -2,140 +2,148 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <properties>
-
<jbosscache-searchable-version>1.1.0-SNAPSHOT</jbosscache-searchable-version>
- <!-- By default only generate Javadocs when we package the module. -->
- <javadocPhase>package</javadocPhase>
- </properties>
+ <modelVersion>4.0.0</modelVersion>
+ <properties>
+
<jbosscache-searchable-version>1.1.0-SNAPSHOT</jbosscache-searchable-version>
+ <!-- By default only generate Javadocs when we package the module. -->
+ <javadocPhase>package</javadocPhase>
+ </properties>
- <parent>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-common-parent</artifactId>
- <version>1.4</version>
- </parent>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-searchable</artifactId>
- <version>${jbosscache-searchable-version}</version>
- <name>JBoss Cache - Searchable Edition</name>
- <description>JBoss Cache - Searchable Edition</description>
- <url>http://www.jbosscache.org</url>
- <packaging>jar</packaging>
- <dependencies>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <version>3.0.3.GA</version>
- </dependency>
+ <parent>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-common-parent</artifactId>
+ <version>1.4</version>
+ </parent>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-searchable</artifactId>
+ <version>${jbosscache-searchable-version}</version>
+ <name>JBoss Cache - Searchable Edition</name>
+ <description>JBoss Cache - Searchable Edition</description>
+ <url>http://www.jbosscache.org</url>
+ <packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <version>3.0.3.GA</version>
+ </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-search</artifactId>
- <version>3.1.0.GA</version>
- </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-search</artifactId>
+ <version>3.1.0.GA</version>
+ </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.1</version>
- </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-pojo</artifactId>
+ <version>3.0.0.GA</version>
+ </dependency>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-pojo</artifactId>
- <version>3.0.0.GA</version>
- </dependency>
+ <!-- Test dependencies -->
- <!-- Test dependencies -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ <scope>test</scope>
+ </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>org.hibernate.apache.lucene.solr</groupId>
+ <artifactId>apache-solr-analyzer</artifactId>
+ <version>1.2.0</version>
+ <scope>test</scope>
+ </dependency>
- <dependency>
- <groupId>org.hibernate.apache.lucene.solr</groupId>
- <artifactId>apache-solr-analyzer</artifactId>
- <version>1.2.0</version>
- <scope>test</scope>
- </dependency>
+ <!-- Optional deps -->
+ <dependency>
+ <groupId>jdbm</groupId>
+ <artifactId>jdbm</artifactId>
+ <version>1.0</version>
+ <optional>true</optional>
+ </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-1</version>
- <executions>
- <execution>
- <id>assemble</id>
- <phase>install</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>assembly/bin.xml</descriptor>
- <descriptor>assembly/all.xml</descriptor>
- </descriptors>
-
<finalName>${artifactId}-${jbosscache-searchable-version}</finalName>
- <outputDirectory>target/distribution</outputDirectory>
- <workDirectory>target/assembly/work</workDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
-
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
-
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- <mainClass>org.jboss.cache.search.Version</mainClass>
- </manifest>
- </archive>
- </configuration>
- <executions>
- <execution>
- <id>build-test-jar</id>
- <goals>
- <goal>test-jar</goal>
- </goals>
- <configuration>
- <archive>
+
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-1</version>
+ <executions>
+ <execution>
+ <id>assemble</id>
+ <phase>install</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>assembly/bin.xml</descriptor>
+ <descriptor>assembly/all.xml</descriptor>
+ </descriptors>
+
<finalName>${artifactId}-${jbosscache-searchable-version}</finalName>
+
<outputDirectory>target/distribution</outputDirectory>
+
<workDirectory>target/assembly/work</workDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
<manifest>
-
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
-
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+
<mainClass>org.jboss.cache.search.Version</mainClass>
</manifest>
- </archive>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build-test-jar</id>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <archive>
+ <manifest>
+
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
- <!-- basic JBoss repository so that the common parent POM in jbosscache-support can
be found -->
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <
url>http://repository.jboss.org/maven2</url>
- </repository>
- <repository>
- <id>snapshots.jboss.org</id>
- <
url>http://snapshots.jboss.org/maven2</url>
- </repository>
- <!-- For Amazon S3 artifacts -->
- <repository>
- <id>e-xml.sourceforge.net</id>
- <
url>http://e-xml.sourceforge.net/maven2/repository</url>
- </repository>
- </repositories>
+ <!-- basic JBoss repository so that the common parent POM in jbosscache-support
can be found -->
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <
url>http://repository.jboss.org/maven2</url>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <
url>http://snapshots.jboss.org/maven2</url>
+ </repository>
+ <!-- For Amazon S3 artifacts -->
+ <repository>
+ <id>e-xml.sourceforge.net</id>
+ <
url>http://e-xml.sourceforge.net/maven2/repository</url>
+ </repository>
+ </repositories>
</project>
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/CacheEntityId.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/CacheEntityId.java 2009-03-19
17:06:05 UTC (rev 7928)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/CacheEntityId.java 2009-03-19
18:08:54 UTC (rev 7929)
@@ -41,13 +41,13 @@
public CacheEntityId(String documentId)
{
super(documentId);
- if (log.isDebugEnabled()) log.debug("Called CEI constructor using documentID
constructor. DocId is " + documentId);
+// if (log.isDebugEnabled()) log.debug("Called CEI constructor using documentID
constructor. DocId is " + documentId);
}
public CacheEntityId(Fqn fqn, String key) throws InvalidKeyException
{
super(fqn);
- if (log.isDebugEnabled()) log.debug("Called CEI constructor using fqn, key
constructor. Fqn & key are " + fqn + key);
+// if (log.isDebugEnabled()) log.debug("Called CEI constructor using fqn, key
constructor. Fqn & key are " + fqn + key);
if(key == null) throw new NullPointerException("Key is null");
this.key = key;
this.documentId = Transformer.generateId(fqn, key);
@@ -89,7 +89,7 @@
public Fqn getFqn()
{
- if (log.isWarnEnabled()) log.warn("getFqn() called with fqn of " + fqn +
" so my documentId should be " + documentId);
+// if (log.isWarnEnabled()) log.warn("getFqn() called with fqn of " + fqn +
" so my documentId should be " + documentId);
return Transformer.getFqn(documentId);
}
Modified:
searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCoreListener.java
===================================================================
---
searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCoreListener.java 2009-03-19
17:06:05 UTC (rev 7928)
+++
searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCoreListener.java 2009-03-19
18:08:54 UTC (rev 7929)
@@ -87,7 +87,7 @@
protected void handleNodeRemoved(NodeRemovedEvent event) throws InvalidKeyException
{
- if (log.isDebugEnabled()) log.debug("Entered the SCL. @NodeRemoved annotation
found");
+ if (log.isWarnEnabled()) log.debug("Entered the SCL. @NodeRemoved annotation
found");
if (!event.isPre())
{
// Directly going to handle the deletion of data.
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/Transformer.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/Transformer.java 2009-03-19
17:06:05 UTC (rev 7928)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/Transformer.java 2009-03-19
18:08:54 UTC (rev 7929)
@@ -84,15 +84,15 @@
// This will be the index of the first time the sub-String "Fqn=[" occurs
within the whole String.
//Adding 1 so that the index being pointed at will be the first character in the
Fqn sequence.
int startIndex = docId.indexOf("[") + 1;
- if(log.isWarnEnabled()) log.warn("startIndex is " + startIndex);
+// if(log.isWarnEnabled()) log.warn("startIndex is " + startIndex);
//The endIndex of the Fqn sequence so that we know when to cut out the sub-String.
int endIndex = docId.indexOf("]");
- if(log.isWarnEnabled()) log.warn("endIndex is " + endIndex);
+// if(log.isWarnEnabled()) log.warn("endIndex is " + endIndex);
String fqnString = docId.substring(startIndex, endIndex);
- if(log.isWarnEnabled()) log.warn("fqnString is" + fqnString);
+// if(log.isWarnEnabled()) log.warn("fqnString is" + fqnString);
Fqn fqn = Fqn.fromString(fqnString);
Modified:
searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/IndexingInTransaction.java
===================================================================
---
searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/IndexingInTransaction.java 2009-03-19
17:06:05 UTC (rev 7928)
+++
searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/IndexingInTransaction.java 2009-03-19
18:08:54 UTC (rev 7929)
@@ -103,8 +103,9 @@
searchableCache.createQuery(
Entity.searchByName("Name15")).list().isEmpty());
- node.removeChild(Fqn.fromString("Name15"));
+ searchableCache.removeNode(Fqn.fromString("Name15"));
+
List l =
searchableCache.createQuery(Entity.searchByName("Name15")).list();
// bug: collection is not empty - there is null as there are inconsistencies in the
indexes