full-text-search

Normalizing search text to full text search and where conditions

What you want is for users to just type in their search criteria just like they would in Google. Some words, maybe some quoted phrases, maybe a few operators, and have it just work. A .Net solution is available here: http://ewbi.blogs.com/develops/2007/05/normalizing_sql.html I am looking for a pure T-SQL version with where support als...

Does Oracle support full text search?

Is there an Oracle equivalent to MS SQL's full text search service? If so, has anyone implemented it and had good / bad experiences? ...

How do I use full text search accross multiple tables, SQL Server 2005

I have a full text catalog with two tables in it. tableA has 4 columns (a1, a2, a3, a4) of wich 3 are indexed in the catalog, a2,a3,a4. a1 is the primary key. tableB has 3 columns (b1, b2, b3, b4), two of which are indexed in the catalog, b3 and b4. b1 is the PK of this table, b2 is the FK to tableA. I want to do something like SELE...

Converting a Google search query to a PostgreSQL "tsquery"

How can I convert a Google search query to something I can feed PostgreSQL's to_tsquery() ? If there's no existing library out there, how should I go about parsing a Google search query in a language like PHP? For example, I'd like to take the following Google-ish search query: ("used cars" OR "new cars") -ford -mistubishi And turn ...

mysql fulltext against()

I am trying to create a search page with MySQL fulltext. I have a search page with a textbox: < FORM NAME ="form1" METHOD ="POST" ACTION ="catalog.php?action="> I pass the user's input to another webpage (catalog.php) which runs the query: "SELECT * FROM books WHERE MATCH (title) AGAINST (???)" What do I place in the against() functi...

Oracle Text: How to sanitize user input

If anyone has experience using Oracle text (CTXSYS.CONTEXT) and wondering how to handle user input when the user wants to search for names that may contain an apostrophe. Escaping the ' seems to work in some cases, but not for 's at the end of the word - s is in the list of stop words, and so seems to get removed. We currently change s...

Compass Search Annotations cause compiler errors

I'm trying to use the @Searchable annotations from the Compass search engine in my Java program, but I receive a compile-time error: "type mismatch: cannot convert Searchable to Annotation". I have included all of the jar files that I can think of, and scoured the web for working examples to no avail. Does anyone have a working example...

What is Full Text Search vs LIKE

I just read a post mentioning "full text search" in SQL. I was just wondering what the difference between FTS and LIKE are. I did read a couple of articles but couldn't find anything that explained it well. Thanks. ...

MySQL Fulltext Search Score Explained

I've been experimenting with fulltext search lately and am curious about the meaning of the Score value. For example I have the following query: SELECT table. * , MATCH ( col1, col2, col3 ) AGAINST ( '+(Term1) +(Term1)' ) AS Score FROM table WHERE MATCH ( col1, col2, col3 ) AGAINST ( '+(Term1) +(Term1)' ) In the results for Score I'v...

How do you add weights together in an oracle text index?

I have created a multi column datastore on a table that allows me to do full text indexing on the table. What I need to be able to do is weight each column different and add the scores together. The following query works, but is slow: SELECT document.*, Score(1) + 2*Score(2) as Score FROM document WHERE (CONTAINS(documentContent, 'the_...

Optimal data architecture for tagging, clouds, and searching (like StackOverflow)?

I'd love to know how Stack Overflow's tagging and search is architected, because it seems to work pretty well. What is a good database/search model if I want to do all of the following: Storing Tags on various entities, (how normalized? i.e. Entity, Tag, and Entity_Tag tables?) Searching for items with particular tags Building a ta...

Ranking method used by SQL Server for Fulltext indexing

I'm having some problems with the ranking used by fulltext search in SQL Server. Suppose a user searches for two words, "foo bar". We assume the user intends to do an OR search, so we pass "foo OR bar" to our CONTAINSTABLE call. What we're finding is that an row that contains "foo" 10 times but does not contain "bar" will have a much ...

SQL Server Full Text Search

How do I setup SQL full search in SQL Server Express 2005 and 2008? Are there any helpful queries that a dba should know? ...

How do I add the condition "IS NOT NULL" to a Thinking Sphinx search

I'm using Thinking Sphinx for full-text search, following this video. I'd like to do the following: @articles = Article.search(params[:search], :conditions => "published_at IS NOT NULL", :order => :created_at) The problem is that this doesn't work. It seems that the search method only accepts conditions that are a hash. I've tried a ...

Creating a fulltext index on a view in SQL Server 2005

I am having troubles creating a fulltext index on a view in SQL Server 2005. Reviewing the documentation I have not found the problem. The error message I receive is: "'Id' is not a valid index to enforce a full-text search key. A full-text search key must be a unique, non-nullable, single-column index which is not offline, is not defi...

Using full-text search with PDF files in SQL Server 2005

I've got a strange problem with indexing PDF files in SQL Server 2005, and hope someone can help. My database has a table called MediaFile with the following fields - MediaFileId int identity pk, FileContent image, and FileExtension varchar(5). I've got my web application storing file contents in this table with no problems, and am able...

Full text search on a mobile device?

We'll soon be embarking on the development of a new mobile application. This particular app will be used for heavy searching of text based fields. Any suggestions from the group at large for what sort of database engine is best suited to allowing these types of searches on a mobile platform? Specifics include Windows Mobile 6 and we'll ...

Retrieving SQL Server Full Text Index terms

Using Lucene, one can retrieve the terms contained within in an index, i.e. the unique, stemmed words, excluding stop-words, that documents in the index contain. This is useful for generating autocomplete suggestions amongst other things. Is something similar possible with MS SQL Server full text indices? ...

How can I grab each page of text in a Word doc separately (using .NET)?

I need to determine which pages of a Word document that a keyword occurs on. I have some tools that can get me the text of the document, but nothing that tells me which pages the text occurs on. Does anyone have a good starting place for me? I'm using .NET Thanks! edit: Additional constraint: I can't use any of the Interop stuff. e...

Handling MySQL Full Text Special Characters

When using MySQL full text search in boolean mode there are certain characters like + and - that are used as operators. If I do a search for something like "C++" it interprets the + as an operator. What is the best practice for dealing with these special characters? The current method I am using is to convert all + characters in the dat...