Jump to content

ideas for search


davo
 Share

Recommended Posts

I'm using the following for a search query

	$matches = $pages->find("Meta_keywords|DMCcontact_Country|DMCcontact_Address_2|DMC_Email%=$q, template=dmc, limit=50"); 

The problem I have is it's picking up parts of words within other words like this:

oman, brings back romania

Any ideas how i could improve this?

David

Link to comment
Share on other sites

Thanks teppo. I have tried the other operators but I can't find anything that matches exactly right. Partly my fault I guess for not organising the data properly in the first place.

The perfect example is as above: it finds a page with 'Oman' on the 'Romania' because it contains the word r Oman ia

I did think about adding a space after the query like this

$q =$q . " "

But that would then exclude the words or my keyword field which are going to have a comma directly after them.

I guess I could make up two instances to search for, one with a comma appended and one with a space.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...