jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r537151 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene: LuceneQueryBuilder.java SimilarityQuery.java
Date Fri, 11 May 2007 09:53:29 GMT
Author: mreutegg
Date: Fri May 11 02:53:28 2007
New Revision: 537151

URL: http://svn.apache.org/viewvc?view=rev&rev=537151
Log:
JCR-906: Introduce similarity function
- SimilarityQuery throws exception if path does not reference an existing node

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimilarityQuery.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java?view=diff&rev=537151&r1=537150&r2=537151
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
Fri May 11 02:53:28 2007
@@ -675,7 +675,7 @@
         if (node.getOperation() == QueryConstants.OPERATION_SIMILAR) {
             try {
                 ItemId id = hmgr.resolvePath(session.getQPath(node.getStringValue()));
-                String uuid = "";
+                String uuid = "x";
                 if (id != null && id.denotesNode()) {
                     uuid = ((NodeId) id).getUUID().toString();
                 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimilarityQuery.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimilarityQuery.java?view=diff&rev=537151&r1=537150&r2=537151
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimilarityQuery.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimilarityQuery.java
Fri May 11 02:53:28 2007
@@ -67,7 +67,7 @@
             return similarityQuery.rewrite(reader);
         } else {
             // return dummy query that never matches
-            return new TermQuery(new Term(FieldNames.UUID, ""));
+            return new TermQuery(new Term(FieldNames.UUID, "x"));
         }
     }
 



Mime
View raw message