indexing

Indexing on several fields in mongoDB

余生颓废 提交于 2019-12-25 16:36:15
问题 I need to store information per object in MongoDB. Each object can have a variable number of attributes, each attribute name may also be different. Object 1: name : "Cupboard Number 1" type: "Cupboard" material : "Wood" dimensions : "12X15" built on : "2nd oct 2014" id : 12212 Object 2: name : "Tommy" type : "Pet" owner : "Tom" born : "1 June 2010" id : 12321 So each object may have different attributes/fields. I'd like to have the flexibility to query on this database by filtering on any

how to select grid view row by entering index in a text box

喜欢而已 提交于 2019-12-25 15:32:08
问题 i am working on a web application in asp.net c#. My project is that download mails from g mail and show it in a grid view.i have downloaded mails and displayed in grid view.in my website all the controls are selected only using keyboard keys.i need to select each row from grid view without mouse click by simply enter the row index in a text box then redirect to another page.i tried the code in another grid view and its worked how select grid view row by entering index in a text box but when i

MySQL JOINS without where clause

一个人想着一个人 提交于 2019-12-25 15:19:13
问题 I know that in MySQL SQL it only makes sense to index those fields you use in the WHERE clause. But if you are using JOINS, i believe that the JOIN also acts as the WHERE clause because it is comparing two fields. For example: select b.name, p.location from Branch as p, Person as p where b.id = p.id; is the same as select b.name, p.location from Branch as p INNER JOIN Person as p ON (p.id = b.id); So my understanding is that the INNER JOIN = WHERE clause in a way, or translated that way by

MySQL JOINS without where clause

拜拜、爱过 提交于 2019-12-25 15:16:50
问题 I know that in MySQL SQL it only makes sense to index those fields you use in the WHERE clause. But if you are using JOINS, i believe that the JOIN also acts as the WHERE clause because it is comparing two fields. For example: select b.name, p.location from Branch as p, Person as p where b.id = p.id; is the same as select b.name, p.location from Branch as p INNER JOIN Person as p ON (p.id = b.id); So my understanding is that the INNER JOIN = WHERE clause in a way, or translated that way by

SQL Server indexing - varchar(100) vs varbinary(100)? [convert data]

ⅰ亾dé卋堺 提交于 2019-12-25 14:19:13
问题 Is it better to set an index (primary or secondary) on a varchar(x) or varbinary(x) column? I wasn't sure it even mattered. However what I see online (Googled - varchar vs varbinary) is that varchar is almost dead or being pushed to the way side. So is this better to index or something? Could it be the type of index? Excellent scenario: Indexing email addresses ( [edit] encrypted byte array {varbinary} or string equivalent {varchar}) Thanks Answer? It seems that indexes on varbinary is the

Get (row,col) indices of max value in dataframe

醉酒当歌 提交于 2019-12-25 13:19:54
问题 I have a data frame that looks something like this. import pandas as pd data = [[5, 7, 10], [7, 20, 4,], [8, 1, 6,]] cities = ['Boston', 'Phoenix', 'New York'] df = pd.DataFrame(data, columns=cities, index=cities) Output: Boston Phoenix New York Boston 5 7 10 Phoenix 7 20 4 New York 8 1 6 And I want to be able to find the city pair with the greatest value. In this case I would want to return Phoenix,Phoenix. I have tried: cityMax = df.values.max() cityPairs = df.idxmax() The first one only

SOLR index and extract .sh and .sql files

纵饮孤独 提交于 2019-12-25 12:46:10
问题 Recently I have set up an image with SOLR. My goal is to index and extract files on a Windows and Linux server. It is possible for me to index and extract data from multiple file types. This is done by the SOLR CELL request handler. See the post.jar cmd below. j ava -Dauto -Drecursive -jar post.jar Y:\ SimplePostTool version 1.5 Posting files to base url localhost:8983/solr/update.. Entering auto mode. File endings considered are xml,json,csv,pdf,doc,docx,ppt,pp tx,xls,xlsx,odt,odp,ods,ott

Redirection everything to index.php

╄→гoц情女王★ 提交于 2019-12-25 12:41:15
问题 I wan't to redirect everything to index.php exepept if a file or directory exists. I try'd a few ways from Google, but that really slowed the website down and don't really work so i amused that i got things wrong. So URL like this: `site.com/Projects/S01/ -> site.com/Projects/S01/index.php (original)` `site.com/Projects/GE5/ -> site.com/Projects/GE5/index.php (original)` `site.com/Projects/ -> site.com/index.php` `site.com/Websites/ -> site.com/index.php` `sits.com/Testifcate/ -> site.com

Accessing pandas DataFrame as a nested list

时光怂恿深爱的人放手 提交于 2019-12-25 09:43:12
问题 I've used the .set_index() function to set the first column as my index to the rows in my dataframe: >>> import pandas as pd >>> df = pd.DataFrame([['x', 1,2,3,4,5], ['y', 6,7,8,9,10], ['z', 11,12,13,14,15]]) >>> df.columns = ['index', 'a', 'b', 'c', 'd', 'e'] >>> df = df.set_index(['index']) >>> df a b c d e index x 1 2 3 4 5 y 6 7 8 9 10 z 11 12 13 14 15 How should the dataframe be manipulated such that I can be accessed like a nested list? e.g. are the following possible: >>> df['x'] [1, 2

Using several database setups with Lucene.Net

牧云@^-^@ 提交于 2019-12-25 09:35:36
问题 Hi I am developing a search function for an web application with Lucene.Net and NHibernate.Search. The application is used by a lots of companies but is runned as a single service, using different databases for different companies. Therefore I would need an index directory for each database rather than one directory for the entire application. Is there a way of achieve this in Lucene.Net? I have also considering storing the indexes for each company in there respecitive database but havent