jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1400103 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
Date Fri, 19 Oct 2012 14:06:57 GMT
Author: alexparvulescu
Date: Fri Oct 19 14:06:56 2012
New Revision: 1400103

URL: http://svn.apache.org/viewvc?rev=1400103&view=rev
Log:
OAK-388 Add NodeType Index

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java?rev=1400103&r1=1400102&r2=1400103&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
Fri Oct 19 14:06:56 2012
@@ -42,7 +42,7 @@ import com.google.common.collect.Sets;
  * {
  *     NodeState state = ... // get a node state
  *     PropertyIndexLookup lookup = new PropertyIndexLookup(state);
- *     Set<String> hits = lookup.find("foo", "xyz");
+ *     Set<String> hits = lookup.find("foo", PropertyValues.newString("xyz"));
  * }
  * </code>
  * </pre>
@@ -84,10 +84,28 @@ public class PropertyIndexLookup {
                 name, path.substring(slash));
     }
 
+    /**
+     * Searches for a given <code>String<code> value within this index.
+     * 
+     * <p><b>Note</b> if the property you are looking for is not of type
<code>String<code>, the converted key value might not match the index key, and
there will be no hits on the index.</p>
+     * 
+     * @param name
+     *            the property name
+     * @param value
+     *            the property value
+     * @return the set of matched paths
+     */
     public Set<String> find(String name, String value) {
         return find(name, PropertyValues.newString(value));
     }
 
+    /**
+     * Searches for a given value within this index.
+     * 
+     * @param name the property name
+     * @param value the property value
+     * @return the set of matched paths
+     */
     public Set<String> find(String name, PropertyValue value) {
         Set<String> paths = Sets.newHashSet();
 



Mime
View raw message