I have experienced the same difficulty. The solution is to incorporate
an additional comparison.
$expr = CassandraUtil::create_index_expression ('field1', 1,
cassandra_IndexOperator::EQ);
$expr2 = CassandraUtil::create_index_expression ('field2', 1,
cassandra_IndexOperator::GTE);
$ic = CassandraUtil::create_index_clause (array ($expr, $expr2));
$ics = $cf->get_indexed_slices ($ic, '', '', '',true);
I really do not need expr, but if I not incorporated I get the same
error message.
Would this be correct?.
My additional difficulty is because I do not get the results sorted by
field2, so finally I create a new column family where I can get that
order.
Regards,
Victor.
On 14 nov, 18:41, SunboX <
fiedler.an...@googlemail.com> wrote:
> Hm, yes.. it sounds like i need a eq index. But there isn´t one. :/
> Maybe i could build one, but i don´t think that it should be
> necessary... :(
>
> On 14 Nov., 18:34, Pieter Maes <
maesc...@gmail.com> wrote:
>
> > hm, the error looks straight forward
>
> > No indexed columns present in index clause with operator EQ
>
> > means that you need an index expression with an EQ operator :)
> > you only have GT and LT
> > I'm not sure why this is needed, i'm a bit behind on cassandra (since 0.6)
>
> > Op 14/11/10 18:06, SunboX schreef:
>
> > > this was a fast response.. ;o)
>
> > > the conf looks like this:
>
> > >
https://gist.github.com/676307
>
> > > On 14 Nov., 18:00, Pieter Maes <
maesc...@gmail.com> wrote:
> > >> What does your storage conf look like?
>
> > >> Op 14/11/10 17:59, SunboX schreef:
>
> > >>> more readable demo code is at:
https://gist.github.com/676305
> > >>> On 14 Nov., 17:56, SunboX <
fiedler.an...@googlemail.com> wrote:
> > >>>> Hi,
> > >>>> i'm using v0.7.0-beta3 and want to do something like this:
> > >>>> $indexExpLatLeft = CassandraUtil::create_index_expression('latitude',
> > >>>> 50,cassandra_IndexOperator::GT);
> > >>>> $indexExpLatRight = CassandraUtil::create_index_expression('latitude',
> > >>>> 51,cassandra_IndexOperator::LT);
> > >>>> $indexExpLngLeft = CassandraUtil::create_index_expression('longitude',
> > >>>> 12,cassandra_IndexOperator::GT);