How to search on static pages?
How to search on static pages?
I don't know whats wrong, but my site search doesn't search static pages. If i understand this article correct, the search should work if (min) version 3.30 of the static page plugin is installed. I did have actualy installed version 3.35 of the static page plugin and all i can see on the results page, if i do make a search for an certainly on a static page used word is Found 0 static pages: ... and nothing else.
Can you please help me out and tell me whats wrong?
Can you please help me out and tell me whats wrong?
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Can you guys please check if your serendipity_staticpage table has a Fulltext Index on your tables?
It works here as intended, with the fulltext indices in place...
Best regards,
Garvin
Can you guys please check if your serendipity_staticpage table has a Fulltext Index on your tables?
It works here as intended, with the fulltext indices in place...
Best 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/
# 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/
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
Code: Select all
Name Typ Kardinalität Feld
PRIMARY PRIMARY 1 id
staticentry_idx FULLTEXT keine headline und content
Ciao, Stephan
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Hm, that looks about right.
Could you edit your staticpage plugin, there's this code:
Please add a
after that (or maybe even a die($querystring) if you don'T get output) and then check what the SQL looks like, and if it returns rows in phpMyAdmin?
Best regards,
Garvin
Hm, that looks about right.
Could you edit your staticpage plugin, there's this code:
Code: Select all
$querystring = "SELECT $distinct s.*, a.realname
FROM {$serendipity['dbPrefix']}staticpages AS s
LEFT OUTER JOIN {$serendipity['dbPrefix']}authors AS a
ON a.authorid = s.authorid
WHERE $find_part
AND s.publishstatus = 1
AND s.pass = ''
$group
ORDER BY timestamp DESC";
Code: Select all
echo $querystring;
Best 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/
# 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/
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
the sql:
und das Ergebnis and the result:
What did it make wiht authorid!?
Code: Select all
SELECT s.*, a.realname FROM serendipity_stm_staticpages AS s LEFT OUTER JOIN serendipity_stm_authors AS a ON a.authorid = s.authorid WHERE MATCH(headline,content) AGAINST('Inhaltlich') AND s.publishstatus = 1 AND s.pass = '' GROUP BY id ORDER BY timestamp DESCCode: Select all
MySQL lieferte ein leeres Resultat zurück (d.h. null Zeilen). (die Abfrage dauerte 0.0012 sek)
SQL-Befehl:
SELECT s. * , a.realname
FROM serendipity_stm_staticpages AS s
LEFT OUTER JOIN serendipity_stm_authors AS a ON a.authorid = s.authorid
WHERE MATCH (
headline, content
)
AGAINST (
'Inhaltlich'
)
AND s.publishstatus =1
AND s.pass = ''
GROUP BY id
ORDER BY timestamp DESC
LIMIT 0 , 30Ciao, Stephan
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
How many staticpages do you have? IF you only have 1 or 2 entries, MySQL fulltext search will not find anything:
http://dev.mysql.com/doc/refman/5.0/en/ ... uning.html
Regards,
Garvin
How many staticpages do you have? IF you only have 1 or 2 entries, MySQL fulltext search will not find anything:
http://dev.mysql.com/doc/refman/5.0/en/ ... uning.html
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/
# 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/
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
*g*. Then, as sad as it is: But due to the mysql search facility, this will not work with just one page. I don't know what the actual threshold is, but the search should AFAIR work when having at least 3 or 4 database rows.
Regards,
Garvin
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/
# 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/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi urmelchen!
Well, you are another person, so my solution to stm999 might or might not apply to you
Did you try the same things like stm999? What does the SQL tell you?
Best regards,
Garvin
Well, you are another person, so my solution to stm999 might or might not apply to you
Did you try the same things like stm999? What does the SQL tell you?
Best 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/
# 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/
Since my server admin didn't answer right now, i've played a little bit around. Now it seems to work ... after i was trying a case sensitive search. But read on:
First thing i idiscoverd is, that the search on static pages is case sensitiv. Take a look at my site and search (f.e.) for "Gotha". You will find one hit. If you search for "gotha" you will don't find anything. Bug or feature? Maybe case sensitiv should be turned off by default?
Second: Search for the phrase mentioned above and you will see that the search result contains pictures and links from the static page. This will actualy destroy the result page. Maybe you can fix this?
First thing i idiscoverd is, that the search on static pages is case sensitiv. Take a look at my site and search (f.e.) for "Gotha". You will find one hit. If you search for "gotha" you will don't find anything. Bug or feature? Maybe case sensitiv should be turned off by default?
Second: Search for the phrase mentioned above and you will see that the search result contains pictures and links from the static page. This will actualy destroy the result page. Maybe you can fix this?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Which MySQL version are you using? Actually the mysql fulltext search should alaways be case insensitive! I am quite surprised by this result!
Best regards,
Garvin
Which MySQL version are you using? Actually the mysql fulltext search should alaways be case insensitive! I am quite surprised by this result!
You should be able to adjust the search results via the .tpl file?Second: Search for the phrase mentioned above and you will see that the search result contains pictures and links from the static page. This will actualy destroy the result page. Maybe you can fix this?
Best 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/
# 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/
But you can confirm this? I wrote an mail to the server admin, in hope he will reply (asap).garvinhicking wrote:Hi!
Which MySQL version are you using? Actually the mysql fulltext search should alaways be case insensitive! I am quite surprised by this result!
Where is the file located at? I'am right, that i need to have ftp-access to the server, to modify this file?You should be able to adjust the search results via the .tpl file?Second: Search for the phrase mentioned above and you will see that the search result contains pictures and links from the static page. This will actualy destroy the result page. Maybe you can fix this?