[ 
https://issues.apache.org/jira/browse/SOLR-2026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895912#action_12895912
 ] 

Lance Norskog commented on SOLR-2026:
-------------------------------------

bq. The incoming request has a "query", but it may not be possible to convert 
that "query" into a single Lucene index query. (It's really important to keep 
track of the distinction between the user query and the underlying Lucene 
queries, or you'll go insane.) In my situation, the place where I see this 
happening is wh,en there are two (or more) non-trivial query parsers, yielding 
multiple stages to evaluate a final response - e.g., Query Parser 1 generates a 
lucene query that yields results, which are used in part to construct the query 
generated by Query Parser 2 in some way. 

Yes, this is a valid use case. There are other use cases that I've seen over 
the months that have other reasons to do a series of queries instead of one.  I 
claim that if Solr really supports this, it should support it with a clean, 
modular architecture which handles many different uses cases that we don't know 
about yet. This implies programmability to achieve each use case. This would 
mean either, as you suggest, adding a way to allow QueryHandlers to do multiple 
calls, or adding a scripting language _to the server side_.

But, this shakes out as two levels: a scripting language would have to be a 
QueryHandler that does two Solr queries, so it would need the improvement you 
supply in this issue.

So, I would request that the new QueryHandler infrastructure be able to support 
the Java scripting APIs.

Lance

> Need infrastructure support in Solr for requests that perform multiple 
> sequential queries
> -----------------------------------------------------------------------------------------
>
>                 Key: SOLR-2026
>                 URL: https://issues.apache.org/jira/browse/SOLR-2026
>             Project: Solr
>          Issue Type: Improvement
>          Components: SearchComponents - other
>            Reporter: Karl Wright
>            Assignee: Simon Willnauer
>         Attachments: SOLR-2026.patch, SOLR-2026.patch
>
>
> Several known cases exist where multiple index searches need to be performed 
> in order to arrive at the final result.  Typically, these have the constraint 
> that the results from one search query are required in order to form a 
> subsequent search query.  While it is possible to write a custom 
> QueryComponent or search handler to perform this task, an extension to the 
> SearchHandler base class would readily permit such query sequences to be 
> configured using solrconfig.xml.
> I will be therefore writing and attaching a patch tomorrow morning which 
> supports this extended functionality in a backwards-compatible manner.  The 
> tricky part, which is figuring out how to funnel the output of the previous 
> search result into the next query, can be readily achieved by use of the 
> SolrRequestObject.getContext() functionality.  The stipulation will therefore 
> be that the SolrRequestObject's lifetime will be that of the entire request, 
> which makes complete sense.  (The SolrResponseObject's lifetime will, on the 
> other hand, be limited to a single query, and the last response so formed 
> will be what gets actually returned by SearchHandler.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to