Re: Any way to get top 'n' queries searched from Solr?

2010-04-30 Thread Peter Sturge
Yes, you're right, SOLR-1872 is for security authorization, and part of this
is to audit what users are searching. The reference to this was to show you
how your requirement can be accomplished.

To have just the auditing and not the security, you'd need to create your
own SearchComponent and extract out just the auditing bits, or remove the
security bits. This shouldn't be too difficult to do.
Or, you can simply see how it's done, and create your own SearchComponent
and use the same technique. Your SearchComponent should work out a lot
simpler than the one in SOLR-1872.

In the case of audit persistence in SOLR-1872, audit events are written to a
log file, which just happens to be monitored by an external file monitor
which can feed new log entries to other sources (e.g. another index, an
external log repository etc.). It's done this way to keep any external audit
routing/delivery separate from the webapp (it's not part of solr.war's remit
to do audit routing).

For your requirement, you'll probably want to write audited searches
directly into a Solr index, either the same one as is being searched or a
different one (a different one is better, so your public users don't have
access to your search stats). You can use any of the available /update
mechanisms to accomplish this.


Thanks,
Peter


On Fri, Apr 30, 2010 at 11:08 AM, pk  wrote:

>
> Peter,
> It seems that your solution (SOLR-1872) requires authentication too (and be
> tracked via ur uuid), but my users will be general public using browsers,
> and i can't force any such auth restrictions. Also you didn't mention if
> you
> are already persisting the audit data.. Or i may need to extend it to work
> for my problem..
>
> My requirement is simple: to know top n query strings with their
> frequencies
> etc..
> Thanks though.
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Any-way-to-get-top-n-queries-searched-from-Solr-tp767165p767482.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Any way to get top 'n' queries searched from Solr?

2010-04-30 Thread Praveen Agrawal
Thanks Mitch..
I've an application fronting the Solr for updating/searching etc, and i'll
make use of that to store this info.

Thanks to all for suggestions.


On Fri, Apr 30, 2010 at 3:43 PM, MitchK  wrote:

>
> The most simple way is to send the querystring to your Solr-client *and* to
> your custom query-fetcher, which could be any database you like. Doing so,
> you can count how often which query was send etc.
> *And* you can make them searchable by exporting those datasets to another
> Solr-core.
> Why  an extra DB?
> Because if there occurs a crash, you got no guaranties given by Solr. Keep
> in mind that Solr is only an index-search-server, not a real database.
>
> This is the pretty easiest way to implement such a feature, I think.
>
> Good luck.
> - Mitch
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Any-way-to-get-top-n-queries-searched-from-Solr-tp767165p767489.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Any way to get top 'n' queries searched from Solr?

2010-04-30 Thread Abdelhamid ABID
Hi,
Why you don't just create a filter in the solr context, by this way you can
grasp user q param and persist it.

On 4/30/10, pk  wrote:
>
>
> Peter,
> It seems that your solution (SOLR-1872) requires authentication too (and be
> tracked via ur uuid), but my users will be general public using browsers,
> and i can't force any such auth restrictions. Also you didn't mention if
> you
> are already persisting the audit data.. Or i may need to extend it to work
> for my problem..
>
> My requirement is simple: to know top n query strings with their
> frequencies
> etc..
> Thanks though.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Any-way-to-get-top-n-queries-searched-from-Solr-tp767165p767482.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Abdelhamid ABID
Software Engineer- J2EE / WEB


Re: Any way to get top 'n' queries searched from Solr?

2010-04-30 Thread MitchK

The most simple way is to send the querystring to your Solr-client *and* to
your custom query-fetcher, which could be any database you like. Doing so,
you can count how often which query was send etc.
*And* you can make them searchable by exporting those datasets to another
Solr-core.
Why  an extra DB?
Because if there occurs a crash, you got no guaranties given by Solr. Keep
in mind that Solr is only an index-search-server, not a real database.

This is the pretty easiest way to implement such a feature, I think.

Good luck.
- Mitch
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Any-way-to-get-top-n-queries-searched-from-Solr-tp767165p767489.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Any way to get top 'n' queries searched from Solr?

2010-04-30 Thread pk

Peter, 
It seems that your solution (SOLR-1872) requires authentication too (and be
tracked via ur uuid), but my users will be general public using browsers,
and i can't force any such auth restrictions. Also you didn't mention if you
are already persisting the audit data.. Or i may need to extend it to work
for my problem..

My requirement is simple: to know top n query strings with their frequencies
etc..
Thanks though.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Any-way-to-get-top-n-queries-searched-from-Solr-tp767165p767482.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Any way to get top 'n' queries searched from Solr?

2010-04-30 Thread Peter Sturge
As far as I'm aware, this information isn't stored intrinsically in Solr.

We had a similar requirement whereby we need to keep track of which searches
have been performed by particular users.
This is more of a security audit requirement rather than generic searching,
but the solution was to audit (in a SearchComponent) all users' search
activity. This auditing can then be written back to the index (or, perhaps
more preferably, a separate index), which can then be searched in the normal
way.

You could adopt the same strategy for your requirement. If you want to see
how we did this, have a look at SOLR-1872.

Thanks,
Peter




On Fri, Apr 30, 2010 at 7:14 AM, Praveen Agrawal  wrote:

> Hi,
> I need to know what are the top (most frequently searched and their
> frequencies) 'n' (say 100) search queries that users tried. Does Solr keep
> this information and can return, or else what options do i have here?
> Thanks,
> Praveen
>


Any way to get top 'n' queries searched from Solr?

2010-04-29 Thread Praveen Agrawal
Hi,
I need to know what are the top (most frequently searched and their
frequencies) 'n' (say 100) search queries that users tried. Does Solr keep
this information and can return, or else what options do i have here?
Thanks,
Praveen