If you want to do it in Ruby, you can use this script as scaffolding:
require 'rsolr' # run `gem install rsolr` to get this
solr  = RSolr.connect(:url => 'http://ip-10-164-13-204:8983/solr')
total = solr.select({:rows => 0})["response"]["numFound"]
rows  = 100000
query = {
  :rows   => rows,
  :start  => 0
}
pages = (total.to_f / rows.to_f).ceil # round up
(1..pages).each do |page|
  query[:start] = (page-1) * rows
  results = solr.select(query)
  docs    = results[:response][:docs]
  # Do stuff here
  #
  docs.each do |doc|
    doc[:content] = "IN UR SOLR MESSIN UP UR CONTENT!#{doc[:content]}"
  end
  # Add it back in to Solr
  solr.add(docs)
  solr.commit
end

Scott

On Thu, Sep 16, 2010 at 2:27 PM, Shashi Kant <sk...@sloan.mit.edu> wrote:
>
> Start with a *:*, then the “numFound” attribute of the <result>
> element should give you the rows to fetch by a 2nd request.
>
>
> On Thu, Sep 16, 2010 at 4:49 PM, Christopher Gross <cogr...@gmail.com> wrote:
> > That will stil just return 10 rows for me.  Is there something else in
> > the configuration of solr to have it return all the rows in the
> > results?
> >
> > -- Chris
> >
> >
> >
> > On Thu, Sep 16, 2010 at 4:43 PM, Shashi Kant <sk...@sloan.mit.edu> wrote:
> >> q=*:*
> >>
> >> On Thu, Sep 16, 2010 at 4:39 PM, Christopher Gross <cogr...@gmail.com> 
> >> wrote:
> >>> I have some queries that I'm running against a solr instance (older,
> >>> 1.2 I believe), and I would like to get *all* the results back (and
> >>> not have to put an absurdly large number as a part of the rows
> >>> parameter).
> >>>
> >>> Is there a way that I can do that?  Any help would be appreciated.
> >>>
> >>> -- Chris
> >>>
> >>
> >

Reply via email to