nosql

Selecting index from Cassandra list collection

社会主义新天地 提交于 2019-12-13 04:31:09
问题 I was curious if it's possible to SELECT a specific index from a list collection in Cassandra. Say I have: CREATE TABLE users ( user_id text PRIMARY KEY, order_list list<text> ); UPDATE users SET ordered_list = [ 'thing1', 'thing2', 'thing3' ] WHERE user_id = 'user1'; Is it possible to then get back an index of ordered_list, such as ordered_list[1] from a CQL query instead of the entire list? 回答1: No, you can't. You can UPDATE and DELETE with subscripts, but not SELECT or INSERT . 来源: https:/

How does Tinder know who's been seen? (Backend)

我们两清 提交于 2019-12-13 04:27:56
问题 I have a dynamodb source of models. Now I query them via ElasticSearch, so I can make a geo search. give me all models in 30 km circle. Now the user has a Tinder system. So can wipe. How do I know which models I don't have to retrieve anymore? What is the best way to do this? A table with already seen maps? Then I subtract from ElasticSearch, get an array with 100 cards and compare them? If he has already seen all 100, then ask ElasticSearch again? That makes little sense. The more the user

How to query to include specific words in hyperledger composer query?

家住魔仙堡 提交于 2019-12-13 04:14:47
问题 I want to query 'a', 'ab', 'abc' way( where: {field: {like: a%} } ) is unable. 'like' operator is not supported by hyperledger composer filter. How to query to include specific words in hyperledger composer query? 回答1: Composer Query Language presently doesn't support 'SQL like' LIKE format such as '%' or regex regexes via CQL, and reliant on the underlying CouchDB Mango QL. Feel free to raise an issue on this at https://github.com/hyperledger/composer/issues/ if you wish. You would have to

Mongodb use findAndModify on specific document among multiple match

落花浮王杯 提交于 2019-12-13 04:14:05
问题 I have documents that look like below let object = [ { id: 4, parents: [ 1, 2, ], children: 2 }, { id: 5, parents: [ 1, 2, ], children: 1 }, { id: 8, parents: [ 1, 2, 4 ], children: 0 }, { id: 9, parents: [ 1, 2, 4 ], children: 0 }, { id: 10, parents: [ 1,2,5 ], children:0 } ] I would like to use findAndModify in order to update the children value. It has to be findAndModify because I will be working in an multithreaded environment so selection and update must happen in single transaction.

Which distributed database I need to choose for medium data project

ε祈祈猫儿з 提交于 2019-12-13 04:03:17
问题 Now we have java project with PostgreSQL database on spring boot 2 with Spring Data JPA (Hibernate). Requirements to new architecture: On N computers we have workplace. Each workplace use the same program with different configuration (configured client for redistributed database). Computers count is not big - amount 10/20 PCs. Database must be scalable (a lot of data can be stored at the disk ~1/2 Tb). Every day up to 1 million rows can be inserted into database from one workplace. Each

In cassandra SASI custom index, need to change Analyzer class from StandardAnalyzer to NonTokenizingAnalyzer. Does it causes impact on any means?

放肆的年华 提交于 2019-12-13 03:56:10
问题 Which analyzer is costlier over time, disk space , based on search criteria over the data? Note: I'm using NonTokenizing Analyzer for the case-sensitive feature. 回答1: Analyzer_class : Analyzers can be specified that will analyze the text in the specified column. The NonTokenizingAnalyzer is used for cases where the text is not analyzed, but case normalization or sensitivity is required. The StandardAnalyzer is used for analysis that involves stemming, case normalization, case sensitivity,

Cassandra read_request_timeout_in_ms set up for external(Client) request

雨燕双飞 提交于 2019-12-13 03:01:50
问题 As per Documentation and given knowledge on the internet. It seems that the below-given properties - request_timeout_in_ms - write_request_timeout_in_ms - read_request_timeout_in_ms Works only for internal(server side) Cassandra requests. I was even convinced to this fact when I set these parameters in cassandra.yaml file to 80000 but still got the Timeout error against my Select query to a bit bigger record by following two ways: 1) when I tried to connect to Cassandra via cqlsh without

Mongodb Aggregation Rows to Columns

心已入冬 提交于 2019-12-13 02:36:51
问题 I have the following dataset. I need to group them by Account, and then turn the Element_Fieldname into a column. var collection = [ { Account:12345, Element_Fieldname:"cars", Element_Value:true }, { Account:12345, Element_Fieldname:"boats", Element_Value:false } ] This was my attempt to convert rows to columns, but its not working. db.getCollection('my_collection').aggregate([{ $match : { Element_Fieldname : { $in : ["cars", "boats"] } } }, { $group : { _id : "$Account", values : { $addToSet

NoSQL- Is it suitable for storing images?

只谈情不闲聊 提交于 2019-12-13 02:33:12
问题 I would like to store millions of images using a distributed fault tolerant system. While storing images in relational database has never been recommended, I was wondering if it is a suitable approach to store and manage image files in NoSQL databases. I would appreciate if you could share your experience in details here. (i.e. what NoSQL database did you use? it's advantages and disadvantages in this case, etc) Thanks 回答1: MongoDB has an API called GridFS which was made for storing binary

Cassandra not working with php

我只是一个虾纸丫 提交于 2019-12-13 01:28:33
问题 I am using cassandra with php. cassandra server and client. both have been started. It throws following error : Fatal error: Call to a member function write() on a non-object in C:\cassandra\thrift\Thrift.php on line 715 Call Stack # Time Memory Function Location 1 0.0010 395808 {main}( ) ..\cassandra_testFile.php:0 2 0.0409 3143872 CassandraClient->insert( ) ..\cassandra_testFile.php:46 3 0.0409 3143872 CassandraClient->send_insert( ) ..\Cassandra.php:606 4 0.0412 3146072 cassandra_Cassandra