Last modified: 2014-01-12 15:38:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56974, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54974 - improve suggestions while typing
improve suggestions while typing
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CirrusSearch (Other open bugs)
master
Other Linux
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nik Everett
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-04 14:13 UTC by keyler
Modified: 2014-01-12 15:38 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description keyler 2013-10-04 14:13:50 UTC
One big wish from me: 
Could you enable the suggestions while typing not only for the first word but also for the following words. In Sphinx this always was a great feature!

Example:

You start in typing: Tom Clancy
The suggestions for Tom Clancy will pop up immediately.

BUT: when you start in typing: Clancy
It would be great if the search also suggested "Tom Clancy", so if it also looked at the beginning of the second, third, and so on word.
Comment 1 Nik Everett 2013-10-04 17:07:41 UTC
I believe I had it working this way when I was first developing the feature but ended up changing it to match the behavior that we have in production now.  I'd be happy to add that way as an option.
Comment 2 keyler 2013-10-04 20:41:41 UTC
This feature as an "option" would be just perfect! You made my day.
Thank you...
Comment 3 keyler 2013-10-16 12:27:39 UTC
Hello Nik,
any news on my "feature request"? I would be very happy if this was implemented and I think it would be a great improvement!
Comment 4 Nik Everett 2013-10-16 13:47:15 UTC
I keep meaning to get to this but getting pulled in other directions.  I'll get a start on it this morning.
Comment 5 keyler 2013-10-16 13:48:10 UTC
:-) thank you. I just wanted for you not to forget it....
Comment 6 Nik Everett 2013-10-16 16:31:23 UTC
Almost got it.  I'm running my regression tests to make sure I didn't change the default behaviour.

A note about testing this:  those prefix queries have a super long ttl so you'll have to clear your cache.

At this point it is pretty liberal.  The following match "Main Page":
main page
ma page
m p
page
p

Which I think is super fun but not for everyone.  Is that what you want?  Every "word" starts a new prefix match which can match any "word" in the title.  The definition of "word" is important here because it'll vary from language to language.
Comment 7 Gerrit Notification Bot 2013-10-16 16:34:20 UTC
Change 90150 had a related patch set uploaded by Manybubbles:
Optionally enable sloppy prefix matching

https://gerrit.wikimedia.org/r/90150
Comment 8 Nik Everett 2013-10-18 00:16:24 UTC
While I've added uploaded a patch for this I'd like to make sure that you are ok with the very liberal matching.
Comment 9 keyler 2013-10-18 12:19:59 UTC
Wow. It works!!!! GREAT!!! I am impressed. Thank you Nik.

Suggestion/question: can the amount of letters that have to be typed in before the search starts suggestions be set to e.g. 2?
Comment 10 Nik Everett 2013-10-18 12:27:30 UTC
The amount of letters per word or the amount of letters total or the amount of letters excluding spaces?
Comment 11 keyler 2013-10-18 12:31:02 UTC
ok here we go:

I am looging for "main page".

So I either start typing: ma or pa (e.g. 2 letters)
At the moment it starts suggestions when I enter m or p (only one letter)

Thats what I meant...
I would never type in "m p".
Comment 12 Nik Everett 2013-10-18 12:34:10 UTC
Cool.  What about "ma pa"?
Comment 13 keyler 2013-10-18 12:39:37 UTC
????? I would never ever search like that. so... lets say: "the amount of letters total".

Can those be set. ATM they are at 1, right?

Thank you Nik!
Comment 14 Gerrit Notification Bot 2013-10-18 16:38:00 UTC
Change 90150 merged by jenkins-bot:
Optionally enable sloppy prefix matching

https://gerrit.wikimedia.org/r/90150
Comment 15 keyler 2013-10-21 07:50:46 UTC
verified working.
Comment 16 keyler 2014-01-02 16:12:08 UTC
Hallo Nik, the sloppy prefix matching stopped working. I do dot know exactly when but with 4a3254f it is definitely gone :-(
I use "$wgCirrusSearchPrefixSearchStartsWithAnyWord = true;" in the LocalSettings.php. 
This must have happened 1-2 weeks ago and I did not immediately notice it.
Comment 17 Nik Everett 2014-01-02 16:45:20 UTC
I'll have a look at it when I get a chance.  Sorry about that.  I wish I had a way to include stuff like this in the regression tests but they only test a single configuration.  I'll think about that as well.
Comment 18 keyler 2014-01-02 16:47:25 UTC
Cool and thank's again!!!
Comment 19 Nik Everett 2014-01-03 16:28:33 UTC
I just tried it and it works for me.  Steps:

1.  Set $wgCirrusSearchPrefixSearchStartsWithAnyWord = true;
2.  cd /srv/mediawiki/extensions/CirrusSearch
3.  php maintenance/updateSearchIndex.php
4.  php maintenance/forceSearchIndex.php --forceUpdate

Let me know if that works.
Comment 20 keyler 2014-01-03 18:16:30 UTC
3. php maintenance/updateSearchIndex.php does not exist. Did you mean: php maintenance/updateSearchIndexConfig.php
Comment 21 keyler 2014-01-03 18:20:25 UTC
to I did this:
 php updateSearchIndexConfig.php --reindexAndRemoveOk --indexIdentifier now
 php forceSearchIndex.php --forceUpdate

I am on MW 1.22.0 and CirrusSearch (4a3254f) 21:24, 18. Dez. 2013
Elasticsearch 0.90.9

Still no luck.....
Comment 22 keyler 2014-01-03 18:22:53 UTC
I also tried downloading a different version of CirrusSearch via the MediaWiki.org homepage. But this has been broken for some time now: 
https://www.mediawiki.org/wiki/Special:ExtensionDistributor/CirrusSearch

I will no do it the "old fashioned way" via git ;-)
Comment 23 Nik Everett 2014-01-03 18:37:41 UTC
(In reply to comment #20)
> 3. php maintenance/updateSearchIndex.php does not exist. Did you mean: php
> maintenance/updateSearchIndexConfig.php

Yup.  Sorry.

(In reply to comment #22)
> I also tried downloading a different version of CirrusSearch via the
> MediaWiki.org homepage. But this has been broken for some time now: 
> https://www.mediawiki.org/wiki/Special:ExtensionDistributor/CirrusSearch
> 
> I will no do it the "old fashioned way" via git ;-)

Funky.  I'll bother someone that knows more about this stuff.

(In reply to comment #21)
> to I did this:
>  php updateSearchIndexConfig.php --reindexAndRemoveOk --indexIdentifier now
>  php forceSearchIndex.php --forceUpdate
> 
> I am on MW 1.22.0 and CirrusSearch (4a3254f) 21:24, 18. Dez. 2013
> Elasticsearch 0.90.9
> 
> Still no luck.....

Let me try it on 1.22.  Maybe something is busted there.  I was lazy and tried it on master.
Comment 24 keyler 2014-01-03 18:46:30 UTC
So I now checked out REL 1.22 for Elastica and also for CirrusSearch. 
After reindexing now the searchpage goes completely blank :-(
I think there is something wrong with REL1.22 of CirrusSearch. I will revert to an older release for now...
Comment 25 Nik Everett 2014-01-03 18:50:06 UTC
(In reply to comment #23)
> Let me try it on 1.22.  Maybe something is busted there.  I was lazy and
> tried it on master.

Tried it on 1.22 and it worked.

MediaWiki: 3603adfad5a8dc144dca09d8b2c63291500302b9
CirrusSearch: ef02cfae825849890035d38f250f122937f4dde7

Any chance you have TitleKey installed?  It breaks Cirrus unless handled in hacky ways: http://git.wikimedia.org/blob/operations%2Fmediawiki-config.git/4e1dda797a87cf021f65a9e8bed48b26793b32dc/wmf-config%2FCommonSettings.php#L889
Fear not though because Cirrus has recently implemented all of TitleKey's functionality against Elasticsearch rather than MySQL.
Comment 26 Nik Everett 2014-01-03 18:50:57 UTC
(In reply to comment #24)
> So I now checked out REL 1.22 for Elastica and also for CirrusSearch. 
> After reindexing now the searchpage goes completely blank :-(
> I think there is something wrong with REL1.22 of CirrusSearch. I will revert
> to
> an older release for now...

Did it log an error message in the apache error log?  If so, please post it here.  Sorry that I didn't mention that you need to update Elastica as well.
Comment 27 keyler 2014-01-12 15:38:37 UTC
nope, I did not have TitleKey installed. Now after updating to CirrusSearch 1.22 and Master of Elastica this works again. Is i posted in the other bug Elastica for 1.22. is broken.

The problem with the blank page seems to have been an old Elastica version. Also gone now! ;-)

Thank you Nik for looking into this.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links