I don't understand how to get TTL set on a solr CF. My understanding is that it might be possible to set a property on the CF, or that I need to set the TTL for each insert or update; either way it seems I need to use cassandra-cli or cqlsh. My question is how to do it when I do updates using the solr APIs?
Search and TTL
(8 posts) (3 voices)-
Posted 3 months ago #
-
You may want to check out http://www.datastax.com/dev/blog/cassandra-column-ttl-support-in-dse-search.
Thanks,
SvenPosted 3 months ago # -
Thanks Sven.
But I don't understand. It seems to me that the post you linked to explains how to make sure the solr index is synchronized more often with the expired cassandra data. When ttl is set (somehow) on the data, and it expires in cassandra, the solr index may still have the data indexed (unless compactation has run) and you will get erroneous results. With the suggested solution those discrepancies decrease. I find it a little difficult to understand how exactly to get this to work as well, but my main problem is that I don't understand how to set ttl in the first place. I understand how to do it using cqlsh but not using solr api calls. I guess my question is: is ttl supposed to be set with every insert/update or do you set it once on a CF? If it's the first case, how do you do it with solr api calls?
Posted 3 months ago # -
when you create a column, you can specify the ttl for the column. The ttl is per column, it's not set per column family.
Posted 3 months ago # -
Thanks. Could you give me an example? I uploaded a solrconfig and schema file and the resulting solr column now exists (as described in http://www.datastax.com/docs/datastax_enterprise2.0/search/dse_search_start#running-the-dse-search-demo) . How do I set TTL?
Posted 3 months ago # -
You can follow this link to set the ttl for the column.
Posted 3 months ago # -
Thank you. It seems you need to set ttl for each column you update or insert. Ok but how do I do that from a solr client?
Posted 3 months ago # -
You would probably also have to establish a C* connection from the client to issue the update command. I don't believe there is any purely solr based way to control that. I will file a feature request for that.
Posted 3 months ago #
Reply
You must log in to post.
