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 Ken Stanley <do...@gmail.com> on 2010/10/19 16:33:49 UTC

Re: **SPAM** Re: boosting injection

Andrea,

Another approach, aside of Markus' suggestion, would be to create your own
handler that could intercept the query and perform whatever necessary
transformations that you need at query time. However, that would require
having Java knowledge (which I make no assumption).

Regards,

Ken

It looked like something resembling white marble, which was
probably what it was: something resembling white marble.
                -- Douglas Adams, "The Hitchhikers Guide to the Galaxy"


On Tue, Oct 19, 2010 at 10:23 AM, Andrea Gazzarini <
andrea.gazzarini@atcult.it> wrote:

>  Hi Ken,
> thanks for your response...unfortunately it doesn't solve my problem.
>
> I cannot chnage the client behaviour so the query must be a query and not
> only the query terms.
> In this scenario, It would be great, for example, if I could declare the
> boost in the schema field definition....but I think it's not possible isn't
> it?
>
> Regards
> Andrea
>
> ------------------------------
> *From:* Ken Stanley [mailto:dohpaz@gmail.com]
> *To:* solr-user@lucene.apache.org
> *Sent:* Tue, 19 Oct 2010 15:05:31 +0200
> *Subject:* **SPAM** Re: boosting injection
>
> Andrea,
>
> Using the SOLR dismax query handler, you could set up queries like this to
> boost on fields of your choice. Basically, the q parameter would be the
> query terms (without the field definitions, and a qf (Query Fields)
> parameter that you use to define your boost(s):
> http://wiki.apache.org/solr/DisMaxQParserPlugin. A non-SOLR alternative
> would be to parse the query in whatever application is sending the queries
> to the SOLR instance to make the necessary transformations.
>
> Regards,
>
> Ken
>
> It looked like something resembling white marble, which was
> probably what it was: something resembling white marble.
> -- Douglas Adams, "The Hitchhikers Guide to the Galaxy"
>
>
> On Tue, Oct 19, 2010 at 8:48 AM, Andrea Gazzarini <
> andrea.gazzarini@atcult.it> wrote:
>
> > Hi all,
> > I have a client that is sending this query
> >
> > q=title:history AND author:joyce
> >
> > is it possible to "transform" at runtime this query in this way:
> >
> > q=title:history^10 AND author:joyce^5
> >
> > ?
> >
> > Best regards,
> > Andrea
> >
> >
> >
>
>

Re: boosting injection

Posted by Andrea Gazzarini <an...@atcult.it>.
      Hi Ken,
yes I'm a java developer so I think I should be able to do that but I 
was wondering if there's a way to solve my issue without coding.
Problem is that I need to adjust this query in a short time and in 
addition I cannot justify (at this stage of the project) additional 
software artifacts.

Anyway thanks for your support

Best Regards,
Andrea

Il 19/10/2010 16:33, Ken Stanley ha scritto:
> Andrea,
>
> Another approach, aside of Markus' suggestion, would be to create your own
> handler that could intercept the query and perform whatever necessary
> transformations that you need at query time. However, that would require
> having Java knowledge (which I make no assumption).
>
> Regards,
>
> Ken
>
> It looked like something resembling white marble, which was
> probably what it was: something resembling white marble.
>                  -- Douglas Adams, "The Hitchhikers Guide to the Galaxy"
>
>
> On Tue, Oct 19, 2010 at 10:23 AM, Andrea Gazzarini<
> andrea.gazzarini@atcult.it>  wrote:
>
>>   Hi Ken,
>> thanks for your response...unfortunately it doesn't solve my problem.
>>
>> I cannot chnage the client behaviour so the query must be a query and not
>> only the query terms.
>> In this scenario, It would be great, for example, if I could declare the
>> boost in the schema field definition....but I think it's not possible isn't
>> it?
>>
>> Regards
>> Andrea
>>
>> ------------------------------
>> *From:* Ken Stanley [mailto:dohpaz@gmail.com]
>> *To:* solr-user@lucene.apache.org
>> *Sent:* Tue, 19 Oct 2010 15:05:31 +0200
>> *Subject:* **SPAM** Re: boosting injection
>>
>> Andrea,
>>
>> Using the SOLR dismax query handler, you could set up queries like this to
>> boost on fields of your choice. Basically, the q parameter would be the
>> query terms (without the field definitions, and a qf (Query Fields)
>> parameter that you use to define your boost(s):
>> http://wiki.apache.org/solr/DisMaxQParserPlugin. A non-SOLR alternative
>> would be to parse the query in whatever application is sending the queries
>> to the SOLR instance to make the necessary transformations.
>>
>> Regards,
>>
>> Ken
>>
>> It looked like something resembling white marble, which was
>> probably what it was: something resembling white marble.
>> -- Douglas Adams, "The Hitchhikers Guide to the Galaxy"
>>
>>
>> On Tue, Oct 19, 2010 at 8:48 AM, Andrea Gazzarini<
>> andrea.gazzarini@atcult.it>  wrote:
>>
>>> Hi all,
>>> I have a client that is sending this query
>>>
>>> q=title:history AND author:joyce
>>>
>>> is it possible to "transform" at runtime this query in this way:
>>>
>>> q=title:history^10 AND author:joyce^5
>>>
>>> ?
>>>
>>> Best regards,
>>> Andrea
>>>
>>>
>>>
>>