public BucketSet getBucketList(String selector) throws ParseException {
         try {
             SelectionParser simple = new SelectionParser();
             if (simple.parse(selector) && (simple.getRemaining().length() == 0)) {
                 return simple.getNode().getBucketSet(factory);
             } else {
                SelectParser parser = new SelectParser(new SelectInput(selector));
                return parser.expression().getBucketSet(factory);
             }
        } catch (TokenMgrException e) {
            ParseException t = new ParseException();
            throw (ParseException) t.initCause(e);
        } catch (RuntimeException e) {
            ParseException t = new ParseException(
                    "Unexpected exception while parsing '" + selector + "'.");
            throw (ParseException) t.initCause(e);
        }
    }
Get the set of buckets that may contain documents that match the given
document selection, as long as the document selection does not result in
an unknown set of buckets. If it does, <code>null</code> will be
returned. This requires the caller to be aware of the meaning of these
return values, but also removes the need for redundant space utilization
when dealing with unknown bucket sets.

@param selector The document selection string
@return a list of buckets with arbitrary number of location bits set,
        <i>or</i>, <code>null</code> if the document selection resulted
        in an unknown set
@throws ParseException if <code>selector</code> couldn't be parsed
document/src/main/java/com/yahoo/document/select/BucketSelector.java