Hello Solr-dev,
I've now implemented a QParserPlugin/QParser for tagging functionality in my
internal Solr environment, and this is working very nicely.
The type of functionality offered by tagging isn't currently in Solr, so I was
thinking this might be a good plugin to contribute to the project. Before
preparing the plugin for ASF-readiness, it would be great to get feedback,
comments etc. on what the Solr dev experts think of including this sort of
thing. If it's deemed useful for inclusion, I'll go ahead and create a JIRA
issue and prepare the code for ASF.
Here is a quick precis of what tagging offers:
First off, for your typical user-based searching of 'shopping cart' or
google-type doc-scored searching, tagging is probably not what you want. Dismax
provides a much better fit for this type of searching.
Tagging provides a means of entering a tag into a query, which, on the server
(in the plugin) translates to some configured subquery that is actually
executed by Solr.
There are a number of cool use-cases for this - the 2 most salient of which are
these:
1. To provide a known 'key' at query time, that translates into subqueries that
the user couldn't/wouldn't/shouldn't know at query time.
For example, I use this to supply a tag called: 'admins', which, when entered
into a query, will actually query for all documents that have some reference to
all administrators/root users in the searched index(es). The [securely
logged-in] person searching won't know who all the root users are (and the list
will change over time), only that he/she wishes to find out information
pertaining to their activity.
2. To provide subquery 'shortcuts' for often used, usually lengthy and/or
complicated queries.
For example, if every morning, as part of your job, you need to search for:
((this AND that) OR (theother AND NOT somethingelse)) AND timestamp:[then TO
now] . . .
A tag can be made, say, 'mysearchtag' which equates to the above query.
This tag can then be used as a query, and/or embedded in other queries.
This is quite handy for automated searching and/or saved searches etc.
This allows server administrators to control the content that gets returned by
these queries, thus reducing client-side maintenance.
Additionally, for distributed searches, evaluated tags can, if desired, produce
different queries for different shards (e.g. the list of root users are
different on different machines).
Any comments, concerns, opinions etc. on a contributuion of this type would be
greatly appreciated.
Many thanks,
Peter
_________________________________________________________________
Do you have a story that started on Hotmail? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/