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 Savvas-Andreas Moysidis <sa...@googlemail.com> on 2011/06/02 13:46:52 UTC

Function Query not getting picked up by Standard Query Parser

Hello,

I'm trying to find out why my Function Query isn't getting picked up by the
Standard Parser.
More specifically I send the following set of http params (I'm using the
"_val_" syntax):
.................................

<lst name="params">
<str name="_val_">"creationDate"^0.01</str>
<str name="debugQuery">on</str>
<str name="start">225</str>
<str name="q">allFields:(born to be wild)</str>
<str name="rows">5</str>
</lst>
.................................

and turning on Debug Query yields the following calculation for the first
result:
.................................

0.29684606 = (MATCH) product of:
  0.5936921 = (MATCH) sum of:
    0.5936921 = (MATCH) weight(allFields:wild in 13093), product of:
      0.64602524 = queryWeight(allFields:wild), product of:
        5.88155 = idf(docFreq=223, maxDocs=29531)
        0.10983928 = queryNorm
      0.91899216 = (MATCH) fieldWeight(allFields:wild in 13093), product of:
        1.0 = tf(termFreq(allFields:wild)=1)
        5.88155 = idf(docFreq=223, maxDocs=29531)
        0.15625 = fieldNorm(field=allFields, doc=13093)
  0.5 = coord(1/2)
.................................

but I don't see anywhere my Function Query affecting the score..
Is there something else I should be setting? what am I missing?

Cheers,
Savvas

Re: Re: Can I update a specific field in solr?

Posted by Mohammad Shariq <sh...@gmail.com>.
Solr dont support partial updates.

On 8 June 2011 16:04, ZiLi <da...@163.com> wrote:

>
> Thanks very much , I'll re-index a whole document : )
>
>
>
>
> 发件人: Chandan Tamrakar
> 发送时间: 2011-06-08  18:25:37
> 收件人: solr-user
> 抄送:
> 主题: Re: Can I update a specific field in solr?
>
> I think You can do that but you need to re-index a whole document again.
> note that there is nothing like "update"  , its usually delete and then
> add.
> thanks
> On Wed, Jun 8, 2011 at 4:00 PM, ZiLi <da...@163.com> wrote:
> > Hi, I try to update a specific field in solr , but I didn't find anyway
> to
> > implement this .
> > Anyone who knows how to ?
> > Any suggestions will be appriciate : )
> >
> >
> > 2011-06-08
> >
> >
> >
> > ZiLi
> >
> --
> Chandan Tamrakar
> *
> *
>



-- 
Thanks and Regards
Mohammad Shariq

Re: Re: Can I update a specific field in solr?

Posted by ZiLi <da...@163.com>.
Thanks very much , I'll re-index a whole document : ) 




发件人: Chandan Tamrakar 
发送时间: 2011-06-08  18:25:37 
收件人: solr-user 
抄送: 
主题: Re: Can I update a specific field in solr? 
 
I think You can do that but you need to re-index a whole document again.
note that there is nothing like "update"  , its usually delete and then add.
thanks
On Wed, Jun 8, 2011 at 4:00 PM, ZiLi <da...@163.com> wrote:
> Hi, I try to update a specific field in solr , but I didn't find anyway to
> implement this .
> Anyone who knows how to ?
> Any suggestions will be appriciate : )
>
>
> 2011-06-08
>
>
>
> ZiLi
>
-- 
Chandan Tamrakar
*
*

Re: Can I update a specific field in solr?

Posted by Chandan Tamrakar <ch...@nepasoft.com>.
I think You can do that but you need to re-index a whole document again.

note that there is nothing like "update"  , its usually delete and then add.

thanks

On Wed, Jun 8, 2011 at 4:00 PM, ZiLi <da...@163.com> wrote:

> Hi, I try to update a specific field in solr , but I didn't find anyway to
> implement this .
> Anyone who knows how to ?
> Any suggestions will be appriciate : )
>
>
> 2011-06-08
>
>
>
> ZiLi
>



-- 
Chandan Tamrakar
*
*

Can I update a specific field in solr?

Posted by ZiLi <da...@163.com>.
Hi, I try to update a specific field in solr , but I didn't find anyway to implement this . 
Anyone who knows how to ?
Any suggestions will be appriciate : )


2011-06-08 



ZiLi 

Re: Function Query not getting picked up by Standard Query Parser

Posted by Savvas-Andreas Moysidis <sa...@googlemail.com>.
great, that did it! I can now see the Function Query part in the
calculation.

Thanks very much Eric,
Savvas

On 2 June 2011 13:28, Erik Hatcher <er...@gmail.com> wrote:

> For this to work, _val_:"...." goes *in* the q parameter, not as a separate
> parameter.
>
> See here for more details:
> http://wiki.apache.org/solr/SolrQuerySyntax#Differences_From_Lucene_Query_Parser
>
>        Erik
>
> On Jun 2, 2011, at 07:46 , Savvas-Andreas Moysidis wrote:
>
> > Hello,
> >
> > I'm trying to find out why my Function Query isn't getting picked up by
> the
> > Standard Parser.
> > More specifically I send the following set of http params (I'm using the
> > "_val_" syntax):
> > .................................
> >
> > <lst name="params">
> > <str name="_val_">"creationDate"^0.01</str>
> > <str name="debugQuery">on</str>
> > <str name="start">225</str>
> > <str name="q">allFields:(born to be wild)</str>
> > <str name="rows">5</str>
> > </lst>
> > .................................
> >
> > and turning on Debug Query yields the following calculation for the first
> > result:
> > .................................
> >
> > 0.29684606 = (MATCH) product of:
> >  0.5936921 = (MATCH) sum of:
> >    0.5936921 = (MATCH) weight(allFields:wild in 13093), product of:
> >      0.64602524 = queryWeight(allFields:wild), product of:
> >        5.88155 = idf(docFreq=223, maxDocs=29531)
> >        0.10983928 = queryNorm
> >      0.91899216 = (MATCH) fieldWeight(allFields:wild in 13093), product
> of:
> >        1.0 = tf(termFreq(allFields:wild)=1)
> >        5.88155 = idf(docFreq=223, maxDocs=29531)
> >        0.15625 = fieldNorm(field=allFields, doc=13093)
> >  0.5 = coord(1/2)
> > .................................
> >
> > but I don't see anywhere my Function Query affecting the score..
> > Is there something else I should be setting? what am I missing?
> >
> > Cheers,
> > Savvas
>
>

Re: Function Query not getting picked up by Standard Query Parser

Posted by Erik Hatcher <er...@gmail.com>.
For this to work, _val_:"...." goes *in* the q parameter, not as a separate parameter.

See here for more details: http://wiki.apache.org/solr/SolrQuerySyntax#Differences_From_Lucene_Query_Parser

	Erik

On Jun 2, 2011, at 07:46 , Savvas-Andreas Moysidis wrote:

> Hello,
> 
> I'm trying to find out why my Function Query isn't getting picked up by the
> Standard Parser.
> More specifically I send the following set of http params (I'm using the
> "_val_" syntax):
> .................................
> 
> <lst name="params">
> <str name="_val_">"creationDate"^0.01</str>
> <str name="debugQuery">on</str>
> <str name="start">225</str>
> <str name="q">allFields:(born to be wild)</str>
> <str name="rows">5</str>
> </lst>
> .................................
> 
> and turning on Debug Query yields the following calculation for the first
> result:
> .................................
> 
> 0.29684606 = (MATCH) product of:
>  0.5936921 = (MATCH) sum of:
>    0.5936921 = (MATCH) weight(allFields:wild in 13093), product of:
>      0.64602524 = queryWeight(allFields:wild), product of:
>        5.88155 = idf(docFreq=223, maxDocs=29531)
>        0.10983928 = queryNorm
>      0.91899216 = (MATCH) fieldWeight(allFields:wild in 13093), product of:
>        1.0 = tf(termFreq(allFields:wild)=1)
>        5.88155 = idf(docFreq=223, maxDocs=29531)
>        0.15625 = fieldNorm(field=allFields, doc=13093)
>  0.5 = coord(1/2)
> .................................
> 
> but I don't see anywhere my Function Query affecting the score..
> Is there something else I should be setting? what am I missing?
> 
> Cheers,
> Savvas