Examples of Hits


Examples of org.exoplatform.services.jcr.impl.core.query.lucene.hits.Hits

            String uuid = reader.document(i, FieldSelectors.UUID).get(FieldNames.UUID);
            uuids.put(new Integer(i), uuid);
         }

         // get child node entries for each hit
         Hits childrenHits = new AdaptingHits();
         for (Iterator it = uuids.values().iterator(); it.hasNext();)
         {
            String uuid = (String)it.next();
            try
            {
               if (nameTest != null && version.getVersion() >= IndexFormatVersion.V4.getVersion())
               {
                  StringBuilder path = new StringBuilder(256);
                  path.append(uuid == null ? "" : uuid).append('/').append(nameTest.getAsString());
                  TermDocs docs = reader.termDocs(new Term(FieldNames.PATH, path.toString()));
                  try
                  {
                     while (docs.next())
                     {
                        childrenHits.set(docs.doc());
                     }

                  }
                  finally
                  {
                     docs.close();
                  }
               }
               else
               {
                  long time = System.currentTimeMillis();
                  NodeData state = (NodeData)itemMgr.getItemData(uuid);
                  time = System.currentTimeMillis() - time;
                  LOG.debug("got NodeState with id {} in {} ms.", uuid, new Long(time));
                  Iterator<NodeData> entries;
                  if (nameTest != null)
                  {
                     List<NodeData> childs = itemMgr.getChildNodesData(state);

                     List<NodeData> datas = new ArrayList<NodeData>();
                     if (childs != null)
                     {
                        for (NodeData nodeData : childs)
                        {
                           if (nameTest.equals(nodeData.getQPath().getName()))
                              datas.add(nodeData);
                        }
                     }
                     entries = datas.iterator();
                  }
                  else
                  {
                     // get all children
                     entries = itemMgr.getChildNodesData(state).iterator();
                  }
                  while (entries.hasNext())
                  {
                     String childId = entries.next().getIdentifier();
                     Term uuidTerm = new Term(FieldNames.UUID, childId);
                     TermDocs docs = reader.termDocs(uuidTerm);
                     try
                     {
                        if (docs.next())
                        {
                           childrenHits.set(docs.doc());
                        }
                     }
                     finally
                     {
                        docs.close();
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.query.lucene.hits.Hits

         long time = 0;
         if (LOG.isDebugEnabled())
         {
            time = System.currentTimeMillis();
         }
         Hits childrenHits = new AdaptingHits();
         Hits nameHits = new ScorerHits(nameTestScorer);
         int[] docs = new int[1];
         for (int h = nameHits.next(); h > -1; h = nameHits.next())
         {
            docs = hResolver.getParents(h, docs);
            if (docs.length == 1)
            {
               // optimize single value
View Full Code Here

Examples of org.gephi.statistics.plugin.Hits

    public String getName() {
        return NbBundle.getMessage(HitsBuilder.class, "Hits.name");
    }

    public Statistics getStatistics() {
        return new Hits();
    }
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.