It wouldn't be too hard to write a Solr Plugin that take a param docId together 
with a query and return the position of that doc within the result list for 
that query. You will still need to deal with the performance though. For 
example, if the doc ranks at one millionth, the plugin still needs to get at 
least 1M docs, and so the underlying collector still needs to sort through 1M 
documents.

Maybe your business requirement is different, but does it really make a 
difference if a document ranks at one thousandth or one millionth? For example 
with Google SEO, either you rank in the first 3 (precision at 3) or you don't 
:) 

--Tri

On Jun 23, 2014, at 10:55 PM, Jorge Luis Betancourt Gonzalez 
<jlbetanco...@uci.cu> wrote:

Basically this is for analytical purposes, essentially we want to help people 
(which sites we’ve indexed in our app) to find out for which particular terms 
(in theory related with their domain) they are bad positioned in our index. 
Initially we’re starting with this basic “position per term” but the idea is to 
elaborate further in this direction.

This logic por position finding could be abstracted effectively in a plugin 
inside Solr? I guess it would be more efficient to iterate (or fire the 2 
queries) from within solr itself than in our app (written in PHP, so not so 
fast for some things) speeding up things?

Regards,

On Jun 24, 2014, at 1:42 AM, Aman Tandon <amantandon...@gmail.com        > 
wrote:

       > Jorge, i don't think that solr provide this functionality, you have to
       > iterate and solr is very fast in this, you can create a script for that
       > which search for pattern(term) and parse(request) the records until 
get the
       > record of that desired url, i don't thing 1/3 seconds time to find out 
is
       > more.
       >        > As per the search result analysis, there are very few people who request
       > for the second page for their query, otherwise mostly leave the search 
or
       > modify query string. So i better suggest you that the if the website 
has
       > the appropriate and good data it should come on first page, so its 
better
       > to come on first page rather than finding the position.
       >        > With Regards
       > Aman Tandon
       >        >        > On Tue, Jun 24, 2014 at 10:35 AM, Jorge Luis Betancourt Gonzalez <
       > jlbetanco...@uci.cu        > wrote:
       >        >        > Yes, but I’m looking for the position of the url field of interest in the
       >        > response of solr. Solr matches the terms against the 
collection of
       >        > documents and returns sorted list by score, what I’m trying 
to do is get
       >        > the position of the a specific id in this sorted response. 
The response
       >        > could be something like position: 5, or position 500. To do 
this manually
       >        > suppose the response consists of a very large amount of 
documents
       >        > (webpages) in this case I would need to iterate over the 
complete response
       >        > to find the position, which in a worst case scenario could be 
in the last
       >        > page for instance. For this particular use case I’m not so 
interested in
       >        > the URL field per se but more on the position a certain url 
has in the full
       >        > solr response.
       >        >        >        > On Jun 24, 2014, at 12:31 AM, Walter Underwood <wun...@wunderwood.org      >
       >        > wrote:
       >        >        >        >        > Solr is designed to do exactly this very, very fast. So there isn't a
       >        > faster way to do it. But you only need to fetch the URL 
field. You can
       >        > ignore everything else.
       >        >        >        >        >        > wunder        >        >        >        >        >        > On Jun 23, 2014, at 9:32 PM, Jorge Luis Betancourt Gonzalez <
       >        > jlbetanco...@uci.cu        > wrote:
       >        >        >        >        >        >        > Basically given a few search terms (query) the idea is to know given
       >        > one or more terms in which position your website is located 
for those
       >        > specific terms.
       >        >        >        >        >        >        >        > On Jun 24, 2014, at 12:12 AM, Aman Tandon <amantandon...@gmail.com    >
       >        > wrote:
       >        >        >        >        >        >        >        >        > What kind of search criteria, could you please explain        >        >        >        >        >        >        >        >        >        > With Regards
       >        >        >        >        > Aman Tandon
       >        >        >        >        >        >        >        >        >        >        >        >        >        >        > On Tue, Jun 24, 2014 at 4:30 AM, Jorge Luis Betancourt Gonzalez <
       >        >        >        >        > jlbetanco...@uci.cu        > wrote:
       >        >        >        >        >        >        >        >        >        >        > I’m using Solr for an analytic use case, one of the requirements is
       >        >        >        >        >        > basically given a search 
query get the position of the first hit. I’m
       >        >        >        >        >        > indexing web pages, so 
given a search criteria the client want’s to
       >        > know
       >        >        >        >        >        > the position (first 
occurrence) of his webpage in the result set (if
       >        > it
       >        >        >        >        >        > appears at all). Is any 
way of getting this position without
       >        > iterating and
       >        >        >        >        >        > manually checking the 
solr response?
       >        >        >        >        >        >        >        >        >        >        >        > Greetings,        >        >        >        >        >        >        >        >        >        >        >        >        >        >        >        >        >        > VII Escuela Internacional de Verano en la UCI del 30 de junio al 11 de
       >        >        >        >        >        > julio de 2014. Ver 
www.uci.cu
       >        >        >        >        >        >        >        >        >        >        >        >        >        > VII Escuela Internacional de Verano en la UCI del 30 de junio al 11 de
       >        > julio de 2014. Ver www.uci.cu
       >        >        >        >        >        >        >        >        >        >        >        >        >        >        >        > VII Escuela Internacional de Verano en la UCI del 30 de junio al 11 de
       >        > julio de 2014. Ver www.uci.cu
       >        >
VII Escuela Internacional de Verano en la UCI del 30 de junio al 11 de julio de 
2014. Ver www.uci.cu

Reply via email to