full-text-search

MySQL full text search (php)

Hi I'm trying to create a search box to search customer by last name and/or first name and/or phone number. Here is my SQL Query: SELECT * FROM customer WHERE Match(c_fname,c_lname,c_phone) Against('$keywords') My questions is Why does it work when i search for bill and not if i search for bob? Another question is how do i prio...

mysql fulltext is there a way to select relevance as a column?

I would like to know if there is a way I can select the relevance score as a column? So I can store for later manipulation Also is there any way (for trouble shooting) to determine why a row got a relevance? or what words matched. For example when I use WITH QUERY EXPANSION I am getting results and I do not know why they match. ...

Xapian Vs Sphinx performance comparison ?

Can you guys point me out performance difference between Xapian and Sphinx ? In terms of indexing and search? Currently i am using Sphinx and i am loving performance of it , but i read that Xapian have Indexer for many documents (Word/PDF/manyy) . ...

Using Language neutral fields in full text query!

Hi all, I have a table which hold multiple languages(English, French, Arabic, German). I also have full text index on the table. I also have two meta date fields that are independent of the languages. So for all the languages I need to query these fields. I have kept the meta data field as language neutral. But when I query the index us...

Is there any way to turn off the 50% gotcha on fulltext search?

I am trying to build a product search for a jewelry store. I know that if a term is in over 50% of the entries then it has a weight of zero. So right now if I do a search for "diamond" I get no results because over 50% contain diamond. Is there a way to change that? ...

php code to check for repeating characters / bogus text

hi there, i'm running a dating site and there is a place where people enter their profile - I already have a bad-words filter but now I have a problem where people enter a profile that is just garbage characters or just "aaaaaaaaaaaaaaaaaaaa" or "--------------" etc. I'm looking for an effective way of filtering out the long words of rep...

Django-Haystack + Whoosh - Are misspelling suggestions possible?

Hi folks, I'm using Whoosh and Django-Haystack. I would like to make use of query suggestions for when users mistype words. e.g. Maybe you meant "unicorn" Is it necessary to use another search engine? Or can I successfully achieve this with Whoosh? ...

have 3 FULLTEXT indexes on same table.. how to merge them?

on my table I have 3 different FULLTEXT indexes like so: FULLTEXT KEY `product_name` (`product_name`,`product_description`), FULLTEXT KEY `product_brand` (`product_brand`,`metal_type`,`primary_stone`,`product_type`,`product_type_sub`,`product_series`), FULLTEXT KEY `primary_stone_sub` (`primary_stone_sub`) This is because I added them...

c++ search text n boolean mode

Hi, basically have two questions. 1. Is there a c++ library that would do full text boolean search just like in mysql. E.g., Let's say I have: string text = "this is my phrase keywords test with boolean query."; string booleanQuery = "\"my phrase\" boolean -test -\"keywords test\" OR "; booleanQuery += "\"boolean search\" -mysql ...

How to add synonym dictionary to mysql FULLTEXT search?

That way if I search for the term "mens" the term "gentlemen" will match. I tried this: SELECT * FROM cart_product WHERE MATCH ( product_name, product_description, product_brand, metal_type, primary_stone, product_type, product_type_sub, product_series, primary_stone_sub ) AGAINST ( 'THESAURUS "english" EXPAND SYNONYM TERM OF "gentlem...

Full text search on SQL server 2008

Suppose I have a table with full-text index on column Firstname, lastname, email. There is on row in table like FirstName LastName Email ABC DEF TAN [email protected] Then I issued following sql: SELECT * FROM Person WHERE CONTAINS(*, 'hong'); I got many rows include above row. If I issued following sql:...

text search in javascript ?

I have a page with more than 200 links with this kind of formatting. <h1> <a href="somelink">Somelink</a> some text that explain the meaning of the link. </h1> Now, to make it bit easy to search through this link, i have put a search box. My requirement is to search through all this tag and find the links that are relevant to t...

CakePHP Searchable Plugin of Neil Crookes

I have a problem with the routing while using the Searchable Plugin of Neil Crookes. When I search for something the URL looks like this: http://localhost/search/All/sunshine But now all the other links have the name of the plugin in their URL. For example this: $html->link(__('News', true), array('controller'=>'news', 'action'=>'index...

Future proofing FULLTEXT search..

I have a FULLTEXT index called cart_product_fti on a table Whenever I use it, I have to list all the fields that are in the index exactly: MATCH (foo,bar,etc) My thoughts are, if later I decide to add/remove a field to the index, all the scripts are going to have to be updated or they will be broken. So I am wondering if there is a...

how to disable mysql's match query's 50% exclusion

So apparently if a Mysql table's fulltext index contains a keyword that appears in 50% of the data rows, that keyword will be ignored by the match query So if I have a table with the fulltext index 'content' which contains 50 entries and 27 of the entries contains the word 'computer' in the content field, and I run the query: SELECT *...

How do I improve SQL Server query performance when doing a LIKE over many columns.

My query needs to do a LIKE search over 3 columns. SELECT * FROM Monkeys WHERE [Name] LIKE '%pete%' OR [Desc] LIKE '%pete%' OR [Info] LIKE '%pete%'; I am looking to improve the performance of this query. I can't use full-text catalogs, just simple tables. There are about 200,000 rows (SQL Server 2008 database) and it takes 3 to 6 sec...

How to do weighted MySQL match search

Hi guys, so we can use mysql to search for full text indexed fields via the MATCH keyword... my question is...is there a native way to do this in which certain column's index is given greater weight than the other So for instance if I search using the indexes title, keywords, and description...is there a way to make entries in title a...

Crippled performance when inserting to fulltext-index table on Sql Server 2005

I'm trying to a big insert of records into a table that is fulltext indexed. I have change tracking set to auto. The records are inserted from another table, in numbers typically about 50,000 at a time. On SQL Server 2008 this takes something like 5 seconds to complete. But running on our live 2005 environment this takes upwards of 10 m...

Text search question about implementation

Hi, Can someone explain me how the text searching algorithm works? I understand its a huge field but am trying to understand it from high level so that I can look up academic papers on it. For example, Spelling mistakes is one problem that is tough to solve and of course Google solves it. When I search for a term and misspell it on Goo...

What is the best way to implement a substring search in SQL?

We have a simple SQL problem here. In a varchar column, we wanted to search for a string anywhere in the field. What is the best way to implement this for performance? Obviously an index is not going to help here, any other tricks? We are using MySQL and have about 3 million records. We need to execute many of these queries per second ...