Page MenuHomePhabricator

Search gadget for subcategories and intersections search (2013)
Closed, ResolvedPublic

Description

As a user I want to have the possibility to search through categories including subcategories and intersection search.

See
https://de.wikipedia.org/wiki/Wikipedia:Umfragen/Technische_W%C3%BCnsche/Top_20#.E2.80.9ECatScan-Funktionalit.C3.A4t.E2.80.9C_in_die_Software_integrierens (in German).

This is part of the Top 20 wishes of the German community

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
OpenFeatureNone
DeclinedNone
DeclinedNone
Resolvedgabriel-wmde
DuplicateNone
ResolvedTobi_WMDE_SW
ResolvedTobi_WMDE_SW
ResolvedWMDE-Fisch
Resolved jkroll
ResolvedWMDE-Fisch
ResolvedNone
InvalidNone
DeclinedNone
ResolvedTobi_WMDE_SW
InvalidNone
InvalidNone
InvalidNone
Resolved KasiaWMDE
ResolvedWMDE-Fisch
Resolved jkroll
Resolved jkroll
ResolvedNone
Resolved jkroll
ResolvedWMDE-Fisch
Resolved KasiaWMDE
ResolvedNone
ResolvedNone

Event Timeline

KasiaWMDE raised the priority of this task from to Medium.
KasiaWMDE updated the task description. (Show Details)

@Kersti
Can you please clarify for each search string:

  • what you intend to search for
  • what results you got instead

Thanks

To me the main use of deepcat would be the possibility to search pictures which belong in a category and its subcats but arent in it now.

I intendet to search pictures that were not in the category "Aranda, Australian Capital Territory" and not in the subcategories (with -deepcat) and got some wich were in the categories instead. All in all none of the possible variants gives the correct results. The exact numbers may have changed up to now, but the problem remains the same.

Aranda, ACT -deepcat:"Aranda,_Australian_Capital_Territory" 1.480

Aranda, ACT -deepcat:"Aranda, Australian Capital Territory" 1.480 results in the categories in which they shouldn't be

Aranda, ACT -deepcat:Aranda,_Australian_Capital_Territory 4.915 - as much as Aranda, ACT

Aranda, ACT -incategory:"Lepidoptera_of_Aranda,_Australian_Capital_Territory" 3.749 first 300 may be in Aranda categories others than Lepidoptera of Aranda while the rest is in none of these categories

@Kersti,

when you use those links, the request goes directly to the server, without an opportunity for the DeepCat Gadget to intercept your query on the client side.
Please try the following:

  • log into your account on Commons.
  • make sure that you have the gadget enabled for Commons, i.e. by inserting the following snippet into your common.js
mw.loader.load( "//de.wikipedia.org/w/index.php?title=User:Christoph Fischer (WMDE)/Gadgets/DeepCat.js&action=raw&ctype=text/javascript" );
mw.loader.load( "//de.wikipedia.org/w/index.php?title=User:Christoph Fischer (WMDE)/Gadgets/DeepCat.css&action=raw&ctype=text/css" , "text/css" );
  • enter your search strings into the search box on Commons, do not use the links.

Please post here if you still encounter problems.

I didn't use the links for my search, i did my search and afterwards made up the links to explain my problem. and my common.js already contains this lines.

@Kersti
I get completely different results than you. When I log out of commons, i.e. when the Gadget is disabled, I get similar result sizes for your search queries.

It seems the Gadget code is not enabled or not executed. Please make sure again that you are logged in while you do the search, that you have the Gadget enabled on Commons, and that your browser allows executing the JavaScript.

Hello Kersti,

currently the DeepCat-Gadget is not working with the advanced search. We already have an issue for that:

https://phabricator.wikimedia.org/T119405

In the ticket you can also find a workaround if you still want use the gadget with the advanced search.

I hope that helps,
Fisch

DeepCat-Gadget is not working with the advanced search: Thank you very much, this WAS my problem.

@Kersti

we just updated the gadget with support for the advanced search. If you find any other bugs or have suggestions for improvements please don't hesitate to ask.

Have a nice weekend,
Fisch

Next problem - or in fact two.

  1. In many cases the deepcat gadget needs about 24 hours to notice, that a category is newly categoriced in another category. As I usually work on categories which need more subcategories that means, that I have to add -category:"XXX" by hand for each new category. If there are about 1000 pictures to be categoriced and therefore about 20 Subcategories to be addet, that's really annoying! - I would guess, this is due to the same problem why categories within templates are noticed days after adding the template and the pictures are listet in the parent categories only after days of waiting. Therefore I would guess that there is no easy way to solve this.
  1. Somtimes in a deepcat search I don't get a search result but the category which has the name of the word I search for. As everyone who does deepcat searchs will need a search result and not a category this should be stopped.

Hi @Kersti,

Thanks for your post.

To 1.: CatGraph, the tool used by DeepCat, updates its graph databases normally a few times a day. But depending to the size of the project ( commons is quite big ) and depending on the server workload this can also happen more infrequent with a delay up to 24h hours or more. We will try to improve that but in general a certain delay will remain.

To 2.: Could you elaborate on that with an example? What is your search request? What do you get? What do you expect?

best,
Fisch

Up to now this problem didn't emerge again, but I fount this one, with the search specified in the link
[[ https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&deepCatSearch=%22Waters%27+Edge+Park%22+-deepcat%3A%22Waters%27_Edge_Park%22++&fulltext=Search&search-cat-all=&search-cat-none=&search-file-copyright=any&search-file-type=&search-orig-query=%22Waters%27+Edge+Park%22+-deepcat%3A%22Waters%27_Edge_Park%22+&ns6=1&ns14=1&profile=advanced&deepCatError=[{%22mwMessage%22%3A%22deepcat-error-unexpected-response%22%2C%22parameter%22%3Anull}]&search=%22Waters%27+Edge+Park%22+ | "Waters' Edge Park" -deepcat:"Waters'_Edge_Park" ]]

Fehlermeldung: CatGraph-Tool lieferte ein unerwartetes Ergebnis.

Ergebnis: Bei der Suche werden alle Dateinen in den Kategorien gefunden, also genau die, die er nicht finden soll. Dasselbe gescieht wenn ich das Suchfenster in der Seitenleiste benutze.

The reason for the strange results above is in fact the failing CatGraph request. When the CatGraph request fails ( I cant tell you why that happend in your case, maybe the CatGraph server was down ) the negative filter you use with -deepcat:"Waters'_Edge_Park" has no effect.

Now when I click the link and resubmit the request get this result:

https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&deepCatSearch=Waters_Edge_Park+-deepcat%3A%22Waters%27_Edge_Park%22&fulltext=Search&ns6=1&ns14=1&profile=advanced&search=Waters_Edge_Park+-incategory%3Aid%3A20143335|id%3A23621101|id%3A24562258

I assume, that this is the effect you mentioned in you post above: You filtered the category Waters'_Edge_Park by using -deepcat:"Waters'_Edge_Park" but the category itself is still part of the results.

That is complicated.

In my user preferences for the search the category option is checked, as the first thing what I search for, when I start to work with a search is the main category for the topic.

Than I go in the category and use the "search not in category" button, that I activated in the preferences and replace -incategory: with -deepcat: , change the words I search for and uncheck the category box as I already have the category I need.

The problem with all this is, that the category box sometimes is checked again after clicking on search - that is not every time I do this, but after searching three or four times with the same search the category box often is checked again by itself. (The search goes back to my user preferences without being told to do so.)

As this happens by itself, I can't prevent it and of course I won't even know it, as I unchecked the box before searching.

Lea_WMDE renamed this task from [DeepCat] Epic: Search gadget for subcategories and intersections search to Search gadget for subcategories and intersections search (2013).Sep 23 2016, 3:19 PM
Lea_WMDE moved this task from Backlog to Done on the German-Community-Wishlist-Main-Wishes board.