php - phpcassa - storing only one charecter values -
i trying use cassandra via phpcassa , below code:
$pool = new connectionpool($ks, array('127.0.0.1:9160')); $users=new columnfamily($pool,$cf); $users->insert_format = columnfamily::array_format; $users->return_format = columnfamily::array_format; $email='12334@asdasd.com'; $input=array('col1' => 'val1', 'col2' => 'val2', 'col3' => 'val3','col4'=>'ladhania'); $users->insert($email,$input); $row=$users->get($email); var_dump($row); echo $users->get_count('$email');
but output :
array(2) { [0]=> array(2) { [0]=> string(1) "l" [1]=> string(1) "a" } [1]=> array(2) { [0]=> string(1) "v" [1]=> string(1) "a" } } 0
i know
- why isnt storing 4 columns
- why stored columns have value of 1 character
- is there php client search cassandra using solr
thanks in advance
since you're specifying array_format input format, it's expecting columns this:
$input = array(array('col1', 'val1'), array('col2', 'val2'), array('col3', 'val3'), array('col4', 'ladhania'));
the alternate formats example may useful.
is there php client search cassandra using solr?
datastax enterprise has integrated solr support, can query through either solr api, cql (in recent versions), or thrift api (e.g. phpcassa).
Comments
Post a Comment