I'm currently building a database that will monitor company records. I need to search for MANY (we're talking potentially a few thousand when it's finished) company names against a single column in a table where the company names will be listed. I currently use the following basic mysql LIKE query (this is condensed, the current one has 300+ terms being searched for):
SELECT * FROM "case-file-owner" WHERE "party-name" LIKE 'Nike%' OR
"party-name" LIKE 'Lyon Group Inc.%' OR "party-name" LIKE 'Target Home%'
ORDER BY "party-name" ASC
As you can see, it's a bit basic! How would you do a search like this with Lucene or Sphinx? Are these tools overkill for this task? While I need to search for potentially thousands of companies, the current setup only searches a table containing maybe 1000 records each day (I run a query that cuts out records I don't need to search).
My primary issue revolves around minor issues. For example: Company1, Inc. Company1 Inc. The Company1 Inc. The Company1 Incorporated. are all possible representations of many company names I need to find.
Would MATCH work? Would a gigantic query like this take forever with Lucene or Sphinx? My current LIKE search is "optimized" by dumping any leading wildcard operators... but hardly intelligent!