Questions tagged [querying]
516 questions
7
votes
3 answers
Indexing and Querying URLS in Solr
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 few things, and I think I'm close but not sure why…

KidA78
- 81
- 2
- 3
7
votes
2 answers
Connecting to two databases Mongoid
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 default session. (required)
default:
#…

senthil
- 1,307
- 1
- 11
- 23
6
votes
1 answer
How to find and query a specific build in Jenkins using the Python Jenkins API
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 package that is…

shanwar
- 319
- 1
- 2
- 19
6
votes
1 answer
Using aggregation functions in Elasticsearch queries
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" : "Alice",
"grades" : [40, 50, 60, 70]
…

ovunccetin
- 8,443
- 5
- 42
- 53
6
votes
3 answers
MongoDB query check if value in array property
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,
'friendsIDs': [ ObjectId('qqq...'), ObjectId('www...'),…

Void Floyd
- 161
- 1
- 1
- 11
5
votes
1 answer
MongoDB: Error executing stored JavaScript function
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_n_users(10)")
Here is the errors:
{ "value" : "DBQuery:…

Zeck
- 6,433
- 21
- 71
- 111
5
votes
1 answer
Puppeteer document.querySelectorAll only returning undefined in a loop "TypeError: Cannot read properties of undefined (reading 'innerHTML')"
I am trying to programmatically access data in tables from the page https://rarity.tools/upcoming/ in javascript. Since the site loads through javascript, I've been using puppeteer. The site has multiple tables (4 total) and I would like to be able…

KL.Sea
- 51
- 2
5
votes
1 answer
How to find the index of the first row of a matrix that satisfies two conditions in APL Language?
One more question to learn how to use APL Language.
Suppose you have an array, as an example:
c1
c2
c3
c4
c5
c6
3
123
0
4
5
6
3
134
0
2
3
4
3
231
180
1
2
5
4
121
0
3
2
4
4
124
120
4
6
3
4
222
222
5
3
5
So, how to find out which…

Rodrigo Miranda
- 71
- 4
5
votes
0 answers
Django: Use a different related_name than "%(class)s" on abstract base classes to account for irregular plurals
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, related_name="%(class)s")
class Meta(self):
…

C4X
- 87
- 8
5
votes
1 answer
When should we use the aggregation pipeline mongodb?
When should I use the aggregation pipeline?
Scenerio: I have some mongo db documents like this
`
{
id:"",
text:"",
dept:"",
group:"",
parent:"",
}
`
Now I need to prepare a tree structure out of it using the parent…

Yashdeep Hinge
- 382
- 2
- 14
5
votes
2 answers
Query users by name or email address using Firebase (Swift)
I'm quite new to Firebase and Swift and I'm having some trouble when it comes to querying.
So there are basically two things I'd like to do:
Query my users and find only those that contain a certain String in their name (or email address) and add…

X.X_Mass_Developer
- 717
- 1
- 8
- 23
5
votes
1 answer
Laravel Querying Relations Model::has('relation') doesn't work
In the Laravel documentation it says you can use this syntax for querying an object relation to get only the Posts that have at least one Comment:
$posts = Post::has('comments')->get();
I'm trying something similar where I want to fetch only…

Mat
- 187
- 2
- 10
4
votes
1 answer
How to make a query in this nested document structure (MongoDB)?
(Sorry if it's a trivial question.)
I have documents that looks like this (Python syntax):
{
'_id': SomeObjectId,
'features': [
{'id': 'featureX' , 'value': 6},
{'id': 'featureY', 'value': 45}
…

ixi
- 140
- 6
4
votes
3 answers
What is the best practice to query dates in SQL when parameterised queries are not possible
My brief is to implement a interface which has a method that looks something like 'GetValuesSqlStatement' below:
public string SqlPattern { get { ... } }
//this varies; eg. "SELECT name FROM someTable WHERE startDate < {0}"
public string…

Lisa
- 4,333
- 2
- 27
- 34
4
votes
0 answers
Complex Queries in Firestore / Realtime database and modeling for querying
I have a problem doing complex queries in Firestore database. I have read the documentation countless times so I know where the limitations are, but I wonder whether there is a way to structure the data so it supports my use cases. Let me explain…

marstaj
- 51
- 4