Package com.dotmarketing.portlets.contentlet.business

Examples of com.dotmarketing.portlets.contentlet.business.ContentletAPI.searchIndex()


        List<ContentletSearch> contentletSearchResults;
        int x = 0;
        do {
            Thread.sleep( 200 );
            //Verify if it was added to the index
            contentletSearchResults = contentletAPI.searchIndex( "+structureName:" + structure1.getVelocityVarName() + " +working:true +deleted:false +" + structure1.getVelocityVarName() + ".title:Test1 +languageId:1", 0, -1, null, user, true );
            x++;
        } while ( (contentletSearchResults == null || contentletSearchResults.isEmpty()) && x < 100 );

        //Create the csv file to import
        reader = createTempFile( "Title, Host" + "\r\n" +
View Full Code Here


      //Identifiers will be updated 500 at a time
      Integer limit = 500;
      Integer offset = 0;
     
      //Get all the ContentletSearch
      List<ContentletSearch> contenletSearchList = contentletAPI.searchIndex(luceneQuery, limit, offset, "random", user, false);
     
      //If the query result is not empty
      while(!contenletSearchList.isEmpty()){
        //Start 500 (limit) transaction
        HibernateUtil.startTransaction();
View Full Code Here

        HibernateUtil.commitTransaction();
       
        //Next 500
        limit += limit;
        offset += limit;
        contenletSearchList = contentletAPI.searchIndex(luceneQuery, limit, offset, "random", user, false);
      }
      //Send Notification
      String notificationMessage = LanguageUtil.get(user.getLocale(), "notifications_structure_identifiers_updated");
      Notification n = new Notification(notificationMessage, NotificationLevel.INFO, user.getUserId());
      APILocator.getNotificationAPI().saveNotification(n);
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.