Quicksearch finds - nothing!

Creating and modifying plugins.
Post Reply
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Quicksearch finds - nothing!

Post by d_cee »

Hi

same website as my contact form issue - emailonthemove.net built on static pages. Quicksearch is enabled in the static pages config but it finds nothing no matter what I search for.

This site is hosted on a windows server so I'm wondering if that's the reason.

Dave
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Quicksearch finds - nothing!

Post by garvinhicking »

Hi!

Does maybe http://www.s9y.org/11.html#A14 affect you?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi Garvin

I couldn't really say. I am aware of the limitations of the quicksearch facility and normally build serendipity websites with 'normal entries' not static pages. However, appreciative of the work you'd done recently with the static page plugin - and to make the sidebar navigation simple, I used static pages for this site.

Are you suggesting that because there are no 'normal entries' there is no point in enabling the quicksearch option in the static page config as they won't be searched?

cheers

Dave
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Site looking good Dave, and I would expect nothing less from you!!! :wink:

The search functionality has been frustrating to me beyond belief.... I wonder if Garvin's link is the source of the problem. I have never built a site solely on static pages. I would hope all works well, especially as some of us wish to see s9y continue to evolve as more of a cms, and not just a blog, but if the php/mysql search function needs a bunch more data to work correctly, I think we could be screwed.

Hope all is well!
=Don=
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Thanks Don. I'm busy as ever but things are still difficult personally. Some things seem never to get resolved. Hope things are well with you and yours.

Garvin
I've read and re-read all the info about the search and your response of yesterday doesn't help at all. What is the point of the 'enable quicksearch' option in the static page config if it doesn't make the content of the page searchable?

thanks

Dave
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Actually the staticpage search should run independently of the entry results. I'm not sure though if the default template will hide any staticpage searchresults because it finds no blog results. You might need to shift the content.tpl template around to ALWAYS emit {$CONTENT} and so, just as if search results were found.

What I meant was that, do you have more than 3 or 4 staticpages? And are you searching for a word that does not occur in more than 70% of the staticpages?

Also check the staticpage DB table and see if a "FULLTEXT" index is set on the content columns?Last but not least: Are you using MySQL >= 4.0.27? Fulltext indices are not there in MySQL 3.0...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi Garvin

the site has 7 static pages, I'm searching for words that occur on 6 out of the 7 pages and I've tried adding a {$CONTENT} to the content.tpl and still nothing.

As for
check the staticpage DB table and see if a "FULLTEXT" index is set on the content columns?Last but not least: Are you using MySQL >= 4.0.27? Fulltext indices are not there in MySQL 3.0.
I don't have database access so I've asked the question and I'll post here when I know.

cheers

Dave
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

6 out of 7 is too much. Search for a word that only occurs in, say, 4 of 7 pages.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi Garvin

I've tried searching for words that appear on 3, 4 & 5 pages and nothing!

MySql info as follows:

> The MySQL Admin tool says mySQL Version: 5.0.51b-community-nt via TCP/IP
>
> the staticpage db has an index called staticentry_idx it is set to kind=FULLTEXT and contains the headline and content columns

Dave
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The Staticpage serarch executes on the "entries_footer" event hook. I suppose this one is not called when no blog entries match your query.

Thus you have to patch your content.tpl in a way that the "entries_footer" hook is also called when no entries match, something like this:

Code: Select all

{if $searchresult_tooShort OR $searchresult_error OR $searchresult_noEntries}
  {serendipity_hookPlugin hook="entries_footer"}
{/if}
(place it where you want the staticpage search results to appear).

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi Garvin

as always - you're brilliant. It now works absolutely perfectly

thanks
Dave
Post Reply