Package org.exoplatform.services.jcr.impl.core.query.lucene

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


      //        executeSQLQuery(sqlCat, new Node[]{file});
   }

   protected void waitUntilQueueEmpty() throws Exception
   {
      SearchIndex index = (SearchIndex)getQueryHandler();
      IndexingQueue queue = index.getIndex().getIndexingQueue();
      index.getIndex().flush();
      synchronized (index.getIndex())
      {
         while (queue.getNumPendingDocuments() > 0)
         {
            index.getIndex().wait(50);
         }
      }
   }
View Full Code Here


    public void testResultSet() throws RepositoryException {
        createNodes(testRootNode, 10, 5, 0);
        superuser.save();

        SearchIndex index = (SearchIndex) getQueryHandler();
        int resultFetchSize = index.getResultFetchSize();
        try {
            String stmt = testPath + "//*[@" + jcrPrimaryType + "] order by @jcr:score descending";

            // with result fetch size Integer.MAX_VALUE
            readResult(executeQuery(stmt));

            // with result fetch size 100
            index.setResultFetchSize(100);
            readResult(executeQuery(stmt));

            // with 100 limit
            QueryImpl query = (QueryImpl) qm.createQuery(stmt, Query.XPATH);
            query.setLimit(100);
            readResult(query.execute());
        } finally {
            index.setResultFetchSize(resultFetchSize);
        }

        for (NodeIterator it = testRootNode.getNodes(); it.hasNext(); ) {
            it.nextNode().remove();
            superuser.save();
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex

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.