You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "harjags86@gmail.com" <ha...@gmail.com> on 2020/07/16 17:14:36 UTC

Querying solr using many QueryParser in one call

Hi All,
Below are question regarding querying solr using many QueryParser in one
call.
We have need to do a search by keyword and also include few specific
documents to result. We don't want to use elevator component as that would
put those mandatory documents to the top of the result. We would like to mix
those mandatory documents with organic keyword lookup result set and also
make sure those mandatory documents take part in other scoring mechanism
like bq's.On top of this we would also need to classify documents matched by
keyword lookup against mandatory docs.We ended up doing the below solr query
param to achieve it.

fl=id,title,isTermMatch:exists(query({!type=edismax qf=$qf v=blah})),score
q=({!edismax qf=$qf v=$searchQuery mm=$mm}) OR ({!edismax qf=$qf
v=$docIdQuery mm=0 sow=true})
docIdQuery=5985612 6339445 5357348
searchQuery=blah

Below are my question
1.As you can see we are calling three query parser in one call what would be
the performance implication of the search?
2.As you can see two of those queries. the one in q and one in fl is the
same. would query result cache help?
3.In general what is the implications on performance when we do a search
calling multiple query parser in a single call?



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Querying solr using many QueryParser in one call

Posted by Charlie Hull <ch...@flax.co.uk>.
Hi,

It's very hard to answer questions like 'how fast/slow might this be' - 
the best way to find out is to try, e.g. to build a prototype that you 
can time. To be useful this prototype should use representative data and 
queries. Once you have this, you can try improving performance with 
strategies like the cacheing you describe.

Charlie

On 16/07/2020 18:14, harjags86@gmail.com wrote:
> Hi All,
> Below are question regarding querying solr using many QueryParser in one
> call.
> We have need to do a search by keyword and also include few specific
> documents to result. We don't want to use elevator component as that would
> put those mandatory documents to the top of the result. We would like to mix
> those mandatory documents with organic keyword lookup result set and also
> make sure those mandatory documents take part in other scoring mechanism
> like bq's.On top of this we would also need to classify documents matched by
> keyword lookup against mandatory docs.We ended up doing the below solr query
> param to achieve it.
>
> fl=id,title,isTermMatch:exists(query({!type=edismax qf=$qf v=blah})),score
> q=({!edismax qf=$qf v=$searchQuery mm=$mm}) OR ({!edismax qf=$qf
> v=$docIdQuery mm=0 sow=true})
> docIdQuery=5985612 6339445 5357348
> searchQuery=blah
>
> Below are my question
> 1.As you can see we are calling three query parser in one call what would be
> the performance implication of the search?
> 2.As you can see two of those queries. the one in q and one in fl is the
> same. would query result cache help?
> 3.In general what is the implications on performance when we do a search
> calling multiple query parser in a single call?
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html


-- 
Charlie Hull
OpenSource Connections, previously Flax

tel/fax: +44 (0)8700 118334
mobile:  +44 (0)7767 825828
web: www.o19s.com