Brian Whitman wrote:
On Dec 6, 2007, at 3:07 PM, Ryan McKinley wrote:
  public static SolrInputDocument toSolrInputDocument( SolrDocument d )
  {
    SolrInputDocument doc = new SolrInputDocument();
    for( String name : d.getFieldNames() ) {
      doc.addField( name, d.getFieldValue(name), 1.0f );
    }
    return doc;
  }

thanks, that worked! agree it's useful to have in clientutils... though I'm not sure why there needs to be two separate classes to begin with.


The big reason is that SolrInputDocument has boosts and SolrDocument does not. Although lucene uses Document for both cases, the 'boost' is meaningless on returned documents and causes confusion) We have two distinct classes because the implementations are optimized for their normal usage.

ryan

Reply via email to