indexing

Symfony with Zend Lucene and related models (with foreign keys)

Well I was developing an application usin Symfony 1.4 and Doctrine when I realized a major drawback on my Zend Lucene implementation. I have a model called Publication that is related (via foreign key relations) with a few other models (subjects, genres, languages, authors, etc.) and I'm getting they're names when adding a new document ...

MySQL Query sometime OK, other times takes 5 min!

Hi, I have a table I use for high scores of an iPhone game. As of now the query is disabled so gamers are not able to see scores :-( Table has the following fields: Type Collation Attributes Null Default Extra Action id int(11) No auto_increment date date No ...

How to write an index loop for a json object

I have an image updater. I am loading by JSON the exact same file/partial that show my images. I would like to write a loop that runs through an index and replaces every image with its equal. This is the first div in my json object : [{ "photo": { "position":1, "photo_file_size":45465, "created_at":"2010-10-05T09:51:13-0...

With this typical query, are these indexes on my InnoDB table correct or should I change them?

I have a php query that runs fairly often like this one: $query = 'SELECT * FROM work_orders ' .'WHERE ' . "((end_time >= ?" . "AND start_time <= ?) " . "OR (start_time <= ? " . "AND end_time >= ? ) " . "OR (start_time >= ? " . "AND end_time <= ? )) "; And a table defined as: CREATE TABLE IF NOT ...

designing index for a web-cms database

Hi, I have a question, would you please help me? I have designed a database for a web-cms, in the User table_ which includes : UserID, Username, Password, FirstName, LastName, …_ which is the best choice that I have to create the index on it, username or FirstName and LastName? Or both of them? By default the UserID is the clustered in...

When is preferred to use a standard index instead of a background index in MongoDB?

MongoDB 1.6 allows to define indexes to be run as background operations. Background indexes seems to be a little slower, but doesn't block other write/read operations so they seems to be the best choice when you need to create indexes on databases already populated with some data. However, even with empty collections, background indexes...

Index a bunch of text files

Hi community, I have to search a huge number of text files (all over a Unix server disks') for a given string (I have to). Given the time and resources this will take, I'm thinking coming out with the list of files that do contain the token in question is a meager result, compared to the investment. This feels wrong. Considering that ...

How to optimize a query that's using group by on a large number of rows

The table looks like this: CREATE TABLE `tweet_tweet` ( `id` int(11) NOT NULL AUTO_INCREMENT, `text` varchar(256) NOT NULL, `created_at` datetime NOT NULL, `created_date` date NOT NULL, ... `positive_sentiment` decimal(5,2) DEFAULT NULL, `negative_sentiment` decimal(5,2) DEFAULT NULL, `entit...

Numpy sorting help

In Numpy, how do I create an array of indices which can be used return the values of the source array in sorted order? eg: Source: [[4 2 6 7] [1 4 8 9] [3 1 0 3]] Indices: [10 4 9 1 8 11 0 5 2 3 6 7] ...

Which embedded database to use for file indexing applications

Hi, I need to develop a file indexing application in python and wanted to know which embedded database is the best one to use for indexing. Any help on this topic is appreciated. Thanks, Rajesh ...

What indexes will I need to make on this SQL Server table?

Hi folks, I have the following sql query for a SQL Server 2008 db. SELECT TOP(@NumberOfStreetResults) LocationType, LocationId, Name FROM [dbo].[LocationNames] WHERE CONTAINS(Name, @SearchQuery) AND LocationType = 7 Notice how I'm using the CONTAINS keyword? I have an FTS on the Name field. I'm not sure what index(s) I need to ...

Inverse index binary format

Hi i'm trying to figure out what kind of binary file can support my needs for inverse index. Let say that i have document that i can identify with unique ID and each document can have 360 fixed values in range of 0-65535. Something like this: Document0: [1, 10, 123, ...] // 360 values Document1: [1, 10, 345, ...] // 360 values Now, i...

How to increase timeout for Solr

I am updating my index using Solr. I understand that to increase the timeout duration of the transaction in Jetty. But I can't seem to find the settings file i.e. XML config file. Where is it located? I am using Solr 1.4.1 Thanks ...

How to maintain lucene indexes in azure cloud-app

Hi, I just started playing with the Azure Library for Lucene.NET (http://code.msdn.microsoft.com/AzureDirectory). Until now, I was using my own custom code for writing lucene indexes on the azure blob. So, I was copying the blob to localstorage of the azure web/worker role and reading/writing docs to the index. I was using my custom loc...

Best index for multiple variables to avoid an OR

hello all, i am building an application that will behave more or less like google adwords and i am at the point where i build the impression engine. we will have campaigns running based on geolocation of the user. based on his IP we will determine his state, city, approximate lat/long. on the other side we will have ads running on differ...

impact of index in SQL query

Suppose there are two indexes on a table index1 on col1,col2 index2 on col3 Please tell me, whether in below case index will help? .. where col1,col4 .. where col3,col4 .. where col1,col3 .. where col1,col2,col3,col4 *note, i wrote where clause only without specifying the conditions. Only used column are mentioned I am using D...

how to implement n:m relation in java?

Sorry for this newbie question, but I just never worked with java... My problem is I need to implement an n:m relation in java. The use case is a catalog. a product can be in multiple categories a category can hold multiple products the classic... My current solution is to have a mapping class that has to hashmaps. The key of the ...

is there any efficient way to get node by key (better than linear hashing or btree)?

Hi! I'm looking for efficient algorithm for storing and fetching data by key. I've already read about Litvin linear dynamic hash and another methods, but still, i wonder is there some way to get (search, calculate) key in VERY large binary file (consider more than 100 gb)? I'm just curios is there ANY algorithm which works without perf...

jQuery - Trouble With Index Numbering Tag Elements

I'm building a jQuery plugin that works with multiple unordered lists. I want to be able to give each li tag in each list an index-numbered class name, starting over with 1 in each list, like so: <ul class="ui-tabs-panel"> <li class="col-1">column 1</li> <li class="col-2">column 2</li> <li class="col-3">column 3</li> </ul> <...

is there is any indexer other than lucene

Possible Duplicate: Which are the best alternatives to Lucene? hello, is there is any other indexer other than lucene compartable with java /c++ ...