Forums  ›  General  ›  General discussions
 

Let's talk search

OK, that match thing may not have meant what I thought it did.  I would like to see a whole new search but that would be a job and a half.  There are some five or six or more files dealing with search with lots of classes and functions.  Plus, areas of the site use the search to generate the page content; for examples, the profile page doesn't use independent queries to build the page, it goes through search.

Anyway, see this page: https://www.boonex.com/forums/topic/Over-100-match-.htm

and here: https://www.boonex.com/forums/topic/x-match-after-search.htm

Once again I have a different view, assuming I've read the posts correctly. I would have thought the percentage match is something left over from the dating script. Most searches on scripts and programs I've been involved with use a Wildcard Search and you reduce the results by offering as much as possible in the search query. Thus:

  • W will find Watts, White, William and Williams
  • WI will find William and Williams
  • WILLIAM will find William and Williams
  • WILLIAMS will find Williams (From what I can test)

My understanding is that the Basic Search function of Cheetah works this way.

I feel that offering additional choices only confuses the issue and I've isolated as many of the additional search features as  I can. By using Anton's Searchable Fields  hack in profiles, a member can find almost any matching profile way down to everyone with the same shoe size if they consider that important.

As  the Searchable fields hack is just that, maybe Deano can write something similar for Cheetah without infringing on copyright. Somehow I don't think it would be too hard.

Search filters like City, State, Country are essential, but even these items can be easily found by doing a basic search. In fact, as far as Search is concerned I absolutely love the way  my site does searches and each result such as City is shown in separate blocks: Members, Groups, Events, Clubs etc. It could not be better for me and that's one of the reasons I was first attracted to the script.

Entering 0 for matching on a profile field will prevent that field from being searched. When doing a database search, the query only looks at fields that have a matchpercent that is > 0.

Anyhow. The searching for profile fields is done in inc\classes\ChWsbProfileFields.php in the function getProfilesMatch. Cupid matching for sending emails is done in inc\match.inc.php i think. Not sure on that one either.

Anyhow. I am having a bit of trouble figuring out how they are calculating it. But if you do a search in inc\classes\ChWsbProfileFields.php for MatchPercent you will see where it is being checked.

Looks like they are calculating averages. 0-100% based on number of matches found in all fields that are set for matching. But i am not exactly sure as i can't really figure out their calculations.

 

 

My first question is the percentage match in the search builder.  Exactly how does that work?

 Ummm. Good question. Answer, i don't know. I will have to look into it and see how boonex is handling it.

I do know that if it is set to zero, you get no matches even if you put in the exact text.  For example, user last name Williams, match set to zero, type "Williams" and you get zero results.

 

My first question is the percentage match in the search builder.  Exactly how does that work?

 Ummm. Good question. Answer, i don't know. I will have to look into it and see how boonex is handling it.

As I work to try and develop proper searching on a site, I have questions.  I will pulled answers out of this thread and write up a tutorial on developing search for a site.

My first question is the percentage match in the search builder.  Exactly how does that work?  I am guessing the values will range from zero (match on nothing) to 100% (does that mean match on everything?).  How does percentage work say in matching a person's surname?  Let's say I have a member; surname Martin.  I search for Moretin; how does the percentage match work here?  The idea would be to get as few false positives as possible but if I am searching for Williams and type William without the "s" I would probably want it to return Williams in the results.  I may be searching for an old lost friend but not sure if the surname was William or Williams.