Hi Markus, Jeroen,

For some time we were looking for ways to enable a combined search
(Special:Search and Special:Ask) because the occasional user faces
some obstacles when using Special:Ask (query language even though
Special:Ask provides an interface, missing knowledge of existing
annotations to a specific term/page).

We tried Special:QueryCreator but it did not fit our requirements to
overcome those named obstacles for the "normal" user and therefore we
tried to find another way to integrate part of the query process into
Special:Search without violating SMM's or MW' core and without copying
the whole/extent SpecialSearch class.

We came up with the SMWSearchProfile [0] with its initial objective to
increase convenience and enable the "normal" user to interact with the
standard (Special:Search) and the semantic search (Special:Ask) at the
same time (within one interface) without having the user concentrating
too much on a specific query language.

== SMWSearchProfile  ==

Starting with MW 1.18/1.19, SpecialSearch provides several new hooks
[1.1], [1.2] that enabled us to create an additional search profile
with different input methods (property / category / namespace selector
etc.) while all search functions in Special:Search keeping their
original functionality (any particular search engine implemented in
the back end, works without interference) this new SearchProfile
allows us to provide some flexibility in how to present semantic
context to an search term entered through Special:Search.

SMWSearchProfile is ''A simplified input for a simplified search''
where less proficient or occasional users with a higher than average
barrier to use Special:Ask become proficient to find semantic related
content.

SMWSearchProfile does not try to solve the problem to find the right
(in terms of efficiency) semantic annotation for an entered term but
rather helps to ease obstacles a user faces when he/she is confronted
with a query language like as #ask or SPARQL.

Our users were positively surprised about the possibility to have
their standard search extended with some information that otherwise
they had only been made aware of by using Special:Ask in a different
search session.

We are not sure in how far the SMW core team sees such
functionality/effort necessary for its core deployment therefore our
aim here is to make you notice of such implementation. We are
reluctant to provide just another extension because this tiny bit of
code merely justifies it nor does it introduce new functionality, it
only expands on existing ones in a different context.

A short video about on how this integration works, can be found [3].

We tried to make the code as compliant as necessary and the navigation
as simple as possible (tool tips etc.) so that with less input from an
user similar results in its output can be expected. It is far from
perfect and much improvement/review  is needed to make it general
available.

==Implementation ==
A more lengthy description can be found at [0].

A separated class SMWSearchProfile (SMW_SearchProfile.php, see [0])
handles all necessary SpecialSearch hooks and withit limiting the risk
of impacting other SMW core functionalities.

The implementation uses the RequestContext class which means that
older SMW/MW implementations will not work without this class present.

The SMWSearchProfile has been disabled by default and the user has to
opt-in (his/her user preference) to be able to see/use the semantic
search profile in Special:Search.

In order to keep response latency in Special:Search at a minimum
(while using #ask queries), SMW_SearchProfile.php supports caching so
that identical but repeated semantic queries are retrieved from cache
rather than from the database (smw-searchprofile cache time is set to
15 min).

We have tested the implementation on [ MW 1.18 SMW 1.7.0.2] and [MW
1.19 SMW 1.8 alpha] together with the standard MW search and
SphinxSearch (as a search engine backend). SolrStore couldn't be
tested (because SpecialSolrSearch did not inherit the hooks from MW
1.18/1.19 in their Special class).

[0] https://github.com/mwjames/projects/tree/master/smw-searchprofile

[1.1] 
http://www.mediawiki.org/wiki/Category:MediaWiki_hooks_included_in_SpecialSearch.php
[1.2] http://www.mediawiki.org/wiki/Special:Code/MediaWiki/86714

[3] http://youtu.be/tP7h7OySHEU

Cheers,

mwjames

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to