private void doRebuildTextIndex(HttpServletRequest req, HttpServletResponse resp, String namespace) throws IOException { boolean forceIndexCreate = Boolean.TRUE.toString().equals(req.getParameter(FORCE_INDEX_CREATE_PARAMETER)); PrintWriter writer = resp.getWriter(); try { AbstractTripleStore store = getBigdataRDFContext().getTripleStore(namespace, Tx.UNISOLATED); store.getLexiconRelation().rebuildTextIndex(forceIndexCreate); writer.append("Text index rebuild completed"); } catch (UnsupportedOperationException e) { writer.append(e.getMessage()); resp.sendError(HTTP_INTERNALERROR, e.getMessage()); } }
private void doRebuildTextIndex(HttpServletRequest req, HttpServletResponse resp, String namespace) throws IOException { boolean forceIndexCreate = Boolean.TRUE.toString().equals(req.getParameter(FORCE_INDEX_CREATE_PARAMETER)); PrintWriter writer = resp.getWriter(); try { AbstractTripleStore store = getBigdataRDFContext().getTripleStore(namespace, Tx.UNISOLATED); store.getLexiconRelation().rebuildTextIndex(forceIndexCreate); writer.append("Text index rebuild completed"); } catch (UnsupportedOperationException e) { writer.append(e.getMessage()); resp.sendError(HTTP_INTERNALERROR, e.getMessage()); } }
kb.getLexiconRelation().rebuildTextIndex(false /*forceCreate*/); kb.getLexiconRelation().rebuildTextIndex(forceCreate);
kb.getLexiconRelation().rebuildTextIndex(false /*forceCreate*/); kb.getLexiconRelation().rebuildTextIndex(forceCreate);
store.getLexiconRelation().rebuildTextIndex(/* forceCreate */ false);
store.getLexiconRelation().rebuildTextIndex(/* forceCreate */ false);
store.getLexiconRelation().rebuildTextIndex(/* forceCreate */ false);