Returns the initial SOLR query.<p>

@return the SOLR query
760600
public CmsSolrQuery getInitialQuery() {

        Map<String, String[]> queryParams = new HashMap<String, String[]>();
        if (!m_cms.getRequestContext().getCurrentProject().isOnlineProject() && m_config.isShowExpired()) {
            queryParams.put("fq", new String[] {"released:[* TO *]", "expired:[* TO *]"});
        }
        return new CmsSolrQuery(null, queryParams);
    }
320315
public String getHome() {

        if (m_homeFolderPath == null) {
            if (CmsStringUtil.isNotEmpty(System.getProperty(SOLR_HOME_PROPERTY))) {
                m_home = System.getProperty(SOLR_HOME_PROPERTY);
            } else {
                m_home = OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(SOLR_HOME_DEFAULT);
            }
            m_home = (m_home.endsWith(File.separator)
            ? m_home.substring(0, m_home.lastIndexOf(File.separator))
            : m_home);
        } else {
            m_home = m_homeFolderPath;
        }
        return m_home;
    }
889623
protected QueryFactory<T> getQueryFactory() {
        if (queryFactory == null) {
            queryFactory = new QueryFactory<>(getEntityClass(), getEntityManager());
        }

        return queryFactory;
    }
514715
public Map<String, String> getQuery() {
    String query = uri.getQuery();
    String[] pairs = query.split("&");
    Map<String, String> args = new HashMap<>();
    for (String pair : pairs) {
      int idx = pair.indexOf("=");
      try {
        args.put(URLDecoder.decode(pair.substring(0, idx), "UTF-8"), URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
      } catch (UnsupportedEncodingException e) {
        throw new IllegalArgumentException(e);
      }
    }
    return args;
  }
773187
public function getQuery()
    {
        $idField = $this->documentKey;

        if ($idField == null) {
            throw new QueryException('id should not be null');
        }

        $this->setQuery(sprintf('id:%s', $idField));

        return parent::getQuery();
    }
469905
public function getQuery()
    {
        $parameters = clone $this->parameters;
        $query      = $this->em->createQuery($this->getDQL())
            ->setParameters($parameters)
            ->setFirstResult($this->firstResult)
            ->setMaxResults($this->maxResults);

        if ($this->lifetime) {
            $query->setLifetime($this->lifetime);
        }

        if ($this->cacheMode) {
            $query->setCacheMode($this->cacheMode);
        }

        if ($this->cacheable) {
            $query->setCacheable($this->cacheable);
        }

        if ($this->cacheRegion) {
            $query->setCacheRegion($this->cacheRegion);
        }

        return $query;
    }
706241
protected function getIndexQueueInitializationSelector()
    {
        $selector = GeneralUtility::makeInstance(IndexingConfigurationSelectorField::class, /** @scrutinizer ignore-type */ $this->selectedSite);
        $selector->setFormElementName('tx_solr-index-queue-initialization');

        return $selector->render();
    }
746436
@Override
  public MtasSpanQuery getQuery() throws ParseException {
    MtasSpanQuery q = null;
    // match any word (try to avoid...)
    if (wordCondition.isEmpty()) {
      q = new MtasSpanMatchAllQuery(wordCondition.field());
      // only positive queries
    } else if (wordCondition.isSimplePositive()) {
      if (wordCondition.isSingle()) {
        q = wordCondition.getPositiveQuery(0);
      } else {
        if (wordCondition.type().equals(MtasCQLParserWordCondition.TYPE_AND)) {
          q = new MtasSpanAndQuery(wordCondition.getPositiveQuery().toArray(
              new MtasSpanQuery[wordCondition.getPositiveQuery().size()]));
        } else if (wordCondition.type()
            .equals(MtasCQLParserWordCondition.TYPE_OR)) {
          q = new MtasSpanOrQuery(wordCondition.getPositiveQuery().toArray(
              new MtasSpanQuery[wordCondition.getPositiveQuery().size()]));
        } else {
          throw new ParseException("unknown type " + wordCondition.type());
        }
      }
      // only negative queries
    } else if (wordCondition.isSimpleNegative()) {
      throw new ParseException("shouldn't be simple negative");
      // both positive and negative queries
    } else {
      if (wordCondition.type().equals(MtasCQLParserWordCondition.TYPE_AND)) {
        MtasSpanQuery qPositive;
        MtasSpanQuery qNegative;
        if (wordCondition.getPositiveQuery().size() == 1) {
          qPositive = wordCondition.getPositiveQuery(0);
        } else {
          qPositive = new MtasSpanAndQuery(
              wordCondition.getPositiveQuery().toArray(
                  new MtasSpanQuery[wordCondition.getPositiveQuery().size()]));
        }
        if (wordCondition.getNegativeQuery().size() == 1) {
          qNegative = wordCondition.getNegativeQuery(0);
        } else {
          qNegative = new MtasSpanOrQuery(
              wordCondition.getNegativeQuery().toArray(
                  new MtasSpanQuery[wordCondition.getNegativeQuery().size()]));
        }
        q = new MtasSpanNotQuery(qPositive, qNegative);
      } else if (wordCondition.type()
          .equals(MtasCQLParserWordCondition.TYPE_OR)) {
        MtasSpanQuery qPositive;
        MtasSpanQuery qNegative;
        if (wordCondition.getPositiveQuery().size() == 1) {
          qPositive = wordCondition.getPositiveQuery(0);
        } else {
          qPositive = new MtasSpanOrQuery(
              wordCondition.getPositiveQuery().toArray(
                  new MtasSpanQuery[wordCondition.getPositiveQuery().size()]));
        }
        if (wordCondition.getNegativeQuery().size() == 1) {
          qNegative = wordCondition.getNegativeQuery(0);
        } else {
          qNegative = new MtasSpanAndQuery(
              wordCondition.getNegativeQuery().toArray(
                  new MtasSpanQuery[wordCondition.getNegativeQuery().size()]));
        }
        q = new MtasSpanNotQuery(qPositive, qNegative);
      } else {
        throw new ParseException("unknown type " + wordCondition.type());
      }
    }
    if (not) {
      MtasSpanQuery qPositive = new MtasSpanMatchAllQuery(
          wordCondition.field());
      q = new MtasSpanNotQuery(qPositive, q);
    }
    return q;
  }
1080231
private Query getNamedOrCreateQuery(String queryString) {
    if (queryString.charAt(0) == '@') return getSession().getNamedQuery(queryString.substring(1));
    else return getSession().createQuery(queryString);
  }
1075069
public CmsSolrResultList search(CmsObject cms, String solrQuery) throws CmsSearchException {

        return search(cms, new CmsSolrQuery(null, CmsRequestUtil.createParameterMap(solrQuery)), false);
    }
939267
public NamedQuery<Entity<T>> getOrCreateNamedQuery()
   {
      List<Node> nodeList = childNode.get("named-query");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new NamedQueryImpl<Entity<T>>(this, "named-query", childNode, nodeList.get(0));
      }
      return createNamedQuery();
   }
647509
public Query<T> getCountQuery() {
    if (Strings.isEmpty(countStatement)) { return null; }
    QueryBean<T> bean = new QueryBean<T>();
    bean.setStatement(countStatement);
    bean.setLang(lang);
    bean.setParams(params);
    bean.setCacheable(cacheable);
    return bean;
  }
1139333
public CharSequence getQueryHint() {
        if (mQueryHint != null) {
            return mQueryHint;
        } else if (mSearchable != null) {
            CharSequence hint = null;
            int hintId = mSearchable.getHintId();
            if (hintId != 0) {
                hint = getContext().getString(hintId);
            }
            return hint;
        }
        return null;
    }
1079845
protected String createQueryString() {
		assert !this.hasBinaryAttachments;
		
		if (this.params.isEmpty())
			return "";
		
		StringBuilder bld = null;
		
		for (Map.Entry<String, Object> param: this.params.entrySet()) {
			if (bld == null)
				bld = new StringBuilder();
			else
				bld.append('&');
			
			bld.append(StringUtils.urlEncode(param.getKey()));
			bld.append('=');
			bld.append(StringUtils.urlEncode(param.getValue().toString()));
		}
		
		return bld.toString();
	}
752002
void initialSearch() {

        CmsRpcAction<CmsGallerySearchBean> searchAction = new CmsRpcAction<CmsGallerySearchBean>() {

            @Override
            public void execute() {

                start(0, true);
                m_dialogBean.setTreeToken(getTreeToken());
                getGalleryService().getSearch(m_dialogBean, this);
            }

            @Override
            protected void onResponse(CmsGallerySearchBean result) {

                stop(false);
                m_searchObject = result;
                m_handler.onInitialSearch(m_searchObject, m_dialogBean, CmsGalleryController.this, true);
            }
        };
        searchAction.execute();
    }
1100523
public Article getFirst() {
		try {
			List<Article> articleList = get();
			if(articleList == null || articleList.size() < 1)
				return null;

			return articleList.get(0);
		} catch (IOException e) {
			return null;
		}
	}
718166
public DisplayedResultQuery getSearchQuery()
  {
    return QueryGenerator.displayed()
      .query(state.getAql().getValue())
      .corpora(state.getSelectedCorpora().getValue())
      .left(state.getLeftContext().getValue())
      .right(state.getRightContext().getValue())
      .segmentation(state.getContextSegmentation().getValue())
      .baseText(state.getVisibleBaseText().getValue())
      .limit(state.getLimit().getValue())
      .offset(state.getOffset().getValue())
      .order(state.getOrder().getValue())
      .selectedMatches(state.getSelectedMatches().getValue())
      .build();
  }