Last modified: 2013-12-11 10:32:48 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 T55531, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53531 - Images in Commons don't show up in search when using CirrusSearch
Images in Commons don't show up in search when using CirrusSearch
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CirrusSearch (Other open bugs)
master
All All
: High normal (vote)
: ---
Assigned To: Chad H.
https://www.mediawiki.org/w/index.php...
: crosswiki
Depends on:
Blocks: commons
  Show dependency treegraph
 
Reported: 2013-08-29 12:25 UTC by Nemo
Modified: 2013-12-11 10:32 UTC (History)
5 users (show)

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


Attachments
Local search with Commons files (209.88 KB, image/png)
2013-08-29 13:39 UTC, Nemo
Details

Description Nemo 2013-08-29 12:25:36 UTC
1) Choose a file, preferably with a simple but rare title: https://commons.wikimedia.org/wiki/Special:Random/File
2) Enter it in the search bar and choose the "search" (not "go") option, or equivalent, e.g. https://www.mediawiki.org/w/index.php?title=Special%3ASearch&search=File%3ASom+tam+pu.jpg&fulltext=Search&srbackend=CirrusSearch
2-bis) A) Visit the multimedia search tab: <https://www.mediawiki.org/w/index.php?title=Special:Search&search=&fulltext=Search&profile=images&redirs=1>
    B) Search the full filename (without File: prefix), optionally quoted, and try a few times till you get what you should...

I) Actual result: « There were no results matching the query. There is a page named "File:Som tam pu.jpg" on this wiki.»
II) Expected result: the file is among search results (together with other matching filenames if you've not used the quotes). <https://www.mediawiki.org/w/index.php?title=Special%3ASearch&search=File%3ASom+tam+pu.jpg&fulltext=Search>
II-bis) Same but at https://www.mediawiki.org/w/index.php?title=Special%3ASearch&profile=images&search=Som+tam+pu.jpg&fulltext=Search
Comment 1 Nik Everett 2013-08-29 12:40:27 UTC
The images don't show up in either the new or old search.  Do we expect them to?  We do support stuff brought on to the wiki via instant commons.
Comment 2 Nemo 2013-08-29 13:08:56 UTC
(In reply to comment #1)
> The images don't show up in either the new or old search. 

They do in the old, see the steps above. I hope they are clear enough.

> Do we expect them
> to?  We do support stuff brought on to the wiki via instant commons.

What do you mean support, if you say they don't show up?
Comment 3 Nemo 2013-08-29 13:39:17 UTC
Created attachment 13195 [details]
Local search with Commons files
Comment 4 Nik Everett 2013-08-29 14:08:37 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > The images don't show up in either the new or old search. 
> 
> They do in the old, see the steps above. I hope they are clear enough.

Oddly they show up sometimes but not others.  Reload the page and they go away.  Chad or I will have a look at that soon.

> 
> > Do we expect them
> > to?  We do support stuff brought on to the wiki via instant commons.
> 
> What do you mean support, if you say they don't show up?

I was thinking you wanted some cross-wiki search.  I suppose by support I mean if you, say, add an image to a page using instant commons then that image should become searchable "real quick".  That doesn't seem to be working.

And after further investigation it looks like I lied about this working - we have a test for uploading a file and a test that uses instant commons to include a video but that test doesn't ensure that the video is searchable.

Triaging high.

This will have to work both for forceSearchIndex.php and in process updates.
Comment 5 Nik Everett 2013-08-29 18:42:52 UTC
So I did a bit more digging and the way we do it now is to always search in the commonswiki index if searching in the FILE namespace.  I'm pretty sure something similar is the only way we're going to get the same kind of feature out of CirrusSearch.  Indexing multiple copies of commons is just silly and indexing just 

I don't really like the idea though because it makes commons special and it is very WMF specific.  And it means one wiki would be talking to another wiki's search index which makes rolling deploys very nasty indeed.

I wonder if we could implement this using an API request to commons wiki or maybe just by providing a link to the same search in commons wiki.  That'd keep rolling upgrades simpler.  Using the API wouldn't allow us to mix the search results because scoring wouldn't be the same.  Actually, I'm pretty sure we'd have the same problem if we tried to share commonswiki's search index too.

I'm going to set this bug aside for now while I think about what to do.
Comment 6 Antoine "hashar" Musso (WMF) 2013-09-03 21:38:09 UTC
If it did not work with the old search, I guess this bug can be flagged as an enhancement request.
Comment 7 Nik Everett 2013-09-03 21:39:15 UTC
Sorry if this isn't clear - it works in the current search.
Comment 8 Nik Everett 2013-09-04 14:40:47 UTC
Adding On_Hold whiteboard.  I'll be ignoring this for the time being even though it is truly a high priority bug.  In this case I'm ignoring it because the solution is difficult and probably worth thinking about in the context of a feature we'd like to revive: interwiki search.  In other words.  I'll get to it but not as fast as its priority implies I should.
Comment 9 Gerrit Notification Bot 2013-12-03 22:21:33 UTC
Change 98986 had a related patch set uploaded by Chad:
Implement multi-index support on a per-namespace basis

https://gerrit.wikimedia.org/r/98986
Comment 10 Gerrit Notification Bot 2013-12-10 22:14:12 UTC
Change 98986 merged by jenkins-bot:
Implement per-namespace cross wiki searching

https://gerrit.wikimedia.org/r/98986
Comment 11 Chad H. 2013-12-10 23:31:24 UTC
Working on labs, just need a window to get commonswiki in production indexed :)
Comment 12 Nemo 2013-12-10 23:49:29 UTC
WOW! Can't wait to test it in production.
Comment 13 Antoine "hashar" Musso (WMF) 2013-12-11 10:31:51 UTC
Very nice!

I guess one day we will be able to replace Special:NewFiles with Special:Search+  some parameters  :-D
Comment 14 Antoine "hashar" Musso (WMF) 2013-12-11 10:32:48 UTC
Demo for those wondering: search for 'jpg' on beta commons wiki:

http://commons.wikimedia.beta.wmflabs.org/w/index.php?title=Special%3ASearch&profile=default&search=jpg&fulltext=Search

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


Navigation
Links