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 michael solomon <mi...@gmail.com> on 2016/04/12 08:56:51 UTC

boost parent fields BlockJoinQuery

Hi,
I'm using in BlockJoin Parser Query for return the parent of the relevant
child i.e:
{!parent which="is_parent:true" score=max}(child_field:bla)

It's possible to boost the parent? something like:

{!parent which="is_parent:true" score=max}(child_field:bla)
parent_field:"bla bla"^10
Thanks,
Michael

Re: boost parent fields BlockJoinQuery

Posted by michael solomon <mi...@gmail.com>.
Thank your for the response.
this query worked without errors:

> (city:"tucson"^1000) +{!parent which="is_parent:true"
> score=max}(normal_text:"silver ring")
>
however, this is not exactly what I was looking for..
I got from solr all the documents that their city field has the value
Tucson.
but I wanted to BOOST only the city:"Tucson" not search in this field.
Thank you a lot,
Micheal

On Tue, Apr 12, 2016 at 10:41 PM, Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:

> Giving the error message you undercopypasted search query and and omit the
> closing bracket.
>
> On Tue, Apr 12, 2016 at 3:30 PM, michael solomon <mi...@gmail.com>
> wrote:
>
> > Thanks,
> > when I'm trying:
> > city:"walla walla"^10 {!parent which="is_parent:true"
> > score=max}(normal_text:walla)
> > I get:
> >
> > > "msg": "org.apache.solr.search.SyntaxError: Cannot parse
> > > '(normal_text:walla': Encountered \"<EOF>\" at line 1, column 18.\nWas
> > > expecting one of:\n    <AND> ...\n    <OR> ...\n    <NOT> ...\n
> \"+\"
> > > ...\n    \"-\" ...\n    <BAREOPER> ...\n    \"(\" ...\n    \")\" ...\n
> > > \"*\" ...\n    \"^\" ...\n    <QUOTED> ...\n    <TERM> ...\n
> > > <FUZZY_SLOP> ...\n    <PREFIXTERM> ...\n    <WILDTERM> ...\n
> > > <REGEXPTERM> ...\n    \"[\" ...\n    \"{\" ...\n    <LPARAMS> ...\n
> > > \"filter(\" ...\n    <NUMBER> ...\n    "
> >
> >
> > On Tue, Apr 12, 2016 at 1:30 PM, Mikhail Khludnev <
> > mkhludnev@griddynamics.com> wrote:
> >
> > > Hello,
> > >
> > > It's usually
> > > parent_field:"bla bla"^10 {!parent which="is_parent:true"
> > > score=max}(child_field:bla)
> > > or
> > > parent_field:"bla bla"^10 +{!parent which="is_parent:true"
> > > score=max}(child_field:bla)
> > >
> > > there should be no spaces in child clause, otherwise extract it to
> param
> > > and refrer via v=$param
> > >
> > >
> > > On Tue, Apr 12, 2016 at 9:56 AM, michael solomon <micheal540@gmail.com
> >
> > > wrote:
> > >
> > > > Hi,
> > > > I'm using in BlockJoin Parser Query for return the parent of the
> > relevant
> > > > child i.e:
> > > > {!parent which="is_parent:true" score=max}(child_field:bla)
> > > >
> > > > It's possible to boost the parent? something like:
> > > >
> > > > {!parent which="is_parent:true" score=max}(child_field:bla)
> > > > parent_field:"bla bla"^10
> > > > Thanks,
> > > > Michael
> > > >
> > >
> > >
> > >
> > > --
> > > Sincerely yours
> > > Mikhail Khludnev
> > > Principal Engineer,
> > > Grid Dynamics
> > >
> > > <http://www.griddynamics.com>
> > > <mk...@griddynamics.com>
> > >
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>

Re: boost parent fields BlockJoinQuery

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Giving the error message you undercopypasted search query and and omit the
closing bracket.

On Tue, Apr 12, 2016 at 3:30 PM, michael solomon <mi...@gmail.com>
wrote:

> Thanks,
> when I'm trying:
> city:"walla walla"^10 {!parent which="is_parent:true"
> score=max}(normal_text:walla)
> I get:
>
> > "msg": "org.apache.solr.search.SyntaxError: Cannot parse
> > '(normal_text:walla': Encountered \"<EOF>\" at line 1, column 18.\nWas
> > expecting one of:\n    <AND> ...\n    <OR> ...\n    <NOT> ...\n    \"+\"
> > ...\n    \"-\" ...\n    <BAREOPER> ...\n    \"(\" ...\n    \")\" ...\n
> > \"*\" ...\n    \"^\" ...\n    <QUOTED> ...\n    <TERM> ...\n
> > <FUZZY_SLOP> ...\n    <PREFIXTERM> ...\n    <WILDTERM> ...\n
> > <REGEXPTERM> ...\n    \"[\" ...\n    \"{\" ...\n    <LPARAMS> ...\n
> > \"filter(\" ...\n    <NUMBER> ...\n    "
>
>
> On Tue, Apr 12, 2016 at 1:30 PM, Mikhail Khludnev <
> mkhludnev@griddynamics.com> wrote:
>
> > Hello,
> >
> > It's usually
> > parent_field:"bla bla"^10 {!parent which="is_parent:true"
> > score=max}(child_field:bla)
> > or
> > parent_field:"bla bla"^10 +{!parent which="is_parent:true"
> > score=max}(child_field:bla)
> >
> > there should be no spaces in child clause, otherwise extract it to param
> > and refrer via v=$param
> >
> >
> > On Tue, Apr 12, 2016 at 9:56 AM, michael solomon <mi...@gmail.com>
> > wrote:
> >
> > > Hi,
> > > I'm using in BlockJoin Parser Query for return the parent of the
> relevant
> > > child i.e:
> > > {!parent which="is_parent:true" score=max}(child_field:bla)
> > >
> > > It's possible to boost the parent? something like:
> > >
> > > {!parent which="is_parent:true" score=max}(child_field:bla)
> > > parent_field:"bla bla"^10
> > > Thanks,
> > > Michael
> > >
> >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> > Principal Engineer,
> > Grid Dynamics
> >
> > <http://www.griddynamics.com>
> > <mk...@griddynamics.com>
> >
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>

Re: boost parent fields BlockJoinQuery

Posted by michael solomon <mi...@gmail.com>.
Thanks,
when I'm trying:
city:"walla walla"^10 {!parent which="is_parent:true"
score=max}(normal_text:walla)
I get:

> "msg": "org.apache.solr.search.SyntaxError: Cannot parse
> '(normal_text:walla': Encountered \"<EOF>\" at line 1, column 18.\nWas
> expecting one of:\n    <AND> ...\n    <OR> ...\n    <NOT> ...\n    \"+\"
> ...\n    \"-\" ...\n    <BAREOPER> ...\n    \"(\" ...\n    \")\" ...\n
> \"*\" ...\n    \"^\" ...\n    <QUOTED> ...\n    <TERM> ...\n
> <FUZZY_SLOP> ...\n    <PREFIXTERM> ...\n    <WILDTERM> ...\n
> <REGEXPTERM> ...\n    \"[\" ...\n    \"{\" ...\n    <LPARAMS> ...\n
> \"filter(\" ...\n    <NUMBER> ...\n    "


On Tue, Apr 12, 2016 at 1:30 PM, Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:

> Hello,
>
> It's usually
> parent_field:"bla bla"^10 {!parent which="is_parent:true"
> score=max}(child_field:bla)
> or
> parent_field:"bla bla"^10 +{!parent which="is_parent:true"
> score=max}(child_field:bla)
>
> there should be no spaces in child clause, otherwise extract it to param
> and refrer via v=$param
>
>
> On Tue, Apr 12, 2016 at 9:56 AM, michael solomon <mi...@gmail.com>
> wrote:
>
> > Hi,
> > I'm using in BlockJoin Parser Query for return the parent of the relevant
> > child i.e:
> > {!parent which="is_parent:true" score=max}(child_field:bla)
> >
> > It's possible to boost the parent? something like:
> >
> > {!parent which="is_parent:true" score=max}(child_field:bla)
> > parent_field:"bla bla"^10
> > Thanks,
> > Michael
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>

Re: boost parent fields BlockJoinQuery

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello,

It's usually
parent_field:"bla bla"^10 {!parent which="is_parent:true"
score=max}(child_field:bla)
or
parent_field:"bla bla"^10 +{!parent which="is_parent:true"
score=max}(child_field:bla)

there should be no spaces in child clause, otherwise extract it to param
and refrer via v=$param


On Tue, Apr 12, 2016 at 9:56 AM, michael solomon <mi...@gmail.com>
wrote:

> Hi,
> I'm using in BlockJoin Parser Query for return the parent of the relevant
> child i.e:
> {!parent which="is_parent:true" score=max}(child_field:bla)
>
> It's possible to boost the parent? something like:
>
> {!parent which="is_parent:true" score=max}(child_field:bla)
> parent_field:"bla bla"^10
> Thanks,
> Michael
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>