[ 
https://issues.apache.org/jira/browse/SOLR-826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644305#action_12644305
 ] 

Matt Mitchell commented on SOLR-826:
------------------------------------

Thoughts on an interface like this? Similar to what's there now I suppose, 
except for the add part.

+ add a single doc
solr.add :product_name=>'Waffle Pro II'

+ add a single doc with doc options (most common use probably)
solr.add {:product_name=>'Waffle Semi-Pro'}, :boost=>1.5

+ add multiple docs, with add options, doc options and field options

solr.add(:allowDups=>false, :commitWithin=>10) do |add|
  add.doc :product_name=>'Waffle Pro II'
  add.doc {:product_name=>'Waffle Semi-Pro'}, :boost=>1.5
  add.doc(:boost=>10) do |doc|
    doc.field :product_name, 'Waffle Basic'
    doc.field :description, 'The fastest way to get from here to there', 
:boost=>10.0
  end
end

+ delete by id
solr.delete_by_id 1

+ delete multiples by id
solr.delete_by_id 1, 2, 3, 4

+ delete by query
solr.delete_by_query 'quantity:0'

+ delete multiples by query
solr.delete_by_query 'quantity:0', 'available:false'

> For the solr-ruby-refactoring movement
> --------------------------------------
>
>                 Key: SOLR-826
>                 URL: https://issues.apache.org/jira/browse/SOLR-826
>             Project: Solr
>          Issue Type: Improvement
>          Components: clients - ruby - flare
>            Reporter: Matt Mitchell
>         Attachments: experiments.2.patch, experiments.patch
>
>
> This is a patch to add a new directory to the solr-ruby-refactoring "branch". 
> It's a very lightweight blob of code for connecting, selecting, updating and 
> deleting using Ruby. It requires the URI and Net::HTTP libraries. No tests at 
> the moment but I think the comments will do for now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to