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?
In an effort to consolidate free help offered for our products we have decided to move these forums to a more widely used forum. Please use one of the following queries (or any combination):
- Cassandra: tag search or plain text search
- DataStax Enterprise: tag search or plain text search
- DataStax OpsCenter: tag search or plain text search
Search and TTL(8 posts) (3 voices)
You may want to check out http://www.datastax.com/dev/blog/cassandra-column-ttl-support-in-dse-search.
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?
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.
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?
You can follow this link to set the ttl for the column.
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?
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.