Questions tagged [querying]

516 questions
0
votes
1 answer

Pulling hair out here... MongoDB querying

Simple queries are not working on my mongodb database. When in the console I run db.quads.find({}); I get all the documents in the 'quads' collection, one of which is: { "subject" : "u:http://dbpedia.org/resource/Tim_Berners-Lee", "predicate" :…
João Rocha da Silva
  • 4,259
  • 4
  • 26
  • 35
0
votes
1 answer

Using mongoDB index just in part of the query

I have a following situation: I have a collection with documents like {a: 1, b: 'some string', c: 5, d: 7 } {a: 2, b: 'some another string', c: 5, d: 8 } {a: 3, b: 'yet another string', c: 5, d: 9 } I allow users to search using custom…
0
votes
1 answer

Rails Query: Undefined Method for nil:NilClass

In my Rails app, I have projects that have many steps, and each step has many images. I'm trying to tag links to pages about each step with information about the step, particularly the name of the step and the default image associated with the…
scientiffic
  • 9,045
  • 18
  • 76
  • 149
0
votes
2 answers

Can you use Linq to find relationships between elements in a collection?

I have a List of Data, and I want to find the length of the longest sequence of elements in the list that are equal. This is easy to do with a loop over the collection, however I was wondering if there is a Linq query that can do this. Thanks for…
user200814
  • 275
  • 1
  • 3
  • 8
0
votes
1 answer

Is there a way I could filter values using the Model class?

I'm fairly new to ASP.NET MVC4 and I have a search/filter form where you can filter on multiple parameters So this is my controller public ActionResult Index(string page, int? neighborhoodID, int? accommodationType) { ... } I was thinking. I'm…
t0tec
  • 330
  • 4
  • 16
0
votes
3 answers

How to perform indexing/search on multiple tables in SolrNet

I am using SolrNet to index/search data on set of tables. I have two tables Category and Item. Both the tables have same fields, Hence i have a base mapping class form which i derive. [Serializable] [XmlRoot(ElementName = "SolrSearchEntity",…
Prasad
  • 137
  • 2
  • 12
0
votes
1 answer

what is the mongoose equivalent for the SQL query

select _id from project where projectName = '***' order by viewCount desc limit 5 i'm still new to mongoose and have a somewhat intermediate SQL understanding, here's my attempt of it as i'm trying to retrieve the ObjectId of the sorted…
bouncingHippo
  • 5,940
  • 21
  • 67
  • 107
0
votes
1 answer

Merging two insert queries with Transaction. However I need to grab the first insert's row ID

$db->query("INSERT into `users` (username, password, email) VALUES ('$username', '$hashpassword', '$email')"); $userid = mysqli_insert_id($db->link); $db->query("INSERT into `users logins` (userid, token, ip) VALUES ('$userid', '$token',…
ditto
  • 5,917
  • 10
  • 51
  • 88
0
votes
1 answer

Complex query mongodb c

I've created my mongodb query like this > 86 bson query[1]; 87 bson_init(query); 88 bson_append_start_object(query, "service.virtual_mach ine"); 89 bson_append_oid(query,"_id",result); 90 …
guisantogui
  • 4,017
  • 9
  • 49
  • 93
0
votes
1 answer

Are either of these methods more optimized for querying using Mongo Db Driver for C# than the other?

Are either of these methods more optimized for querying using Mongo Db Driver for C# than the other?: var partsLogs = MvcApplication.MongoLoggingDatabase.GetCollection("PartDetailLog") .FindAll() .Where(x => x.UserId ==…
user1408767
  • 677
  • 1
  • 8
  • 30
0
votes
1 answer

Querying Solr in different than English language

I have to admit that solr rocks. But the most important is the community response. Thank you once again! I hade made an index collection in English. I had build that for learning purposes. Now i want to index and query in Greek language. I noticed…
user734094
-1
votes
1 answer

How can I use BeautifulSoup for this Website

I managed to build a query tool that iterates through a list of fighter names to obtain their unique url on bestfightodds.com. However, now I am in conflict regarding how I can iterate a fighter's website to search the closing odds given a certain…
user54565
  • 21
  • 2
-1
votes
1 answer

SQL Server querying date issue

I have a column called CreatedDate in my table. It's defined as datatype VARCHAR instead of DateTime. I know for fact that there is a data which have greater date than 1/11/2023 but I'm not sure why it's not showing. It's returning/showing some…
aasenomad
  • 405
  • 2
  • 11
-1
votes
1 answer

How to get attributes of relations through query in Strapi

I am using Strapi's entity service to get data for all attributes including the relations attributes till the deepest relation. But following is providing me the data of only one level deep relation's attributes. How can I get all the deepest…
-1
votes
1 answer

How can i calculate the difference between values in different rows same column in Python?

I am dealing with a dataset of Nifty 2019 which has only two columns - Date and Close. I want to find the days where it was volatile (high > 105% of low). I am trying to shift the values, store them in a different place, and assign them to a…