Mailing List Archive

Modification in SearchEngine (and other files)
Hello,

because of the stupid text the SearchEngine returns (Showing below 20
results starting with #1.) and we all see e.g. 24 results, I added a new
output string in Language.php and LanguageDe.php and modified
SearchEngine.php and GlobalFunktions.php to use this new string and the new
function ShowingResulesNum().

There are other SpecialPages using ShowingResults() which may be changed in
an aproppriate way, if you like the new feature.

Can someone checking if the englisch translation of the
''showingresultsnum'' is propper english? I tried, but that means not so
much ;)

Oh, well, it all in CVS checked in. And it works fine at my Test-Wikipedia
at home, no bugs as far as I see.
--
Smurf

smurf@AdamAnt.mud.de
------------------------- Anthill inside! ---------------------------
Re: Modification in SearchEngine (and other files) [ In reply to ]
Je Lundo 19 Majo 2003 23:24, Thomas Corell skribis:
> Can someone checking if the englisch translation of the
> ''showingresultsnum'' is propper english? I tried, but that means not
> so much ;)

"Showing below <b>$3</b> results using the respective limit of <b>$1</b>
starting with #<b>$2</b>."

Whoa... :) I'd prefer something simpler:
"Showing up to <b>$1</b> results starting with #<b>$2</b>."

Or better yet, just give the actual number of results and let the chunk
size be shown by the "next X" / "prev X" links.

-- brion vibber (brion @ pobox.
Re: Modification in SearchEngine (and other files) [ In reply to ]
Brion Vibber wrote:
> "Showing below <b>$3</b> results using the respective limit of <b>$1</b>
> starting with #<b>$2</b>."
>
> Whoa... :) I'd prefer something simpler:
> "Showing up to <b>$1</b> results starting with #<b>$2</b>."

If $1 is still the $limit thats simply wrong if, you then get 24 results
(e.g. 4 times title + 20 times full text results).

Well, I know the sentence is not as good as it should be.
>
> Or better yet, just give the actual number of results and let the chunk
> size be shown by the "next X" / "prev X" links.

What do you mean with 'actual number' the '24' or all results? (which
needs a off limit sql-request (bad for performance) - even this would be
nice).

I'm today not at my CVS host, so if you have a better idea fell free.
Next / Prev links still exists, on the search. I'm (and others complain
it) not happy with "Hier sind 20 Ergebnisse, beginnend mit #1." and
seeing 21 (e.g. with "Biographie" as search term). You excuse the
german, but I know you know what I mean.

Smurf
--
Running German Wikipedia at home .. with 90MHz :)
--- Anthill Inside! ---
Re: Modification in SearchEngine (and other files) [ In reply to ]
Je Mardo 20 Majo 2003 05:42, Thomas Corell skribis:
> Brion Vibber wrote:
> > Whoa... :) I'd prefer something simpler:
> > "Showing up to <b>$1</b> results starting with #<b>$2</b>."
>
> If $1 is still the $limit thats simply wrong if, you then get 24
> results (e.g. 4 times title + 20 times full text results).

Hmm, wait, is that what you mean? Why would we want that? Those are two
entirely separate searches...

-- brion vibber (brin @ pobox.com)
Re: Modification in SearchEngine (and other files) [ In reply to ]
Brion Vibber wrote:
> Je Mardo 20 Majo 2003 05:42, Thomas Corell skribis:
>
>>Brion Vibber wrote:
>>
>>>Whoa... :) I'd prefer something simpler:
>>>"Showing up to <b>$1</b> results starting with #<b>$2</b>."
>>
>>If $1 is still the $limit thats simply wrong if, you then get 24
>>results (e.g. 4 times title + 20 times full text results).
>
>
> Hmm, wait, is that what you mean? Why would we want that? Those are two
> entirely separate searches...

But they are handled with the same next/prev schema. Which is confusing the
users a little bit. It was my intention to fix the text in a way the users
are less confused.

--
Smurf

smurf@AdamAnt.mud.de
------------------------- Anthill inside! ---------------------------
Re: Modification in SearchEngine (and other files) [ In reply to ]
On Wed, 21 May 2003, Thomas Corell wrote:
> Brion Vibber wrote:
> > Hmm, wait, is that what you mean? Why would we want that? Those are two
> > entirely separate searches...
>
> But they are handled with the same next/prev schema. Which is confusing the
> users a little bit. It was my intention to fix the text in a way the users
> are less confused.

Well, I'm more confused. :)

Personally, I think it would be easier still if we just had one set of
search results. If we reindexed on title plus content combined, with an
option to search titles only...?

-- brion vibber (brion @ pobox.com)
Re: Modification in SearchEngine (and other files) [ In reply to ]
Brion Vibber wrote:
> On Wed, 21 May 2003, Thomas Corell wrote:
>

> Well, I'm more confused. :)
>
Sorry, that was not intended.

> Personally, I think it would be easier still if we just had one set of
> search results. If we reindexed on title plus content combined, with an
> option to search titles only...?

Well, combining would be fine, if possible without stressing the machine.

But (never without a but;) I think 2 types of seaches are needed most:
1. Search parts of title ( cur_title like "%query%" ), possibly a regex
(rlike '.*query.*') would be better.

2. Full text search, which is effectiv a word based search. That's good
enough IMHO like it is today.

Add on:
If we (developer) create a 'search_title' field in the DB, we can do:
[cur|old]_search_title = Language_depending_converting_function(cur_title)

so a search query, '$query' can be done by:
$query = Language_depending_converting_function($query)
[cur|old]_search_title rlike '.*$query.*'

we can do it on the fly as well. And we can easily delegate the Language
search (for title) to the Landuage??.php files.

--
Smurf

smurf@AdamAnt.mud.de
------------------------- Anthill inside! ---------------------------
Re: Modification in SearchEngine (and other files) [ In reply to ]
Brion Vibber wrote:
> Well, I'm more confused. :)

Ok, take e.g.:

http://test.wikipedia.org/w/wiki.phtml?search=Alan

The user _reads_:

Showing below 20 results starting with #1.
View (previous 20) (next 20) (20 | 50 | 100 | 250 | 500).
Article title matches

1. Alan
...
20. Alan Backer

Article text matches

1. Alan Smithee (2073 bytes)
...
20. Abe Lincoln in Illinois (726 bytes)

View (previous 20) (next 20) (20 | 50 | 100 | 250 | 500).


I (as a user) count 2 times 20 results equals 40..but why there's written:
"Showing below 20 results starting with #1." ?

I (as a user) think: this <ironic>stupid</ironic> programmers can't count,
(and tey have a computer doing this...).

I (as reader of the source code) know that this are two diffrent query's,
but the user don't know that unfortunatly.

I had a long discussion the last two days about SpecialContributions.php,
which do something similar, with more 'hidden' funny results. Because I
know you can read german, take a look:
http://de.wikipedia.org/wiki/Benutzer:Smurf/SpecialContributions.php
Especially the example from Olaf1541 is showing the problem very good. The
page is intented to explain the 'funny' restults to users, and is work in
progress ;) Some guys would substitute 'funny' with 'buggy', but I think
about it more in a 'feature' way.

Hope it helps to get you less confused.
--
Smurf

smurf@AdamAnt.mud.de
------------------------- Anthill inside! ---------------------------
Re: Modification in SearchEngine (and other files) [ In reply to ]
On Wed, 21 May 2003, Thomas Corell wrote:
> But (never without a but;) I think 2 types of seaches are needed most:
> 1. Search parts of title ( cur_title like "%query%" ), possibly a regex
> (rlike '.*query.*') would be better.

Or boolean fulltext search:
http://www.mysql.com/doc/en/Fulltext_Search.html

> Add on:
> If we (developer) create a 'search_title' field in the DB, we can do:
> [cur|old]_search_title = Language_depending_converting_function(cur_title)

See treatment of si_title field in searchindex table.

-- brion vibber (brion @ pobox.com)
Re: Modification in SearchEngine (and other files) [ In reply to ]
Brion Vibber wrote:
> On Wed, 21 May 2003, Thomas Corell wrote:
>
>>But (never without a but;) I think 2 types of seaches are needed most:
>>1. Search parts of title ( cur_title like "%query%" ), possibly a regex
>>(rlike '.*query.*') would be better.
> Or boolean fulltext search:
> http://www.mysql.com/doc/en/Fulltext_Search.html

Ok, after reading it you forget to be confused over "boolean" (I realy
realy expected something different) and Yes, thats what we want :)

>
>
>>Add on:
>>If we (developer) create a 'search_title' field in the DB, we can do:
>> [cur|old]_search_title = Language_depending_converting_function(cur_title)
> See treatment of si_title field in searchindex table.

Oh, well. I see just another thing noboby telled LanguageDe.php. You will
replace e.g. 'รค' with 'ae' and so on.

I will never talk about ideas anymore if I'm not realy shure that
LanguageDe.php only works ugly because noboby told it to do it the right
way. I'm sure the one who setted it up missed it to enter a lot of /* FIXME
*/ comments.

*Smurf stands in his corner like a drowned rat*

--
Smurf

smurf@AdamAnt.mud.de
------------------------- Anthill inside! ---------------------------