On 10/13/2014 05:09 PM, Shalin Shekhar Mangar wrote:
> That sounds like
> re-ranking?
> https://cwiki.apache.org/confluence/display/solr/Query+Re-Ranking

Interesting approach. So at least I don't have to implement an
additional custom sort function. However,

"If a document matches the original query, but does not match the
re-ranking query, the document's original score will remain."

I need the ImageSimilarityQuery to drop docs with dissimilar images from
the result set. As this apparently cannot be done in the re-rank query,
I'ld have to run the ImageSimilarityQuery twice: once as a post filter
to trim the recall, and then as a re-rank query for correct sorting.

As computing the image similarities is quite expensive, I'ld rather not
do this twice.

Any idea how I can resolve this?

Cheers, Patrick

> On Mon, Oct 13, 2014 at 8:34 PM, Patrick Schemitz <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     Hi all,
> 
>     I'm trying to implement an image similarity search using Solr 4.6.1.
> 
>     I store an image descriptor in each document, and compare these with the
>     descriptor given in the query, resulting in an image similarity score.
>     This score is then used to filter documents (via a threshold), and to
>     sort the results.
> 
>     I've written the boilerplate QParser and QParserPlugin around a custom
>     Query and its accompanying Weight and Scorer classes. The
>     Scorer.nextDoc() is where the actual image similarity computation (and
>     skipping of docs below the threshold) takes place.
> 
>     This Query/Weight/Scorer construct is obviously very costly, so I don't
>     want it to leapfrog with the other - much faster - filters in the query
>     (especially when using a high threshold).
> 
>     I've tried the "post filtering" mechanism described by Yonik here:
>     http://java.dzone.com/articles/advanced-filter-caching-solr
> 
>     This speeds up things, but now the results are not sorted by image
>     similarity any more.
> 
>     I guess what I actually need is a "post query", as opposed to a "post
>     filter".
> 
>     How can I bring together post filtering and sorting?
> 
>     Do I have to write and use a custom sort function, effectively computing
>     image similarities twice?
> 
>     Any help appreciated!
> 
>     Cheers, Patrick
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: [email protected]
>     <mailto:[email protected]>
>     For additional commands, e-mail: [email protected]
>     <mailto:[email protected]>
> 
> 
> 
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to