Questions tagged [multikey]
78 questions
1
vote
0 answers
Create index on multikey and nested document using mongoose
I'm creating index using mongoose it will check uniqueness of Name, PName and OName (Name+PName+OName should be unique). Please check below implementation
var MySchema = new mongoose.Schema({
Name: { type: String, required:…

Shweta12345
- 11
- 1
1
vote
2 answers
Create a unique key for Map from multiple Enum types
I have a requirement where multiple enums will need to find a value in the i.e. Map (combination of enums will return a unique value).
I think there are many options like having a wrapper Object say Key which will act as a Key. Also, we…

prash
- 896
- 1
- 11
- 18
1
vote
2 answers
MongoDB not using multikey index
I have a MongoDB version 3.0.3 collection which contains documents with 2 fields:
A numeric long id
An array of 60 numeric Doubles.
I built a multikey index on the array and confirmed that the index exists and is multikey by using the…

Michael Sperling
- 21
- 3
1
vote
4 answers
Fast primitive int multi-key map?
For a project I'm working on, I try to create a multi-dimensional pivot on large data sets. I have all the keys I want to use as ints, so basically, I want to return a set of
( int1, int2, int3, .. intN ) -> (Aggregate1, Aggregate2, ... ,…

Rob Audenaerde
- 19,195
- 10
- 76
- 121
1
vote
1 answer
Multi key, linked hash
I have a set of elements with two properties, a name (string, not unique) and id (integer, unique). All elements with the same name are stored together, sorted according to some criteria.
Insertion is done just once as all elements are known…

Miguel
- 11
- 2
1
vote
2 answers
Java Map with container object keys, lookup by container object field value?
Let's say I have a simple Java object, let's call it DefinedData. It will contain a number of final fields of varying types, such as strings, integers, enums, and even perhaps a set or two of strings. All in all, it's just a relatively simple data…

user1017413
- 2,023
- 4
- 26
- 41
1
vote
1 answer
Can the same MongoDB document show up more than once in a single cursor using a mulitkey index?
I'm considering bundling time-sequence data together in session documents. Inside each session, there would be an array of events. Each event would have a timestamp. I know that I can create a multikey index on the timestamp of those events, but I'm…

Will Conant
- 11
- 1
1
vote
0 answers
Jqgrid multiselect, capture select checkbox (not click on row)
i have a jqgrid with
multiselect: true
I want to keep the selected checkbox when you change the page, so I add
onSelectRow: updateIdsOfSelectedRows,
onSelectAll: function (aRowids, isSelected) {
var i, count, id;
for (i = 0,…

Ezequiel
- 11
- 5
1
vote
1 answer
convert multi key list into multidimensional sorted map
I am using multi key bags in order to count occurrences of certain combinations of values and I was wondering if there is an elegant way to convert these bags into nested SortedMaps like TreeMaps. The number of nested TreeMaps being equal to the…

Marius
- 65
- 2
- 9
1
vote
0 answers
MultiKey FK fails in the child insert with Hibernate
I got the following code, the problem is that the child Mmt, doesn't get fill up the FK with the mmt.setMapMovAnomes(miMapMovAnomes) If I check in debug, the object mmt, have data into the parent property MapMovAnomes, then you don't get any error…

Cesar Quinteiro
- 21
- 3
1
vote
1 answer
MongoDB multikey : max (recommended, effective) number of keys?
I have "feeds" collection, each feed have comments. So when someone comments on feed, he is added to "subsribers" which is Mongo's multikey field.
feeds: {
_id: ...,
text: "Text",
comments: [{by: "A", text: "asd"},{by: "B", text: "sdf"}],
…

Roman
- 3,799
- 4
- 30
- 41
0
votes
1 answer
multikey value sorting in dictionary in python
a=[{"name":"sri",rank":5},{"name":"harish","rank":1},{"name":"adhya",rank":5},{"name":"mathi","rank":"NUL"}]
print(sorted(a,key=lambda i: (i['rank'], i['name'])) )
TypeError: '<' not supported between instances of 'str' and 'int'
want ouptput…
0
votes
0 answers
multi key encryption and decryption
I need some serious suggestions on my protocol, specifically for decryption.
So the scenario is Organizations A and B encrypt their employees' records with their own keys and store them in the distributed database.
When a User from Organization A…

Laila Tul Badar
- 1
- 1
0
votes
0 answers
How to encrypt data for multiple recipients using BouncyCastle C#?
I can use the following code to
generate keypairs for two users
the first user encrypts a message using their private key and the second user's public key
the second user decrypts the message using their private key and the first user's public…

Toxic Tom
- 174
- 12
0
votes
0 answers
Add integer array as key in uthash in c
I came across uthash, a opensource library for hash table implementation in c programming language. I found it good and decided to use it in my project. Right now I am stuck with one issue .
I stared with small implementation where I created a hash…

sachu
- 11
- 2