Package org.apache.stanbol.contenthub.servicesapi.search

Examples of org.apache.stanbol.contenthub.servicesapi.search.SearchException


            sq.setStart(offset);
            sq.setRows(limit + 1);
            this.searchResults = featuredSearch.search(sq, ontologyURI, indexName);
        } else {
            log.error("Should never reach here!!!!");
            throw new SearchException("Either 'queryTerm' or 'solrQuery' paramater should be set");
        }

        ResponseBuilder rb = null;
        if (acceptedMediaType.isCompatible(MediaType.TEXT_HTML_TYPE)) {
            // return HTML document
View Full Code Here


            Model model = ModelFactory.createModelForGraph(jenaGraph);
            userGraph = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RDFS_INF);
            userGraph.add(model);
            IndexingHelper.addIndexPropertyToOntResources(userGraph);
        } else {
            throw new SearchException(String.format("MGraph having URI %s could obtained through TcManager",
                userOntologyURI));
        }
        this.userOntology = userGraph;
        this.userGraphIndexBuilder = new IndexBuilderString(IndexingHelper.HAS_LOCAL_NAME);
        this.userGraphIndexBuilder.indexStatements(userGraph.listStatements());
View Full Code Here

                facetResults.add(new FacetResultImpl(new FacetField(fn), type.trim()));
            }
        } catch (SolrServerException e) {
            String msg = "SolrSearchImpl.getFacetNames: Failed to execute solr query";
            log.error(msg, e);
            throw new SearchException(msg, e);
        } catch (IOException e) {
            throw new SearchException(e.getMessage(), e);
        }

        return facetResults;
    }
View Full Code Here

        } catch (StoreException e) {
            String msg = String
                    .format("SolrSearchImpl.getFacetNames: Failed to obtain solr server for ldprogram: %s",
                        ldProgramName);
            log.error(msg, e);
            throw new SearchException(msg, e);
        }
    }
View Full Code Here

        SolrServer solrServer = null;
        try {
            solrServer = SolrCoreManager.getInstance(bundleContext, managedSolrServer).getServer();
            solrQuery = SolrQueryUtil.prepareSolrQuery(solrServer, queryTerm);
        } catch (StoreException e) {
            throw new SearchException(e.getMessage(), e);
        } catch (SolrServerException e) {
            throw new SearchException(e.getMessage(), e);
        } catch (IOException e) {
            throw new SearchException(e.getMessage(), e);
        }
        return executeSolrQuery(solrServer, solrQuery);
    }
View Full Code Here

        SolrServer solrServer = null;
        try {
            solrServer = SolrCoreManager.getInstance(bundleContext, managedSolrServer).getServer(ldProgramName);
            solrQuery = SolrQueryUtil.prepareSolrQuery(solrServer, queryTerm);
        } catch (StoreException e) {
            throw new SearchException(e.getMessage(), e);
        } catch (SolrServerException e) {
            throw new SearchException(e.getMessage(), e);
        } catch (IOException e) {
            throw new SearchException(e.getMessage(), e);
        }
        return executeSolrQuery(solrServer, solrQuery);
    }
View Full Code Here

    public QueryResponse search(SolrParams solrQuery) throws SearchException {
        SolrServer solrServer = null;
        try {
            solrServer = SolrCoreManager.getInstance(bundleContext, managedSolrServer).getServer();
        } catch (StoreException e) {
            throw new SearchException(e);
        }
        return executeSolrQuery(solrServer, solrQuery);
    }
View Full Code Here

        SolrServer solrServer = null;
        try {
            solrServer = SolrCoreManager.getInstance(bundleContext, managedSolrServer).getServer(
                ldProgramName);
        } catch (StoreException e) {
            throw new SearchException(e);
        }
        return executeSolrQuery(solrServer, solrQuery);
    }
View Full Code Here

        try {
            return solrServer.query(solrQuery);
        } catch (SolrServerException e) {
            String msg = "Failed to execute solr query";
            log.error(msg, e);
            throw new SearchException(msg, e);
        }
    }
View Full Code Here

            sq.setStart(offset);
            sq.setRows(limit + 1);
            this.searchResults = featuredSearch.search(sq, ontologyURI, indexName);
        } else {
            log.error("Should never reach here!!!!");
            throw new SearchException("Either 'queryTerm' or 'solrQuery' paramater should be set");
        }

        ResponseBuilder rb = null;
        if (acceptedMediaType.isCompatible(MediaType.TEXT_HTML_TYPE)) {
            // return HTML document
View Full Code Here

TOP

Related Classes of org.apache.stanbol.contenthub.servicesapi.search.SearchException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.