vanng822 / go-solr

Solr client in Go, core admin, add docs, update, delete, search and more
MIT License
69 stars 42 forks source link

Allow any data through update #43

Closed gadelkareem closed 6 years ago

gadelkareem commented 6 years ago

The data which is sent through Update could also be an array for example [{"id":"11","var":{"set":10}}] which is not possible to send as map[string]interface{} and Marshal will accept an interface{} anyway.

vanng822 commented 6 years ago

Is that something supported by Solr? @gadelkareem I haven't been working with solr for a while. Try to find document about collection but hard to find. If you have any reference it would be nice to read.

For me collection has been a document

vanng822 commented 6 years ago

Ok, ignore my comment for now :-D

I will check what we have and what you change :-)

vanng822 commented 6 years ago

I think it works but I am not really sure if we have a use case. Like look like we always have a "action/operation" and data to operate on, like add: [document] delete: query

Or do you have any real example to show me

gadelkareem commented 6 years ago

Yes, the atomic updates https://lucene.apache.org/solr/guide/6_6/updating-parts-of-documents.html also some examples here http://yonik.com/solr/atomic-updates/

vanng822 commented 6 years ago

thanks I merge it then Good work!