querying Questions

27

Solved

Is there a (roughly) SQL or XQuery-like language for querying JSON? I'm thinking of very small datasets that map nicely to JSON where it would be nice to easily answer queries such as "what are al...
Rennes asked 22/4, 2009 at 14:21

4

Solved

I would like to make a search on a collection in my mongodb database. In my collection, I have documents with the field "name" can be values like: [i] "Palácio Guanabara", "Palácio da Cidade", "Fe...
Tachylyte asked 15/4, 2016 at 12:31

11

Solved

Edit: This Question is outdated, and I am sure, new documentation and more recent answers are available as of now. I want to retrieve data of only a single document via its ID. My approach with exa...
Lyrate asked 28/11, 2018 at 10:33

3

Solved

Why doesn't the following work? SELECT name FROM (SELECT name FROM agentinformation) I guess my understanding of SQL is wrong, because I would have thought this would return the same thing as ...
Antisthenes asked 7/1, 2011 at 20:27

2

Solved

I'm using Elasticsearch v2.3.0. Suppose I have an index with mapping: { "mappings": { "post": { "dynamic": false, "_source": { "enabled": true }, "properties": { "text": { "norms": { "ena...
Horrid asked 14/4, 2016 at 9:10

0

I have the following models: from django.db import models from foo.bar.models import Location class AbstractShop(models.Model): location = models.ForeignKey(Location, on_delete=models.CASCADE, r...
Harl asked 1/10, 2020 at 10:11

2

Solved

I have two databases that I have to use in my application. I have the following in my mongoid.yml: development: # Configure available database sessions. (required) sessions: # Defines the defau...
Appalachian asked 6/5, 2013 at 14:4

1

Solved

I am having an issue where when I use the match_phrase_prefix query in Elasticsearch, it is not returning all the results I would expect it to, particularly when the query is one word followed by o...
Parnassian asked 8/11, 2017 at 14:20

3

Solved

There were some code examples for django pagination which I used a while back. I may be wrong but when looking over the code it looks like it wastes tons of memory. I was looking for a better solut...
Blare asked 23/4, 2013 at 5:36

6

Solved

I am building a notes system on my site and I've got to the stage where users can post notes into the MySQL database using PHP and then PHP prints them out on a page. However, when they print/echo ...
Concenter asked 27/8, 2011 at 14:3

3

I have a database of URLs that I would like to search. Because URLs are not always written the same (may or may not have www), I am looking for the correct way to Index and Query urls. I've tried a...
Sociable asked 13/1, 2011 at 18:59

1

Solved

We have a Jenkins job that runs builds using specific parameters. Two of these parameters are important for me: the machine that the build is being deployed on, and the version number of the packag...
Roanna asked 22/7, 2016 at 19:41

3

Solved

I cannot find out of how to check, if some value are in array property in mongo document. For example, I have some collection users, and such document: { 'name':'Paul', 'age':43, 'frien...
Yoruba asked 15/4, 2013 at 10:10

3

Solved

I'm trying to query a varbinary column that contain a file (1,2 Gb). I'm using Entity Framework. See below: Database to test CREATE TABLE [dbo].[BIGDATA] ( [id] [bigint] IDENTITY(1,1) NOT NULL,...
Ludovika asked 7/7, 2014 at 14:37

2

Solved

I am having hard time optimizing my SQLAlchemy queries. My SQL knowledge is very basic, and I just can't get the stuff I need from the SQLAlchemy docs. Suppose the following very basic one-to-many...
Bottoms asked 23/7, 2014 at 16:57

2

Solved

I have a collection where some of the objects feature an key foo. I now try to query for all objects that indeed have this key but not with the specific value bar. For this I use the following quer...
Basle asked 10/5, 2014 at 4:43

1

Solved

I'm using elasticsearch 0.90.10 and I want to perform a search on it using a query with aggregation functions like sum(), avg(), min(). Suppose my data is something like that [ { "name" : "Al...
Baku asked 21/1, 2014 at 10:1

4

Solved

I have a collection with entries that look like : { "userid": 1, "contents": [ { "tag": "whatever", "value": 100 }, {"tag": "whatever2", "value": 110 } ] } I'd like to be able to quer...
Derekderelict asked 8/6, 2011 at 14:21

3

Solved

How can I query the smoothies that have apple in them? (below is a collection with 3 documents) _id => 1 name => 'best smoothie' ingredients => Array ( [0] => apple [1] => raspb...
Lenz asked 22/7, 2010 at 11:5

2

Solved

Let's say I do have a document like this: { _id: "cow", comments: [ {user: "karl", comment: "I like cows.", at: /*a date*/}, {user: "harry", comment: "Cows are the best.", at: /*a date*/} ] }...
Roundup asked 17/12, 2011 at 15:28

1

Solved

When I run below stored JavaScript function I get errors: > db.system.js.save({_id:"last_n_users", value: function(n){return db.users.find().sort({created_at:-1}).limit(n)}}) > db.eval("last...
Tucana asked 9/10, 2011 at 1:57

4

Solved

I'm looking up ObjectIds everywhere, as if they're cake. Is this OK? _id fields are supposed to be looked up like crazy, right?
Sleuth asked 1/7, 2011 at 19:36

3

I want to load root entities and eager load all it's child collection and aggregate members. Have been trying to use the SetFetchMode in FluentNHibernate, but I am getting duplicates in one of the...
Bialystok asked 2/6, 2009 at 0:11
1

© 2022 - 2024 — McMap. All rights reserved.