code: public static String toIndexedQuery(final PartTree tree) {
  		final StringBuilder result = new StringBuilder();
  		
  		final Iterator<OrPart> orIt = tree.iterator();
  		while(orIt.hasNext()) {
  			
  			final OrPart orPart = orIt.next();
  			
  			final Iterator<Part> partIt = orPart.iterator();
  			while(partIt.hasNext()) {
  				final Part part = partIt.next();
  				
  				result.append(" " + part.getProperty().getSegment() + " ");
  				result.append(convertOperator(part.getType()));
  				
  				if(partIt.hasNext()) {
  					result.append(" AND ");
  				}
  			}
  			
  			if(orIt.hasNext()) {
  				result.append(" OR ");
  			}
  		}
  		
  		return StringUtil.removeExtraSpaces(result.toString());
  	}
docs: Convert a {@link PartTree} into a where query alike to the one present in the
  {@link Query}'s where property.