Ah, it's easy. It reminds me the fact that ESB don't use transactions in favor of compansations. Allocate some txId, assign it on every doc then if you need to rollback submit deleteByQuery txId:<666>, and commit. Although, it provides phantom and dirty reads both, it's really cheap. If you need something super atomic evaluate addIndex approach.
On Tue, Jun 7, 2016 at 12:14 PM, Pithon Philippe <ppithon.si...@gmail.com> wrote: > Thanks, > my problem is for rollback transaction by user... > if there is a problem in trycatch for a user, the rollback run for all > users commit... > Philippe > > 2016-06-07 9:23 GMT+02:00 Mikhail Khludnev <mkhlud...@griddynamics.com>: > > > Hello, > > > > That's how Lucene work underneath. > > Just ad-hoc idea you can have isolated per session indices and then add > > them altogether. Thinking deeper, we can consider per thread invertors > > which somehow isolated, perhaps something transactional might be built on > > top of them, but it's really deep hack. > > Anyway, it.s not clear what you want to achieve and why by this way. > Also, > > this question suits for dev@ much more. > > 07 июня 2016 г. 9:41 пользователь "Pithon Philippe" < > > ppithon.si...@gmail.com> > > написал: > > > > > Hi, > > > I have a question on Solr Transaction as relational databases > > > > > > The Solr commit is not isolated for each client session, right? > > > In my test (source below) The commit in a session adds records of other > > > sessions > > > is there a documentation on this? > > > is what's planned improvements on this? version 6, version 7? > > > Thank you for any ideas! > > > > > > > > > Source example : > > > > > > public class TransactionTest { > > > > > > static final String BASE_URL = "http://localhost:8983/solr/test"; > > > > > > public static void main(String[] args) { > > > > > > try { > > > new TransactionTest(); > > > } catch (Exception e) { > > > e.printStackTrace(); > > > } > > > > > > } > > > > > > public TransactionTest() throws Exception { > > > > > > HttpSolrClient solrClient = new HttpSolrClient(BASE_URL); > > > > > > DTOMail mail = new DTOMail(); > > > mail.setType("mail"); > > > mail.setBody("test body"); > > > > > > System.out.println("add been"); > > > solrClient.addBean(mail); > > > > > > pause(); > > > > > > System.out.println("commit"); > > > solrClient.commit(); > > > > > > solrClient.close(); > > > } > > > > > > private void pause() { > > > > > > try { > > > System.in.read(); > > > } catch (Exception e) { > > > } > > > > > > } > > > > > > } > > > > > > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>