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

Steve Davids commented on SOLR-6449:
------------------------------------

This issue is really providing yet another convenience method to perform CRUD 
operations.

Create & Update Operations:
{code}
UpdateResponse resp = solrServer.add(SolrInputDocument);
UpdateResponse resp = solrServer.add(Collection<SolrInputDocument>);
//+ a couple variants
{code}

These methods don't necessarily need to align to the various REST HTTP method 
semantics. The "add" action will perform a create or update clobbering the 
document already in place with the ability to perform an atomic update 
operation which will perform a merge with the document already in the index.

Delete Operations:
{code}
UpdateResponse resp = solrServer.deleteById(String id);
UpdateResponse resp = solrServer.deleteById(Collection<String> id);
UpdateResponse resp = solrServer.deleteByQuery(String query);
//+ a couple variants
{code}

Read Operations:
{code}
QueryResponse resp = solrServer.query(SolrParams);
//+ a couple variants
{code}

As you can see the delete operation allows you to delete given a specific id or 
delete by a query, whereas the retrieval only gives you query access. To be 
consistent this ticket should provide the ability to retrieve by id as a 
convenience to developers using the SolrJ API (not to mention the additional 
benefits they will get from the RealTimeGetHandler).

> Add first class support for Real Time Get in Solrj
> --------------------------------------------------
>
>                 Key: SOLR-6449
>                 URL: https://issues.apache.org/jira/browse/SOLR-6449
>             Project: Solr
>          Issue Type: Improvement
>          Components: clients - java
>            Reporter: Shalin Shekhar Mangar
>              Labels: difficulty-medium, impact-medium
>             Fix For: 5.0
>
>
> Any request handler can be queried by Solrj using a custom param map and the 
> "qt" parameter but I think /get should get first-class support in the java 
> client.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to