Examples of QueryHits


Examples of org.exoplatform.services.jcr.impl.core.query.lucene.QueryHits

    * @throws RepositoryException
    */
   private Set<String> getNodes(final org.apache.lucene.search.Query query) throws RepositoryException
   {
      Set<String> result = new HashSet<String>();
      QueryHits hits = null;
      try
      {
         hits = handler.executeQuery(query);

         ScoreNode sn;
         while ((sn = hits.nextScoreNode()) != null)
         {
            result.add(sn.getNodeId());
         }
         return result;
      }
      catch (IndexOfflineIOException e)
      {
         throw new IndexOfflineRepositoryException(e.getMessage(), e);
      }
      catch (IOException e)
      {
         throw new RepositoryException(e.getLocalizedMessage(), e);
      }
      finally
      {
         if (hits != null)
         {
            try
            {
               hits.close();
            }
            catch (IOException e)
            {
               LOG.error("Can not close QueryHits.", e);
            }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.query.lucene.QueryHits

    * @throws RepositoryException
    */
   private Set<String> getNodes(final org.apache.lucene.search.Query query) throws RepositoryException
   {
      Set<String> result = new HashSet<String>();
      QueryHits hits = null;
      try
      {
         hits = handler.executeQuery(query);

         ScoreNode sn;
         while ((sn = hits.nextScoreNode()) != null)
         {
            result.add(sn.getNodeId());
         }
         return result;
      }
      catch (IndexOfflineIOException e)
      {
         throw new IndexOfflineRepositoryException(e.getMessage(), e);
      }
      catch (IOException e)
      {
         throw new RepositoryException(e.getLocalizedMessage(), e);
      }
      finally
      {
         if (hits != null)
         {
            try
            {
               hits.close();
            }
            catch (IOException e)
            {
               log.error("Can not close QueryHits.", e);
            }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.query.lucene.QueryHits

    * @throws RepositoryException
    */
   private Set<String> getNodes(final org.apache.lucene.search.Query query) throws RepositoryException
   {
      Set<String> result = new HashSet<String>();
      QueryHits hits = null;
      try
      {
         hits = handler.executeQuery(query);

         ScoreNode sn;
         while ((sn = hits.nextScoreNode()) != null)
         {
            result.add(sn.getNodeId());
         }
         return result;
      }
      catch (IndexOfflineIOException e)
      {
         throw new IndexOfflineRepositoryException(e.getMessage(), e);
      }
      catch (IOException e)
      {
         throw new RepositoryException(e.getLocalizedMessage(), e);
      }
      finally
      {
         if (hits != null)
         {
            try
            {
               hits.close();
            }
            catch (IOException e)
            {
               log.error("Can not close QueryHits.", e);
            }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.query.lucene.QueryHits

    * @throws RepositoryException
    */
   private Set<String> getNodes(final org.apache.lucene.search.Query query) throws RepositoryException
   {
      Set<String> result = new HashSet<String>();
      QueryHits hits = null;
      try
      {
         hits = handler.executeQuery(query);

         ScoreNode sn;
         while ((sn = hits.nextScoreNode()) != null)
         {
            result.add(sn.getNodeId());
         }
         return result;
      }
      catch (IndexOfflineIOException e)
      {
         throw new IndexOfflineRepositoryException(e.getMessage(), e);
      }
      catch (IOException e)
      {
         throw new RepositoryException(e.getLocalizedMessage(), e);
      }
      finally
      {
         if (hits != null)
         {
            try
            {
               hits.close();
            }
            catch (IOException e)
            {
               LOG.error("Can not close QueryHits.", e);
            }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.query.lucene.QueryHits

   private Set<String> getNodes(final org.apache.lucene.search.Query query) throws RepositoryException
   {
      Set<String> result = new HashSet<String>();
      try
      {
         QueryHits hits = handler.executeQuery(query);

         ScoreNode sn;

         while ((sn = hits.nextScoreNode()) != null)
         {
            // Node node = session.getNodeById(sn.getNodeId());
            result.add(sn.getNodeId());
         }
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.query.lucene.QueryHits

    * @throws RepositoryException
    */
   private Set<String> getNodes(final org.apache.lucene.search.Query query) throws RepositoryException
   {
      Set<String> result = new HashSet<String>();
      QueryHits hits = null;
      try
      {
         hits = handler.executeQuery(query);

         ScoreNode sn;
         while ((sn = hits.nextScoreNode()) != null)
         {
            result.add(sn.getNodeId());
         }
         return result;
      }
      catch (IndexOfflineIOException e)
      {
         throw new IndexOfflineRepositoryException(e.getMessage(), e);
      }
      catch (IOException e)
      {
         throw new RepositoryException(e.getLocalizedMessage(), e);
      }
      finally
      {
         if (hits != null)
         {
            try
            {
               hits.close();
            }
            catch (IOException e)
            {
               log.error("Can not close QueryHits.", e);
            }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.query.lucene.QueryHits

   private Set<String> getNodes(final org.apache.lucene.search.Query query) throws RepositoryException
   {
      Set<String> result = new HashSet<String>();
      try
      {
         QueryHits hits = handler.executeQuery(query);

         ScoreNode sn;

         while ((sn = hits.nextScoreNode()) != null)
         {
            // Node node = session.getNodeById(sn.getNodeId());
            result.add(sn.getNodeId());
         }
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.query.lucene.QueryHits

    * @throws RepositoryException
    */
   private Set<String> getNodes(final org.apache.lucene.search.Query query) throws RepositoryException
   {
      Set<String> result = new HashSet<String>();
      QueryHits hits = null;
      try
      {
         hits = handler.executeQuery(query);

         ScoreNode sn;
         while ((sn = hits.nextScoreNode()) != null)
         {
            result.add(sn.getNodeId());
         }
         return result;
      }
      catch (IndexOfflineIOException e)
      {
         throw new IndexOfflineRepositoryException(e.getMessage(), e);
      }
      catch (IOException e)
      {
         throw new RepositoryException(e.getLocalizedMessage(), e);
      }
      finally
      {
         if (hits != null)
         {
            try
            {
               hits.close();
            }
            catch (IOException e)
            {
               LOG.error("Can not close QueryHits.", e);
            }
View Full Code Here

Examples of org.hibernate.search.query.QueryHits

      if (searcher == null) {
         throw new NullPointerException("IndexSearcher instance is null.");
      }

      try {
         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());
         int first = first();
         int max = max(first, queryHits.totalHits);
         int size = max - first + 1 < 0 ? 0 : max - first + 1;
         keyList = new ArrayList<Object>(size);
View Full Code Here

Examples of org.hibernate.search.query.QueryHits

   public QueryIterator lazyIterator(int fetchSize) {
      IndexSearcher searcher = buildSearcher(searchFactory);

      try {
         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());
         int first = first();
         int max = max(first, queryHits.totalHits);

         DocumentExtractor extractor = new DocumentExtractor(queryHits, searchFactory, indexProjection, idFieldNames, allowFieldSelectionInProjection);
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.