code: public Set<String> getNodesByUri(final String uri) throws RepositoryException
     {
        Set<String> result;
        final int defaultClauseCount = BooleanQuery.getMaxClauseCount();
        try
        {
  
           // final LocationFactory locationFactory = new
           // LocationFactory(this);
           final ValueFactoryImpl valueFactory = new ValueFactoryImpl(new LocationFactory(nsReg), cleanerHolder);
           BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE);
           BooleanQuery query = new BooleanQuery();
  
           final String prefix = nsReg.getNamespacePrefixByURI(uri);
           query.add(new WildcardQuery(new Term(FieldNames.LABEL, prefix + ":*")), Occur.SHOULD);
           // name of the property
           query.add(new WildcardQuery(new Term(FieldNames.PROPERTIES_SET, prefix + ":*")), Occur.SHOULD);
  
           result = getNodes(query);
  
           // value of the property
  
           try
           {
              final Set<String> props = getFieldNames();
  
              query = new BooleanQuery();
              for (final String fieldName : props)
              {
                 if (!FieldNames.PROPERTIES_SET.equals(fieldName))
                 {
                    query.add(new WildcardQuery(new Term(fieldName, "*" + prefix + ":*")), Occur.SHOULD);
                 }
              }
           }
           catch (final IndexException e)
           {
              throw new RepositoryException(e.getLocalizedMessage(), e);
           }
  
           final Set<String> propSet = getNodes(query);
           // Manually check property values;
           for (final String uuid : propSet)
           {
              if (isPrefixMatch(valueFactory, uuid, prefix))
              {
                 result.add(uuid);
              }
           }
        }
        finally
        {
           BooleanQuery.setMaxClauseCount(defaultClauseCount);
        }
  
        return result;
     }
docs: Return set of uuid of nodes. Contains in names prefixes maped to the
  given uri
  
  @param uri
  @return
  @throws RepositoryException