Examples of searchIndex()


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

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

      //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

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

        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

Examples of org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature.ChildrenDiff.searchIndex()

      }
      ReadOnlyList<INode> children = dir.getChildrenList(earlierSnapshot
          .getId());
      for (INode child : children) {
        final byte[] name = child.getLocalNameBytes();
        boolean toProcess = diff.searchIndex(ListType.DELETED, name) < 0;
        if (!toProcess && child instanceof INodeReference.WithName) {
          byte[][] renameTargetPath = findRenameTargetPath((WithName) child,
              laterSnapshot == null ? Snapshot.CURRENT_STATE_ID :
                                      laterSnapshot.getId());
          if (renameTargetPath != null) {
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature.ChildrenDiff.searchIndex()

      ReadOnlyList<INode> children = dir.getChildrenList(
          diffReport.isFromEarlier() ? Snapshot.getSnapshotId(diffReport.to) :
            Snapshot.getSnapshotId(diffReport.from));
      for (INode child : children) {
        final byte[] name = child.getLocalNameBytes();
        if (diff.searchIndex(ListType.CREATED, name) < 0
            && diff.searchIndex(ListType.DELETED, name) < 0) {
          parentPath.add(name);
          computeDiffRecursively(child, parentPath, diffReport);
          parentPath.remove(parentPath.size() - 1);
        }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature.ChildrenDiff.searchIndex()

          diffReport.isFromEarlier() ? Snapshot.getSnapshotId(diffReport.to) :
            Snapshot.getSnapshotId(diffReport.from));
      for (INode child : children) {
        final byte[] name = child.getLocalNameBytes();
        if (diff.searchIndex(ListType.CREATED, name) < 0
            && diff.searchIndex(ListType.DELETED, name) < 0) {
          parentPath.add(name);
          computeDiffRecursively(child, parentPath, diffReport);
          parentPath.remove(parentPath.size() - 1);
        }
      }
View Full Code Here

Examples of org.securegraph.property.StreamingPropertyValue.searchIndex()

        LumifyProperties.CONCEPT_TYPE.addPropertyValue(v, MULTI_VALUE_KEY, TwitterOntology.CONCEPT_TYPE_TWEET, visibility);
        LumifyProperties.SOURCE.addPropertyValue(v, MULTI_VALUE_KEY, SOURCE_NAME, visibility);

        StreamingPropertyValue rawValue = new StreamingPropertyValue(new ByteArrayInputStream(jsonString.getBytes()), byte[].class);
        rawValue.searchIndex(false);
        LumifyProperties.RAW.addPropertyValue(v, MULTI_VALUE_KEY, rawValue, visibility);

        String text = json.getString("text");
        text = text.replaceAll("&lt;", "<").replaceAll("&gt;", "<").replaceAll("&amp;", "&");
        StreamingPropertyValue textValue = new StreamingPropertyValue(new ByteArrayInputStream(text.getBytes()), String.class);
View Full Code Here

Examples of org.securegraph.property.StreamingPropertyValue.searchIndex()

        InputStream imageData = profileImageUrl.openStream();
        try {
            String userTitle = LumifyProperties.TITLE.getPropertyValue(data.getElement());

            StreamingPropertyValue imageValue = new StreamingPropertyValue(imageData, byte[].class);
            imageValue.searchIndex(false);

            VertexBuilder v = getGraph().prepareVertex(profileImageId, data.getVisibility());
            LumifyProperties.TITLE.setProperty(v, "Profile Image of " + userTitle, data.getVisibility());
            LumifyProperties.RAW.setProperty(v, imageValue, data.getVisibility());
            LumifyProperties.CONCEPT_TYPE.setProperty(v, TwitterOntology.CONCEPT_TYPE_PROFILE_IMAGE, data.getVisibility());
View Full Code Here

Examples of org.securegraph.property.StreamingPropertyValue.searchIndex()

            in = new FileInputStream(file);
        } catch (FileNotFoundException ex) {
            throw new LumifyException("File " + file.getAbsolutePath() + " does not exist.");
        }
        StreamingPropertyValue spv = new StreamingPropertyValue(in, byte[].class);
        spv.searchIndex(false);
        spv.store(true);
        return spv;
    }

    private void importResource(Graph graph, Vertex outVertex, Statement statement, GraphPropertyWorkData data, Visibility visibility, Authorizations authorizations) {
View Full Code Here

Examples of org.securegraph.property.StreamingPropertyValue.searchIndex()

    }

    @Override
    protected void addEntityGlyphIconToEntityConcept(Concept entityConcept, byte[] rawImg) {
        StreamingPropertyValue raw = new StreamingPropertyValue(new ByteArrayInputStream(rawImg), byte[].class);
        raw.searchIndex(false);
        entityConcept.setProperty(LumifyProperties.GLYPH_ICON.getPropertyName(), raw, authorizations);
        graph.flush();
    }

    @Override
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.