Examples of search()


Examples of org.apache.mahout.math.neighborhood.Searcher.search()

    int numCols = columnCentroids.size();
    Matrix confusionMatrix = new DenseMatrix(numRows, numCols);

    for (Vector vector : datapoints) {
      WeightedThing<Vector> closestRowCentroid = rowSearcher.search(vector, 1).get(0);
      WeightedThing<Vector> closestColumnCentroid = columnSearcher.search(vector, 1).get(0);
      int row = ((Centroid) closestRowCentroid.getValue()).getIndex();
      int column = ((Centroid) closestColumnCentroid.getValue()).getIndex();
      double vectorWeight;
      if (vector instanceof WeightedVector) {
        vectorWeight = ((WeightedVector) vector).getWeight();

Examples of org.apache.mahout.math.neighborhood.UpdatableSearcher.search()

    }
    for (int i = 0; i < searcher.size(); ++i) {
      summarizers.add(new OnlineSummarizer());
    }
    for (Vector v : datapoints) {
      Centroid closest = (Centroid)searcher.search(v,  1).get(0).getValue();
      OnlineSummarizer summarizer = summarizers.get(closest.getIndex());
      summarizer.add(distanceMeasure.distance(v, closest));
    }
    return summarizers;
  }

Examples of org.apache.maven.archiva.indexer.RepositoryArtifactIndex.search()

            if ( checksum != null )
            {
                try
                {
                    List results = index
                        .search( new LuceneQuery( new TermQuery( new Term( StandardIndexRecordFields.MD5, checksum
                            .toLowerCase() ) ) ) );

                    if ( !results.isEmpty() )
                    {

Examples of org.apache.nutch.searcher.DistributedSearch.Client.search()

    addresses[0]=new InetSocketAddress("localhost", port);
   
    Client c=new DistributedSearch.Client(addresses, conf);

    Query query=Query.parse("apache", conf);
    Hits hits=c.search(query, 5, null, null, false);
    c.getDetails(hits.getHit(0));
    assertTrue(hits.getTotal()>0);
  }
}

Examples of org.apache.nutch.searcher.NutchBean.search()

   
    NutchBean bean = new NutchwaxBean(conf);
   
    Query query = Query.parse(args[0], conf);
   
    Hits hits = bean.search(query, 10);
    System.out.println("Total hits: " + hits.getTotal());
   
    int length = (int)Math.min(hits.getTotal(), 10);
   
    Hit[] show = hits.getHits(0, length);

Examples of org.apache.slide.search.Search.search()

                                                                     basicSearch,
                                                                     sTokenNoEnlist,
                                                                     Integer.MAX_VALUE,
                                                                     contextPath);
           
            SearchQueryResult queryResult = searchHelper.search(sTokenNoEnlist, searchQuery);
            Iterator queryResultIterator = queryResult.iterator();
            RequestedResource requestedResource = null;
            Element href = null;
            while (queryResultIterator.hasNext()) {
                requestedResource = (RequestedResource)queryResultIterator.next();

Examples of org.apache.solr.search.SolrIndexSearcher.search()

    RefCounted<SolrIndexSearcher> holder = h.getCore().getSearcher();
    SolrIndexSearcher srchr = holder.get();
    SolrIndexSearcher.QueryResult qr = new SolrIndexSearcher.QueryResult();
    SolrIndexSearcher.QueryCommand cmd = new SolrIndexSearcher.QueryCommand();
    cmd.setQuery(new MatchAllDocsQuery());
    qr = srchr.search(qr, cmd);

    DocList docs = qr.getDocList();
    Set<String> fields = new HashSet<String>();
    fields.add("val_t");

Examples of org.apache.syncope.common.services.UserService.search()

        AttributeCond isNullCond = new AttributeCond(AttributeCond.Type.ISNOTNULL);
        isNullCond.setSchema("loginDate");
        NodeCond searchCondition = NodeCond.getLeafCond(isNullCond);

        List<UserTO> matchedUsers = userService2.search(searchCondition);
        assertNotNull(matchedUsers);
        assertFalse(matchedUsers.isEmpty());
        Set<Long> userIds = new HashSet<Long>(matchedUsers.size());
        for (UserTO user : matchedUsers) {
            userIds.add(user.getId());

Examples of org.apache.xindice.core.query.ftsearch.Searcher.search()

            Node node = xctxt.getDTM(ctxtNode).getNode(ctxtNode);
            NodeListImpl list = new NodeListImpl(null);
            list.add(node);

            Searcher searcher = new Searcher(list, analyzer);
            NodeSet nodes = searcher.search(query);

            return nodes.hasMoreNodes() ? XBoolean.S_TRUE : XBoolean.S_FALSE;
        } catch (ParseException e) {
            throw new TransformerException("Error in text query", e);
        }

Examples of org.aspectj.org.eclipse.jdt.internal.core.util.DOMFinder.search()

        for (int i = 0; i < intList.length; i++) {
          final int index = intList.list[i];
          SourceRefElement element = (SourceRefElement) elements[index];
          DOMFinder finder = new DOMFinder(ast, element, true/*resolve binding*/);
          try {
            finder.search();
          } catch (JavaModelException e) {
            throw new IllegalArgumentException(element + " does not exist"); //$NON-NLS-1$
          }
          this.bindings[index] = finder.foundBinding;
        }
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.