indexing

Using Lucene like a relational database

I am just wondering if we could achieve some RDBMS capabilities in lucene. Example: 1) I have 10,000 project documents (pdf files) which have to be indexed with their content to make them available for search. 2) Every document is related to a SINGLE PROJECT. The project can contain details like project name, number, start date, end dat...

SQL Server 2005 indexing same columns in different order

I have a report that was taking a long time to execute. I ran the database engine tuning advisor and one of the recommendations was to create 2 indexes. However, I noticed that the indexes were the same columns, but in different orders. Here is the table: ---Locations--- | *LocationID | | Code | | ...more... | | DivisionID |...

ms sql server; index on TEXT column

I have a database table with several columns; most of them are VARCHAR(x) type columns, and some of these columns have an index on them so that I can search quickly for data inside it. However, one of the columns is a TEXT column, because it contains a very large amount of data (23 kb of plain ascii text etc). I want to be able to sear...

Is there a difference between id,date or date,id index in sql server

I'm creating an index in sql server 2005 and the discussion with a coworker is if it makes a difference between index key columns being id and date vs date then id. Is there a fundamental difference in the way the index would be created in either scenario? Would it make a difference in other versions of SQL server? Thanks ...

Entity metadata storage architecture

We are building a solution for document storage and for each document we need to store a lot of extra metadata with it to comply with local regulations, ranging from basic data like title or description to dates of relevant events or disposition and classification rules. I've seen different types of solutions, but none convinces me: T...

Can I have a deferrable unique functional index in Oracle?

I'd like to create a deferrable unique functional index in Oracle 10g. I know how to create a unique functional index: create unique index LIST_ITEM_ENTRY_NO_UNIQ on LIST_ITEM (case status when 'cancel' then null else LIST_KEY end, case status when 'cancel' then null else ENTRY_NO end); I know how to create a deferrable...

How to add search functionality to my application

I am writing Windows application (with Borland C++ Builder), which stores large number of text files. I want users to be able to search these files very fast, so I need an indexing and search library. I do not use database, but my own file format for storing the documents (all are in a single file). Are there such libraries for Windows?...

C# StructLayout/FieldOffset and indexing in arrays

I'm having a bit of a problem using FieldOffset correctly with arrays. The code below is an example where it doesn't work correctly for me: [StructLayout(LayoutKind.Explicit)] public struct IndexStruct { [FieldOffset(0)] public byte[] data; [FieldOffset(0)] public short[] idx16; [FieldOffset(0)] public int[] idx32; } If I for ...

add SQL Server index but how to recompile only affected stored procedures?

I need to add an index to a table, and I want to recompile only/all the stored procedures that make reference to this table. Is there any quick and easy way? EDIT: from SQL Server 2005 Books Online, Recompiling Stored Procedures: As a database is changed by such actions as adding indexes or changing data in indexed columns, the origi...

What's a MySQL index table?

I need to speed up a query. Is an index table what I'm looking for? If so, how do I make one? Do I have to update it each insert? Here are the table schemas: --table1-- | --tableA-- | --table2-- id | id | id attrib1 | t1id | attrib1 attrib2 | t2id | attrib2 ...

Can my file (image) names be too long?

When outputting images from Photoshop that are over 31 characters I get a compatibility message? Is there a downside to making image names (or any filenames) too long? I want to make sure my web app displays my images correctly in all major browsers, including mobile, and that my image names get picked up by Google for indexing. For ex...

How do you Index Files for Fast Searches?

Nowadays, Microsoft and Google will index the files on your hard drive so that you can search their contents quickly. What I want to know is how do they do this? Can you describe the algorithm? ...

m2eclipse Indexing 3rd-party jars from Maven repository

Hi, I am using Nexus repository. and using Eclipse 3.4 with m2eclipse plugin installed. sometimes I need to upload jars that are not located in the central repositories (Like Sun jars). so I upload them under the "3rd-Party" section in Nexus. The problem is that when trying to add those jars as dependencies, eclipse does not index them ...

What indexes optimize this query with four joins?

I have an sql query with inner joins of four tables that takes more than 30 seconds with the current indexes and query structure. I would like to make it as fast as possible; at least faster than 5 seconds. I first thought about denormalizing, but read here that generally it should be possible to optimize via correct indexes etc. I cann...

What is the optimal indexing strategy for a relation table?

A relation table is the common solution to representing a many-to-many (m:n) relationship. In the simplest form, it combines foreign keys referencing the two relating tables to a new composite primary key: A AtoB B ---- ---- ---- *id *Aid *id data *Bid data How should it be indexed to provide opti...

How do you return a specific field from Sphinx results?

Assume I'm indexing a table of books. They have title, author, description, etc. I want to do a search across all fields and return the title of the books that contain my search term. I can do a search and return the book_id (doc_id) from Sphinx so I can look them up myself, but what would be really awesome is if Sphinx just gave me the...

asp.net: how to access to each element of dictionary without using key?

i want to access each object of my dictionary Dictionary with int index. hw to do that. ...

When is an index (in a DBMS) a bad index?

Can anyone tell me when an index is a bad index? ...

SQL query does not use available index (SQL Server 2008)

I have the following table in SQL Server 2008: Session ( sessionid varchar(10) startdate dateteime enddate dateteime --rest of the fields go here ) I have the following two nonclustered indexes created: Inddex1: SessionID,startdate,enddate Inddex2: startdate,enddate I have the following query select * from session where startdate>...

Does solr make faceting on empty String?

Last time I made a solr index, it started indexing and doing faceting on empty strings too. This never happened. It is the right behaviour? Should I filter empty strings in the DIH? Thanks. ...