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 Smith G <gu...@gmail.com> on 2009/12/31 15:29:46 UTC

solr query search : flow of execution.

Hello All,
              I have no complete knowledge of query execution workflow
. I have an issue. I had one approach to edit all the user submitted
queries in the queryparser part ( for every request ), but later I was
suggested to do query modification only if the user submitted query
has no results at all. So I need to edit / modify user submitted query
only when it has no results. Is it possible to do ?. Like.. can I
sendback flow of execution to queryparsing part after checking whether
the current query has results or not..? , or to be brief.. Can I
search again if result count is zero..if yes,then at which point, may
I accomplish the same?

 NOTE: This "editing query" is something related to the project that
should be followed.

Thanks.

Re: solr query search : flow of execution.

Posted by Erik Hatcher <er...@gmail.com>.
My first recommendation would be to do this client-side, just search  
again with a new query if there are zero results returned.

However, you can accomplish what you're after with custom  
QueryComponent, subclassing the default one, call super, check the  
count, if zero, adjust the query and call again.

	Erik

On Dec 31, 2009, at 9:29 AM, Smith G wrote:

> Hello All,
>              I have no complete knowledge of query execution workflow
> . I have an issue. I had one approach to edit all the user submitted
> queries in the queryparser part ( for every request ), but later I was
> suggested to do query modification only if the user submitted query
> has no results at all. So I need to edit / modify user submitted query
> only when it has no results. Is it possible to do ?. Like.. can I
> sendback flow of execution to queryparsing part after checking whether
> the current query has results or not..? , or to be brief.. Can I
> search again if result count is zero..if yes,then at which point, may
> I accomplish the same?
>
> NOTE: This "editing query" is something related to the project that
> should be followed.
>
> Thanks.