/* * public List<NodeInfo> queryIndex( String indexId, String queryString ) * throws ParseException, IOException { return queryIndex(indexId, * this.queryConstructor.construct(getEnvironment(indexId), queryString)); } * * * public List<NodeInfo> queryIndex( String indexId, Query query ) throws * IOException { return new Querier(getEnvironment(indexId)).query(query); } */ public String highlightQuery(Integer queryId, String fieldName, String text) { // return text; if (null == this.queryHighlighter) { // sort of lazy init if we forgot to specify more advanced // highlighter this.setQueryHighlighter(new QueryHighlighter()); } QueryInfo queryInfo = this.queryPool.getQueryInfo(queryId); try { return queryHighlighter .setEnvironment(getEnvironment(queryInfo.getIndexId())) .highlightQuery(queryInfo, fieldName, text); } catch (RuntimeException e) { e.printStackTrace(); logger.debug("DEBUG1!!->" + queryId); logger.error("ERROR!!->"); logger.error("ERROR12!!->" + queryInfo); logger.error("ERROR2!!->" + queryInfo.getIndexId()); logger.error("ERROR3!!->" + getEnvironment(queryInfo.getIndexId())); } return null; }
public String queryPaged(Integer queryId, QueryInfo query, HttpServletRequestParameterMap map) throws IOException { return new Querier(getEnvironment(query.getIndexId())).queryPaged(queryId, query, map); }
public ScoreDoc[] queryAllDocs( Integer queryId, QueryInfo query, HttpServletRequestParameterMap map) throws IOException { return new Querier(getEnvironment(query.getIndexId())).queryAllDocs(queryId, query, map); }