public SenseiDocIdSet getSenseiDocIdSet(IndexReader reader) throws IOException {
if (reader instanceof BoboIndexReader) {
BoboIndexReader boboReader = (BoboIndexReader)reader;
FacetHandler uidHandler = boboReader.getFacetHandler(SenseiFacetHandlerBuilder.UID_FACET_NAME);
if (uidHandler!=null && uidHandler instanceof UIDFacetHandler){
UIDFacetHandler uidFacet = (UIDFacetHandler)uidHandler;
try{
String[] vals = RequestConverter2.getStrings(json.optJSONArray(VALUES_PARAM));
String[] nots = RequestConverter2.getStrings(json.optJSONArray(EXCLUDES_PARAM));
BrowseSelection uidSel = new BrowseSelection(SenseiFacetHandlerBuilder.UID_FACET_NAME);
if (vals != null)
uidSel.setValues(vals);
if (nots != null)
uidSel.setNotValues(nots);
RandomAccessFilter raf = uidFacet.buildFilter(uidSel);
return SenseiDocIdSet.build(raf, boboReader, "<uid> IN <" + StringUtils.join(vals, ", ") + "> NOT IN <" + StringUtils.join(nots, ", ") + ">");
}
catch(Exception e){
throw new IOException(e);
}