Examples of score()


Examples of org.apache.lucene.search.rankers.queryindependent.PwaUrlSlashes.score()

    PwaUrlSlashes ranker;
    try {
      ranker = new PwaUrlSlashes("http://www.sigir.org");
      assertEquals(0,(int)ranker.score());
      ranker=new PwaUrlSlashes("http://www.sigir.org/");
      assertEquals(1,(int)ranker.score());
      ranker=new PwaUrlSlashes("www.sigir");
      assertEquals(0,(int)ranker.score());               
      ranker=new PwaUrlSlashes("http://www.sigir.org/sigirlist/");
      assertEquals(2,(int)ranker.score());     
      ranker=new PwaUrlSlashes("http://www.sigir.org/sigirlist/issues/otherdir/another/file.htm");
View Full Code Here

Examples of org.apache.lucene.search.rankers.queryindependent.PwaUrlSlashes.score()

      ranker = new PwaUrlSlashes("http://www.sigir.org");
      assertEquals(0,(int)ranker.score());
      ranker=new PwaUrlSlashes("http://www.sigir.org/");
      assertEquals(1,(int)ranker.score());
      ranker=new PwaUrlSlashes("www.sigir");
      assertEquals(0,(int)ranker.score());               
      ranker=new PwaUrlSlashes("http://www.sigir.org/sigirlist/");
      assertEquals(2,(int)ranker.score());     
      ranker=new PwaUrlSlashes("http://www.sigir.org/sigirlist/issues/otherdir/another/file.htm");
      assertEquals(5,(int)ranker.score());
    }
View Full Code Here

Examples of org.apache.solr.search.DocIterator.score()

        int sz = ids.size();
        includeScore = includeScore && ids.hasScores();
        for (int i=0; i<sz; i++) {
          int id = iterator.nextDoc();
          Document doc = searcher.doc(id, fields);
          writeDoc(null, doc, fields, (includeScore ? iterator.score() : 0.0f), includeScore);
        }
      }
    }, fields );
  }
View Full Code Here

Examples of org.apache.solr.search.DocIterator.score()

        first=false;
      } else {
        writeArraySeparator();
      }
      indent();
      writeDoc(null, doc, fields, (includeScore ? iterator.score() : 0.0f), includeScore);
    }
    decLevel();
    writeArrayCloser();

    if (otherFields !=null) {
View Full Code Here

Examples of org.apache.solr.search.DocIterator.score()

    SolrIndexSearcher searcher = req.getSearcher();
    DocIterator iterator = ids.iterator();
    for (int i=0; i<sz; i++) {
      int id = iterator.nextDoc();
      Document doc = searcher.doc(id, fields);
      writeDoc(null, doc, fields, (returnScore ? iterator.score() : 0.0f), returnScore);
    }
  }

  Map scoreMap = new HashMap(1);
  @Override
View Full Code Here

Examples of org.apache.solr.search.DocIterator.score()

    DocIterator iterator = ids.iterator();
    for (int i=0; i<sz; i++) {
      int id = iterator.nextDoc();
      Document doc = searcher.doc(id, fields);
      writeKey(i, false);
      writeDoc(null, doc, fields, (includeScore ? iterator.score() : 0.0f), includeScore);
    }
    writeMapCloser();

    if (otherFields !=null) {
      writeMap(null, otherFields, true, false);
View Full Code Here

Examples of org.apache.solr.search.DocIterator.score()

        if (responseWriter.isStreamingDocs()) {
          responseWriter.startDocumentList(name,info);
          for (int j = 0; j < sz; j++) {
            SolrDocument sdoc = getDoc(iterator.nextDoc(), idxInfo);
            if (idxInfo.includeScore && docList.hasScores()) {
              sdoc.addField(SCORE_FIELD, iterator.score());
            }
            responseWriter.writeDoc(sdoc);
          }
        } else {
          ArrayList<SolrDocument> list = new ArrayList<SolrDocument>(docList
View Full Code Here

Examples of org.apache.solr.search.DocIterator.score()

          ArrayList<SolrDocument> list = new ArrayList<SolrDocument>(docList
              .size());
          for (int j = 0; j < sz; j++) {
            SolrDocument sdoc = getDoc(iterator.nextDoc(), idxInfo);
            if (idxInfo.includeScore && docList.hasScores()) {
              sdoc.addField(SCORE_FIELD, iterator.score());
            }
            list.add(sdoc);
          }
          responseWriter.writeAllDocs(info, list);
        }
View Full Code Here

Examples of org.apache.solr.search.DocIterator.score()

        Document doc = searcher.doc(id, returnFields);

        SolrDocument sdoc = getDoc(doc);

        if (includeScore && ids.hasScores()) {
          sdoc.addField("score", iterator.score());
        }

        codec.writeSolrDocument(sdoc);
      }
    }
View Full Code Here

Examples of org.elasticsearch.search.internal.InternalSearchHit.score()

                }
                FetchSearchResult fetchResult = fetchResultProvider.fetchResult();
                int index = fetchResult.counterGetAndIncrement();
                if (index < fetchResult.hits().internalHits().length) {
                    InternalSearchHit searchHit = fetchResult.hits().internalHits()[index];
                    searchHit.score(shardDoc.score());
                    searchHit.shard(fetchResult.shardTarget());

                    if (sorted) {
                        FieldDoc fieldDoc = (FieldDoc) shardDoc;
                        searchHit.sortValues(fieldDoc.fields);
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.