full-text-search

SQL Server 2008 Full-Text Search (FTS) extremely slow when more than one CONTAINSTABLE in query

SQL Server 2008 Full-Text Search (FTS) is extremely slow in this scenario: Query 1: SELECT [...] FROM ContentItem CI WHERE (EXISTS (SELECT TOP 1 * FROM CONTAINSTABLE([Table1], *, '"[search_string]*"') FT WHERE FT.[Key] = CI.ContentItem_Id)) ORDER BY [...] Results: super fast on SQL 2005 and SQL 2008 Query 2: SELECT [...] FROM Con...

how to do reverse fulltext search in MySQL?

By default it's like this: select * from main_table where match(col1,col2) against('search_item'); but what I want to fetch is the reverse, say,I've restored all the search_item(1000 records,for example), and I want to see which of them matches a specified row in main_table. Is that doable? ...

Multi-Term Wildcard queries in Lucene?

I'm using Zend_Search_Lucene, the PHP port of Java Lucene. I currently have some code that will build a search query based on an array of strings, finding results for which at least one index field matches each of the strings submitted. Simplified, it looks like this: (Note: $words is an array constructed from user input.) $query = new...

Solr Query on Unique Integer Field

I have a field defined in schema.xml as: <field name="id" type="integer" indexed="true" stored="true" required="true" /> It is also the uniqueKey for the schema. I cannot perform a query on this field with the query url: /select?q=4525&qf=id&fl=id,name%2Cscore This returns no results, however, if I search on a different field(such...

How to correctly parse a mixed latin/ideographic full text query with regex?

I'm trying to sanitize/format some input using regex for a mixed latin/ideographic(chinese/japanse/korean) full text search. I found an old example of someone's attempt at sanitizing a latin/asian language string on a forum of which I cannot find again (full credit to the original author of this code). I am having trouble fully underst...

full text search, filter results for best match

I have 3 tables that link up. Restaurants, Cuisines and Cuisine Type. A Restaurant can sell many cuisines of food (that's bad wording but you get idea?) So I have Full text setup on Restaurant:Name, CityTown, Postcode and on CuisineType:Name I have one searchbox on my home page and as the user types results are filtered to best match....

How to exclude searching specified fields using Zend Search (Lucene)

I've built a search index using the PHP Zend Framework Search (based on Lucene). The search is for a buy/sell website. My search index includes the following fields: item-id (UnIndexed) item-title (Text) item-description (UnStored) item-tags (Text) item-price (keyword) seller-id (UnIndexed) seller-name (Text) I want the user to sear...

Is there a programmatic way to influence the rank of search results in MOSS (Sharepoint) 2007?

Searches in Sharepoint rely on SQL Server as far as I know. I have an internal search project based on MOSS 2007, where users can search keywords in archives. My idea is to take some statistics data (page hits, recent visits, user voting, etc.) into consideration and affect the final rank returned to the user. So, is there a way to inf...

Thinking Sphinx Search Box

I'm trying to get Thinking Sphinx running on my site but I'm not sure how to set up the search box and button for the index page. I have in my model: define_index do indexes :name indexes description where "approved = 'true'" end In my controller: def index @businesses = Business.search params[:search] end And in my in...

Lucene and access control (visibility of comments)

Imagine this simple scenario for full text search: Articles with Comments. I want to search articles also by text in comments. That alone is fairly simple to implement. Not all comments are visible to all users though. User that writes comment can also restrict it's visibility to concrete Role (so comment has 2 fields: text and role). ...

MS-SQL 2005 full-text index on a view with outer joins

I have a view that I'd like to apply a full text index on. It of course needs a unique clustered index to allow for the full text index. Unforunately, I learned that you cannot create an indexed view that contains outer joins. Problem is that my view needs these outer joins! Is there a way to make this happen, or am I going to be stuck...

Fast 'Find in Files' for VIM?

What are some options for getting really fast 'Find in Files' searching in VIM? Our codebase is large enough that searching needs to work off an index. grep/vimgrep/etc are too slow. Indexing doesn't need to be particularly fast; I can index overnight. Thanks, [EDIT] I'm also working in a Windows environment. ...

MS-SQL 2005 search: conditional where clause with freetext

I'm writing a fairly complex stored procedure to search an image library. I was going to use a view and write dynamic sql to query the view, but I need to use a full text index, and my view needs outer joins (http://stackoverflow.com/questions/1094695/ms-sql-2005-full-text-index-on-a-view-with-outer-joins) So, I'm back to a stored proc...

Is Sharepoint 2003/MOSS 2007 able to return a document snippet containing search terms?

Is there a search API for getting a short text containing the search terms so that I can use to display to users? ...

Multiple-index searching in Lucene (hibernate search)

Official Lucene Feautures site states that lucene supports "multiple-index searching with merged results". Is it possible to do this with hibernate search somehow? My usecase: Aricle with Comments. I want to have two separate indices: one for articles and one for comments. I want to be able to find article also by match in one of comm...

Classifying english words into rare and common

Hi all, I'm trying to devise a method that will be able to classify a given number of english words into 2 sets - "rare" and "common" - the reference being to how much they are used in the language. The number of words I would like to classify is bounded - currently at around 10,000, and include everything from articles, to proper noun...

.Net and sql server Search

I have an asp.net web application written in C# using a SQL Server 2008 database. The database contains events with information across a number of tables such as event, venue, city and bands playing. In the ideal world I'd like my users to enter a natural lanaguage type query in a single search box along the lines of "The Who in Brisban...

search for winforms datagridview

I'm looking to implement a search box for a datagridview control similar to let's say firefox Control-F which would bring up a search box and on finding a match the row would be highligted etc. Is there any similar functionality perhaps using Lucene.net or similar ? Note - this would be different than say DataTable.Search() as the # of...

What associations should I use to be able to sort search results by an associated model in a rails app?

Hi all, I'm currently writing an app that pulls all the tweets from twitter with links in them and puts them into our searchable database. Our database tables look like this: Tweets content tweet_id Links url title count User username user_image We'd like to be able to search through the tweet.content column for a s...

MySQL full text search across multiple tables

I have a series of tables that contain data I want to full text search. I've tried combining the tables with UNION, but the result loses its fulltext index so can't be fulltext searched. I don't think that putting the data into a temp table is the way to go. Is there someway that I can fulltext search these tables efficiently? Thanks in...