- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHi all,
I use Zend lucene for indexing my data(MySQL) and i use Zend_Search_Lucene for searching. If i search only one word, the result is fine.
But if i enter more than 1 words and specific pharse. For example, I enter" The Lace trade and the Factory Act " in search box . The results are a lot. i want the result to show with all words. like search book from amazon if you know a specific title, it will display one or a few record that relevant with all words.
Table: gallery_item. This table has fields as followed:
gal_item_id int(11) auto_increment
gal_item_title varchar(255)
gal_item_photographer varchar(255)
gal_item_desc text
I attached the code. User enter search term into search box(it will keep in $search) and user choose the type of search; title field,author field, description, and all fields.
for this line of code ; $hits = $index->find($query);
How to change it for searching a specific multiple pharse? Could you help me please? Many thanks in advance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: RoonaanPosted on 2009-06-17 at 10:27:37ID: 24650551
Like with goolge you would have to use find('gal_item_title:"'.$s earch.'"') to do a phrase search.
Sidenote: When you are creating a fulltext search just on a mysql database, and you have a dedicated server, or server you have full control over, you might want to look into dbsight.net. That is a java webapp that can index about any type of relational databases in a breeze, and comes with an easy to integrate xml or json based rest interface. You configure dbsight to index your db, and only implement the search form (although dbsight comes with a extensive search interface as well)