undone the modified hashtags for being non case sensitive
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@100651 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
20e37ccc2f
commit
779d9a6a10
|
@ -1443,10 +1443,9 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
// Inserting data
|
||||
MutationBatch m = conn.getKeyspace().prepareMutationBatch();
|
||||
for (String hashtag : noduplicatesHashtags) {
|
||||
String lowerCaseHashtag = hashtag.toLowerCase();
|
||||
m.withRow(cf_HashtagTimeline, lowerCaseHashtag).putColumn(feedid, vreid, null);
|
||||
m.withRow(cf_HashtagTimeline, hashtag).putColumn(feedid, vreid, null);
|
||||
boolean firstInsert = execute(m);
|
||||
boolean secondInsert = updateVREHashtagCount(vreid, lowerCaseHashtag, true);
|
||||
boolean secondInsert = updateVREHashtagCount(vreid, hashtag, true);
|
||||
if (! (firstInsert && secondInsert)) {
|
||||
_log.error("saveHashTags: Could not save the hashtag(s)");
|
||||
return false;
|
||||
|
@ -1466,10 +1465,9 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
// Inserting data
|
||||
MutationBatch m = conn.getKeyspace().prepareMutationBatch();
|
||||
for (String hashtag : noduplicatesHashtags) {
|
||||
String lowerCaseHashtag = hashtag.toLowerCase();
|
||||
m.withRow(cf_HashtagTimeline, lowerCaseHashtag).deleteColumn(feedid);
|
||||
m.withRow(cf_HashtagTimeline, hashtag).deleteColumn(feedid);
|
||||
boolean firstDelete = execute(m);
|
||||
boolean secondInsert = updateVREHashtagCount(vreid, lowerCaseHashtag, false);
|
||||
boolean secondInsert = updateVREHashtagCount(vreid, hashtag, false);
|
||||
if (! (firstDelete && secondInsert)) {
|
||||
_log.error("deleteHashTags: Could not delete the hashtag(s)");
|
||||
return false;
|
||||
|
@ -1511,9 +1509,8 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
List<Feed> toReturn = new ArrayList<Feed>();
|
||||
OperationResult<Rows<String, String>> result = null;
|
||||
try {
|
||||
String lowerCaseHashtag = hashtag.toLowerCase();
|
||||
result = conn.getKeyspace().prepareQuery(cf_HashtagTimeline)
|
||||
.getKeySlice(lowerCaseHashtag)
|
||||
.getKeySlice(hashtag)
|
||||
.execute();
|
||||
} catch (ConnectionException e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in New Issue