Package org.jzkit.search.impl

Examples of org.jzkit.search.impl.StatelessQueryService


    }

    QueryModel qm = new PrefixString(query);

    // get hold of JZKit SearchSession
    StatelessQueryService sqs = getQueryService(srvContext);

    LandscapeSpecification landscape = new SimpleLandscapeSpecification( collection_ids );
    ExplicitRecordFormatSpecification exp = null;

        if(Log.isDebugEnabled(Geonet.SEARCH_ENGINE))
            Log.debug(Geonet.SEARCH_ENGINE, "Starting remote search");

    String query_id = null;

    // search, but not retrieve
    StatelessSearchResultsPageDTO res = sqs.getResultsPageFor(query_id, qm , landscape  , 0, 0, def_request_spec, exp, null);

    this.status = res.getSearchStatus();
    if ( res.getSearchStatus() == IRResultSetStatus.FAILURE ) {
            if(Log.isDebugEnabled(Geonet.SEARCH_ENGINE))
                Log.debug(Geonet.SEARCH_ENGINE, "failure during search");
View Full Code Here


    Element summary = makeSummary();
    response.add(new Document(summary));

    if (getTo() > 0)
    {
      StatelessQueryService sqs = getQueryService(srvContext);
      InformationFragment fragshtml[] = null;

      if (_html) {
        ExplicitRecordFormatSpecification htmlrfs = new ExplicitRecordFormatSpecification("html", null, "f");
        StatelessSearchResultsPageDTO res = sqs.getResultsPageFor(this.zinfo.getSetname(),this.zinfo.getQueryModel(),this.zinfo.getLandscape(),getFrom(),getTo(),def_html_request_spec,htmlrfs,null);
        fragshtml = res.records;
      }

      ExplicitRecordFormatSpecification rfs = new ExplicitRecordFormatSpecification("xml", null, "f");
      StatelessSearchResultsPageDTO res = sqs.getResultsPageFor(this.zinfo.getSetname(),this.zinfo.getQueryModel(),this.zinfo.getLandscape(),getFrom(),getTo(),def_request_spec,rfs,null);
      InformationFragment frags[] = res.records;

      // FIXME: we may not get all the records we want back sometimes!
      int fragsLength = 0;
      if (frags != null) fragsLength = frags.length;
View Full Code Here

TOP

Related Classes of org.jzkit.search.impl.StatelessQueryService

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.