1

I'm using Datastax Enterprise with Cassandra + Solr, I've 2 nodes with replication factor of 2 - means all the data is on both servers.

I've a problem that when I pull the data from the Solr the order is not right and then I get the same results twice because I'm using loadbalncer so on each request it pulls the data from another server.

I'm using Solarium I've tried to order the results by _uniqueKey but still it's not working.

Any ideas?

Thanks

Rafael Mor
  • 626
  • 1
  • 7
  • 21
  • 1
    You should be using the datastax driver for php, not Solarium. – phact Jun 20 '18 at 22:47
  • From what I see it's for Cassandra I'm pulling the data from Solr: https://docs.datastax.com/en/developer/php-driver/1.3/ – Rafael Mor Jun 21 '18 at 07:37
  • What do you mean by order is not right? Can you give an example ? Also what do you mean by getting data twice ? – root Jun 22 '18 at 19:44
  • Let's say we have 10 records on both servers, the first time you pull the data is: – Rafael Mor Jun 24 '18 at 11:51
  • Let's say we have 10 records on both servers, first pull from server 1: user1, user2, user3, user4, user5 Second pull from server 2: user5, user6, user7, user8, user9 this can happen I guess because the user 5-6 was added in the same time or something like that. – Rafael Mor Jun 24 '18 at 12:02
  • And what happens if you pull from server 1 again? do you still see user1, user2, user3, user4, user5 ? and if you do again from server 2 do you still see: user5, user6, user7, user8, user9 ? first you need to eleminate new inserts from the equation in order to narrow down what the problem is. – root Jun 24 '18 at 14:47
  • Yes I see the same results. I've added order by "_uniqueKey " and it's fixed the problem for a while but for some reason now it's also not good enough. – Rafael Mor Jun 24 '18 at 22:58

0 Answers0