Re: Multiple query fields in DisMax handler

2008-07-17 Thread chris sleeman
Thanks a lot..this is, more or less, what i was looking for. However, is there a way to pre-configure the dismax query parser, with parameters like qf, pf, boost etc., in solr-config.xml, rather than doing so at query time. So my actual query would look like -

Re: Multiple query fields in DisMax handler

2008-07-17 Thread Preetam Rao
If I understand the question correctly, you can provide init params, default params and invariant params in the appropriate request handler section in solrconfig.xml. So you can create a standard request handler with name dismaxL, whose defType is dismax and set all parameters in defaults section.

Re: Multiple query fields in DisMax handler

2008-07-17 Thread chris sleeman
What I actually meant was whether or not I could create a configuration for a dismax query parser and then refer to it in my filter query. I already have a standard request handler with a dismax deftype for my query field. I wanted to use another dismax parser for the fq param, on the lines of

Re: Multiple query fields in DisMax handler

2008-07-17 Thread Erik Hatcher
A custom QParserPlugin could be created and implement an #init(NamedList) which you could parameterize via it's solrconfig.xml configuration. That would be one way. Another trick, I think, would be to use request parameter substitution. The javadocs here might lead you to what you're

Re: Multiple query fields in DisMax handler

2008-07-17 Thread Preetam Rao
I see that a QParser takes local params (those given via {!...} )as well as request params. It sets the lookup chain as local followed be request params. AFAIK, the request param lookup chain is set up as - those given in the url explicitly, then invariants, then defaults gievn in solrconfig for

Re: Multiple query fields in DisMax handler

2008-07-17 Thread Preetam Rao
Oops.. this will only help you configure only the defaults common to the main dismax query as well as the fq dismax query. For creating two sets of dismax parsers which are named and want to read params from solrconfig, I think one can extend the dismaxQParser's currently empty init() method to

Re: Multiple query fields in DisMax handler

2008-07-17 Thread chris sleeman
Thanks a ton...this is quite useful. Regards, Chris On Thu, Jul 17, 2008 at 6:42 PM, Yonik Seeley [EMAIL PROTECTED] wrote: On Thu, Jul 17, 2008 at 8:11 AM, chris sleeman [EMAIL PROTECTED] wrote: What I actually meant was whether or not I could create a configuration for a dismax query

Multiple query fields in DisMax handler

2008-07-16 Thread chris sleeman
Hi all, Is there currently a way of specifying more than 1 user query fields (q parameter) with the disMax request handler ? Basically my requirement is this - I have 2 user query fields - 'query' and 'location', each of which corresponds to multiple solr query fields. The 'location' entered by

Re: Multiple query fields in DisMax handler

2008-07-16 Thread Shalin Shekhar Mangar
Is it possible to use fq parameters for filtering on the address fields? Then the q and other dismax params can be used for your main query. On Wed, Jul 16, 2008 at 8:59 PM, chris sleeman [EMAIL PROTECTED] wrote: Hi all, Is there currently a way of specifying more than 1 user query fields (q

Re: Multiple query fields in DisMax handler

2008-07-16 Thread Erik Hatcher
There are also likely some way wacky things you could do with mixing and matching query parsers even within a q. FunctionQParser and friends probably hold some crazy voodoo. Erik On Jul 16, 2008, at 1:29 PM, Shalin Shekhar Mangar wrote: Is it possible to use fq parameters for

Re: Multiple query fields in DisMax handler

2008-07-16 Thread Ryan McKinley
(assuming you are using 1.3-dev), you could use the dismax query parser syntax for the fq param. I think it is something like: fq=!dismaxyour query I can't find the syntax now (Yonik?) but I don't know how you could pull out the qf,pf,etc fields for the fq portion vs the q portion. On

Re: Multiple query fields in DisMax handler

2008-07-16 Thread Erik Hatcher
On Jul 16, 2008, at 7:38 PM, Ryan McKinley wrote: (assuming you are using 1.3-dev), you could use the dismax query parser syntax for the fq param. I think it is something like: fq=!dismaxyour query The latest committed syntax is: {!dismax qf=}your query For example, with the sample