Examples of query()


Examples of org.elasticsearch.search.internal.DefaultSearchContext.query()

        try {
            context.parsedQuery(indexService.queryParserService().parseQuery(request.source()));
            context.preProcess();
            int topLevelDocId = result.docIdAndVersion().docId + result.docIdAndVersion().context.docBase;
            Explanation explanation = context.searcher().explain(context.query(), topLevelDocId);
            for (RescoreSearchContext ctx : context.rescore()) {
                Rescorer rescorer = ctx.rescorer();
                explanation = rescorer.explain(topLevelDocId, context, ctx, explanation);
            }
            if (request.fields() != null || (request.fetchSourceContext() != null && request.fetchSourceContext().fetchSource())) {
View Full Code Here

Examples of org.elasticsearch.search.internal.ScopePhase.query()

                            if (numDocs > topDocs.totalHits) {
                                numDocs = topDocs.totalHits;
                            }
                        }
                    } catch (Exception e) {
                        throw new QueryPhaseExecutionException(searchContext, "Failed to execute child query [" + scopePhase.query() + "]", e);
                    }
                } else if (scopePhase instanceof ScopePhase.CollectorPhase) {
                    try {
                        ScopePhase.CollectorPhase collectorPhase = (ScopePhase.CollectorPhase) scopePhase;
                        // collector phase might not require extra processing, for example, when scrolling
View Full Code Here

Examples of org.elasticsearch.search.internal.SearchContext.query()

        try {
            context.parsedQuery(indexService.queryParserService().parseQuery(request.source()));
            context.preProcess();
            int topLevelDocId = result.docIdAndVersion().docId + result.docIdAndVersion().context.docBase;
            Explanation explanation = context.searcher().explain(context.query(), topLevelDocId);
            for (RescoreSearchContext ctx : context.rescore()) {
                Rescorer rescorer = ctx.rescorer();
                explanation = rescorer.explain(topLevelDocId, context, ctx, explanation);
            }
            if (request.fields() != null || (request.fetchSourceContext() != null && request.fetchSourceContext().fetchSource())) {
View Full Code Here

Examples of org.eobjects.metamodel.DataContext.query()

    final Table table = tables[0];

    final DataContextProvider dataContextProvider = _analysisJobBuilder.getDataContextProvider();
    final DataContext dc = dataContextProvider.getDataContext();
    final Query q = dc.query().from(table).select(physicalColumns.toArray(new Column[physicalColumns.size()])).toQuery();
    q.setMaxRows(DEFAULT_PREVIEW_ROWS);

    for (TransformerJobBuilder<?> tjb : transformerJobs) {
      initialize(tjb);
    }
View Full Code Here

Examples of org.evolizer.core.hibernate.session.api.IEvolizerSession.query()

  public void testTransactionReconstruction1(){
    try {
      IEvolizerSession s = fSessionHandler.getCurrentSession(fDBUrl);
      TransactionReconstructor.calculateCouplings(s, 0, 0, null);
     
      List<Transaction> transactions = s.query("from Transaction as ta order by ta.started", Transaction.class);
     
      assertEquals(5, transactions.size());
     
      Transaction ta1 = transactions.get(0);
      Set<Revision> revisions = ta1.getInvolvedRevisions();
View Full Code Here

Examples of org.exist.indexing.lucene.LuceneIndexWorker.query()

        List<QName> qnames = new ArrayList<>(1);
        qnames.add(contextQName);
        Properties options = parseOptions(contextSequence, null);
        try {
            if (Type.subTypeOf(key.getType(), Type.ELEMENT))
                preselectResult = index.query(context, getExpressionId(), docs, useContext ? contextSequence.toNodeSet() : null,
                    qnames, (Element) ((NodeValue)key).getNode(), NodeSet.DESCENDANT, options);
            else
                preselectResult = index.query(context, getExpressionId(), docs, useContext ? contextSequence.toNodeSet() : null,
                    qnames, key.getStringValue(), NodeSet.DESCENDANT, options);
        } catch (IOException | org.apache.lucene.queryparser.classic.ParseException e) {
View Full Code Here

Examples of org.exist.indexing.range.RangeIndexWorker.query()

        }

        final RangeIndex.Operator operator = getOperator();

        try {
            preselectResult = index.query(getExpressionId(), docs, contextSequence.toNodeSet(), qnames, keys, operator, NodeSet.DESCENDANT);
        } catch (XPathException | IOException e) {
            throw new XPathException(this, "Error while querying full text index: " + e.getMessage(), e);
        }
        //LOG.info("preselect for " + Arrays.toString(keys) + " on " + contextSequence.getItemCount() + "returned " + preselectResult.getItemCount() +
        //        " and took " + (System.currentTimeMillis() - start));
View Full Code Here

Examples of org.exist.storage.dom.DOMFile.query()

           
            DOMFile domDb = ((NativeBroker) broker).getDOMFile();
            domDb.setOwnerObject(this);
           
            IndexQuery query = new IndexQuery(IndexQuery.GEQ, new NativeBroker.NodeRef(500, idFact.createInstance(1)));
            domDb.query(query, new IndexCallback());
            System.out.println("Found: " + count);
            assertEquals(count, 800);
           
            Writer writer = new StringWriter();
            domDb.dump(writer);
View Full Code Here

Examples of org.exist.xmldb.XPathQueryServiceImpl.query()

        for(final Map.Entry<String, String> mapping : namespaceMappings.entrySet()) {
            service.setNamespace(mapping.getKey(), mapping.getValue());
        }
       
        return (sortBy == null) ? service.query(xpath) : service.query(xpath, sortBy);
    }
   
    /** unused, for testing purposes ?? */
    private void testQuery(final String queryFile) {
        try {
View Full Code Here

Examples of org.exist.xmldb.XQueryService.query()

  public static String[] wordList(Collection root) throws XMLDBException {
        final String query = "util:index-keys(//*, \"\", function($key, $options) {\n" +
                "    $key\n" +
                "}, 100, \"lucene-index\")";
        XQueryService service = getXQueryService(root);
        ResourceSet result = service.query(query);

        ArrayList<String> list = new ArrayList<String>();
        for (ResourceIterator iter = result.getIterator(); iter.hasMoreResources(); ) {
            Resource next = iter.nextResource();
            list.add(next.getContent().toString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.