Examples of SearchIndex


Examples of org.apache.jackrabbit.core.query.lucene.SearchIndex

            throws RepositoryException {
        Session session = getHelper().getSuperuserSession(wspName);
        try {
            QueryManager qm = session.getWorkspace().getQueryManager();
            QueryHandler handler = ((QueryManagerImpl) qm).getQueryHandler();
            SearchIndex index = (SearchIndex) handler;
            assertEquals("Wrong index format", version.getVersion(),
                    index.getIndexFormatVersion().getVersion());
        } finally {
            session.logout();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.query.lucene.SearchIndex

            throws RepositoryException {
        Session session = helper.getSuperuserSession(wspName);
        try {
            QueryManager qm = session.getWorkspace().getQueryManager();
            QueryHandler handler = ((QueryManagerImpl) qm).getQueryHandler();
            SearchIndex index = (SearchIndex) handler;
            assertEquals("Wrong index format", version.getVersion(),
                    index.getIndexFormatVersion().getVersion());
        } finally {
            session.logout();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.query.lucene.SearchIndex

    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

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

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

    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

Examples of org.kie.kieora.search.SearchIndex

        final MetaModelStore metaModelStore = new InMemoryMetaModelStore();
        final MetaIndexEngine indexEngine = new LuceneIndexEngine( metaModelStore,
                                                                   luceneSetup,
                                                                   new SimpleFieldFactory() );

        final SearchIndex searchIndex = new LuceneSearchIndex( luceneSetup );

        final IOService service = new IOServiceIndexedImpl( watchService,
                                                            indexEngine,
                                                            DublinCoreView.class,
                                                            VersionAttributeView.class,
View Full Code Here

Examples of org.kie.kieora.search.SearchIndex

        final MetaModelStore metaModelStore = new InMemoryMetaModelStore();
        final MetaIndexEngine indexEngine = new LuceneIndexEngine( metaModelStore,
                                                                   luceneSetup,
                                                                   new SimpleFieldFactory() );

        final SearchIndex searchIndex = new LuceneSearchIndex( luceneSetup );

        final IOService service = new IOServiceIndexedImpl( indexEngine,
                                                            DublinCoreView.class,
                                                            VersionAttributeView.class,
                                                            OtherMetaView.class );
View Full Code Here

Examples of org.kie.kieora.search.SearchIndex

        final MetaModelStore metaModelStore = new InMemoryMetaModelStore();
        final MetaIndexEngine indexEngine = new LuceneIndexEngine( metaModelStore,
                                                                   luceneSetup,
                                                                   new SimpleFieldFactory() );

        final SearchIndex searchIndex = new LuceneSearchIndex( luceneSetup );

        final IOService service = new IOServiceIndexedImpl( indexEngine,
                                                            DublinCoreView.class,
                                                            VersionAttributeView.class,
                                                            OtherMetaView.class );
View Full Code Here

Examples of org.securegraph.search.SearchIndex

public class ReIndexGraphPropertyWorker extends GraphPropertyWorker {
    @Override
    public void execute(InputStream in, GraphPropertyWorkData data) throws Exception {
        if (getGraph() instanceof GraphBase) {
            SearchIndex searchIndex = ((GraphBaseWithSearchIndex) getGraph()).getSearchIndex();
            searchIndex.addElement(getGraph(), data.getElement(), data.getElement().getAuthorizations());
        }
    }
View Full Code Here

Examples of org.uberfire.metadata.search.SearchIndex

        final MetaModelStore metaModelStore = new InMemoryMetaModelStore();
        final MetaIndexEngine indexEngine = new LuceneIndexEngine( metaModelStore,
                                                                   luceneSetup,
                                                                   new SimpleFieldFactory() );

        final SearchIndex searchIndex = new LuceneSearchIndex( luceneSetup );

        final IOService service = new IOServiceIndexedImpl( watchService,
                                                            indexEngine,
                                                            DublinCoreView.class,
                                                            VersionAttributeView.class,
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.