Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: Hybrid Search and Search Customization

Started: August 10, 2010, 11:17 PM  ⋅  Zone: Public Forums  ⋅  Category: Install & Modification  ⋅  Posts: 8  ⋅  Views 539
Started by: US-WebDesigner  ⋅  Description: Explain Hybrid Search, report member search bug? Added: Information on search logic and customization.
Post #1
Member: US-WebDesigner  ⋅  Date: August 10, 2010, 11:17 PM  ⋅ Subject: "Hybrid Search"

Hybrid Search

If one clicks on the Search button via the shortcut buttons, and I think same if you click on the main nav Search option - there is a Global Module Search and a Hybrid Search.

The Hybrid Search has two options: Search Pages / Search Modules.

As best as I can tell, the pages are part of the modules, so a module search should return results from both, but it doesn't.

I figure most users of such a website would not know what those two terms referred to, as simple users of the site, so I thought I would just remove it, but I also did not want to limit search options as searching is such a key function for users.

For example on my site, the term Webmaster returns no results in a hybrid module search, but one result from a page in the Site module.

Because you ask for what I would like to see.  Personally, I think one search for the whole site would be idea - for all content and user details.

Member Module Search bug?

Not sure if it is a bug or something else (ie if I did something to cause this), but when I use the Global Module Search function, and select the module Members, it takes me to another page which is completely empty below the breadcrumbs, here:

http://cnca.com/community/index.php?module=members&show=post_search&post_name=&post_text=&post_tags=&post_member_name=Webmaster

Searching from here:

http://cnca.com/community/index.php?module=site&show=post_search

Thanks,

Post #2
Member: Markus  ⋅  Date: August 12, 2010, 11:18 PM  ⋅ Subject: "Re: Hybrid Search"

Hybrid Search Explained

Pages are inside modules, but there are two kinds of content for each module — static and dynamic.

  • Search Pages: Searches all the content you have created for your pages with the Builder's editor ("static content").
  • Search Modules: Searches all content posted by users into your various modules ("dynamic content").

These two basic kinds of content are separately stored in the database, and therefore have separate searches. It also helps keep the webmaster's communication to visitors at better focus (and thereby site strategy better under control) on sites with lots of user-posted content.

To search both at once would require either an extension to the search class to do two queries at once and merge the results, or the creation of a separate master search index (which is on the roadmap along with multilevel cache and other performance boosters).

 

Member Module Search / Module Search Pages

Actually the Members module shouldn't be searchable from the global module search, because the member data set isn't symmetric with content in other modules, and therefore would neither return relevant results not provide a suitable interface.

To remove it from the global search dropdown, go to Admin CP > Modules > Members, and set "Add to global search?" to No. You should also do this for Admin module and all other modules without any active content. (Disabling a module effectively accomplishes the same.)

 

The blank middle-area in a page simply means that no layout has been defined for it. There is none for Members module because it isn't supposed to be within global search.

The same post_search page exists in all modules with searchable content, and regardless of which module you search in, the query is directed to the search page of the module selected in the dropdown. (Choosing "Global" and "-" search across all allowed modules and lead to the search page in your Site module.)

Therefore, you can also customize the search result formats on a per module basis if you want. For example, you could choose image results for gallery search, and summary texts for blogs, instead of the default "Search" format used for all search results.

 

Customizing Search Forms and Scopes

If you want to customize the search forms, they are editable in skin_search.php. You can add in searches for any fields that exist in the database for the content type you want to search.

If you want to create more possible search criteria for the currently available content, look at /core/layout_grid.php and the following section as an example:

$grid['post']['search']['post_id'] = "post_id = '[[KEYWORDS]]'";
$grid['post']['search']['post_name'] = "MATCH (post_name) AGAINST ('[[KEYWORDS]]' IN BOOLEAN MODE)";
$grid['post']['search']['post_location'] = "MATCH (post_location) AGAINST ('[[KEYWORDS]]' IN BOOLEAN MODE)";
$grid['post']['search']['post_people'] = "MATCH (post_people) AGAINST ('[[KEYWORDS]]' IN BOOLEAN MODE)";
$grid['post']['search']['post_caption'] = "MATCH (post_caption) AGAINST ('[[KEYWORDS]]' IN BOOLEAN MODE)";
$grid['post']['search']['post_description'] = "MATCH (post_description) AGAINST ('[[KEYWORDS]]' IN BOOLEAN MODE)";
$grid['post']['search']['post_text'] = "MATCH (post_name, post_caption, post_description, post_text, post_tags) AGAINST ('[[KEYWORDS]]' IN BOOLEAN MODE)";

If you wanted to for example create a new search that lets you pick posts with a certain rating, you could add in an input field with post_date, and add a criteria like below into your grid:

$grid['post']['search']['post_rating'] = "post_rating = '[[KEYWORDS]]'";

Whatever works after WHERE in regular MySQL queries will work in the above, so you can create whatever search criteria you want to.

Member custom profile sets haven't been mapped into the layout grid or search options yet (coming up), but the logic in action in the layout grid works for creating builder extensions and search criteria for any table in the database.

Post #3
Member: US-WebDesigner  ⋅  Date: August 14, 2010, 10:57 PM  ⋅ Subject: "Re: Hybrid Search and Search Customization"

Thanks for the explanation.  

One question so far from that is this.  I went to Admin CP/Module/Members and disabled the global search for that module.  Strangely enough, it seemed that before I did that (and it could have been something else I did but I have done nothing that would trigger this that I know of) - it used to be that in the Global Module Search, ( ie if you click on the magnifine glass shortcut button), that the only modules listed were the ones I currently had active, which worked for me and I thought made sense.  Now, all of the modules are listed, or it looks like all but I am assuming that it is all the modules that have the global search setting at no.

  1. Can you understand/explain why that would have been one way and then another?  ie what can trigger that to be that way?
  2. Do I need to go into each module and click that global search setting to off?  is that the only way to do it?
  3. Since I have post this, I have used/tested the Global Module Search a few times.  Sometimes when I use the Module select list, it seems to display all the modules, and other times it only displays the ones I have active.  Can't differentiate what causes it to work one way or the other.  I think I will go through and deactivate all from Admin panel per module at this point just to cover my basis - but wanted to point this out.

Thanks

PS - I was just testing out the Hybrid search function accessed from the Search magnyfine glass icon and there seems to be some malfunction.

If I put a word into the Hybrid Search field and hit the Search Modules button, the search word I entered gets moved into the Global Module Search > Text field and results display correctly.  If I then add another term in the Hybrid Search box and click on Search Modules, it spits out results under the Hybrid Search box, but they do not find results that actually exist, (I know they do exist because I can do a module search from scratch for that same word and it finds it.)

And in addition, I tried the "Global Search" function on the default home page (has the two options, Search Pages and Search Modules) and when I ran a search on a word that I know is in the content of one of the blog posts, it does not come up in the search results that display under it.  (Although if I use that same term in the Global Module Search > Text it does come up as expected.)

On my site which you need access to and have from an email from me, I used the term: fish.  (I had created a sample blog post with that word in it and have been using it to test the search functions.  FYI - one of my first jobs working for Philips Electronics back around 1992 was testing commercial software for their CD-i player developers, just banging away on their software titles and generating bug reports so the programmers could fix them before their products were launched.  It was fun enough for a while :)

Post #4
Member: US-WebDesigner  ⋅  Date: August 18, 2010, 09:40 PM  ⋅ Subject: "Re: Hybrid Search and Search Customization"

In response to wanting to customize the search Member module search fields, I read this above:

Customizing Search Forms and Scopes

If you want to customize the search forms, they are editable in skin_search.php. You can add in searches for any fields that exist in the database for the content type you want to search.

and am wondering if you could provide some more guidance.

Specifically on my site I created custom fields, some multiselect and some line and multiline entry in the Profile Builder for some of the Member modules, ie

Member About Me:

Type of Detection: with multi-select for Narcotic and Explosive

Occupation: open line field

etc.

How can I add to the Advanced Member Search form so that it allows searching for those fields, so for example, a member can search for all members who have Narcotic Detection training? ...or to search for occupational words that would pull from the occupation fields?  ...or even a more global Member search function that would search all of the member profile content at once?

Thanks,

 

 

Post #5
Member: Markus  ⋅  Date: August 19, 2010, 01:36 AM  ⋅ Subject: "Re: Hybrid Search and Search Customization"

This is a bit more involved — and something I definitely need to code into the next release in either case — care to wait as I crack it over the weekend?

Post #6
Member: US-WebDesigner  ⋅  Date: August 20, 2010, 05:49 AM  ⋅ Subject: "Re: Hybrid Search and Search Customization"

over the weekend?  Sure.  Over the weekend is great.

Post #7
Member: Markus  ⋅  Date: August 21, 2010, 08:54 PM  ⋅ Subject: "Re: Hybrid Search and Search Customization"

I'll crack this one once I get the easier issues out of the way first.

Just to confirm, a solution for issues in this thread would also cover the issues in the old Searching thread?

I've been going over all threads from oldest onwards to ensure there are no loose ends or unanswered issues. I have also edited Wiccle.com member profiles / Content tab to include a full list of threads by each member: for you to help revisit your threads, and for me to help keep track of everything.

Post #8
Member: US-WebDesigner  ⋅  Date: August 26, 2010, 12:01 AM  ⋅ Subject: "Re: Hybrid Search and Search Customization"

Thanks.  Yes.  That would cover both post requests - making Member module search fields based on custom Member profile fields.  That would be awesome.  thanks.

And I like that Content tab.  Funny that you might use it to view my comments, but I went to your profile and viewed yours as a way to focus on your latest responses. :)  

Thanks

 

Install & Modification

Add to Favorites
Public Forums
Category  ⋅  Deploying iWiccle and Wiccle into unique solutions that match your needs.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top