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 Johannes <jo...@posteo.de> on 2017/02/11 10:18:59 UTC
Document field as an input for subquery params which contains
whitespaces
Hello.
I would like to query data depending on a value in a document. But it
works only, when it contains no whitespaces.
q=fqdn:"cn=user 1,ou=users"&fl=fqdn,orgnav:[subquery]&orgnav.q={!dismax
qf=org_fqdn_hierarchy v=$row.org_fqdn_hierarchy}&orgnav.fq=type:org
The first document looks like
{
fqdn:"cn=user 1,ou=users",
org_fqdn_hierarchy:"ou=sales,cn=dep 1"
}
The field org_fqdn_hierarchy is tokenized with
PathHierarchyTokenizerFactory, to retrieve all hierarchically belonging
documents.
I tried it with the following commands, but the orgnav-subquery stays
empty :(
q=fqdn:"cn=user 1,ou=users"&fl=fqdn,orgnav:[subquery]&orgnav.q={!dismax
qf=org_fqdn_hierachy v='$row.org_fqdn_hierachy'}&orgnav.fq=type:org
q=fqdn:"cn=user 1,ou=users"&fl=fqdn,orgnav:[subquery]&orgnav.q={!dismax
qf=org_fqdn_hierachy v="$row.org_fqdn_hierachy"}&orgnav.fq=type:org
Is there a trick or parameter to escape it?
Best regards
Johannes
Re: Document field as an input for subquery params which contains
whitespaces
Posted by Johannes <jo...@posteo.de>.
SOLVED. Containing white spaces were not the problem. I wanted to see
the content of org_fqdn_hierarchy in the response and changed the field
definition stored from false to true. And my subquery returns the
desired results.
Best regards
Johannes
Am 11.02.2017 um 11:18 schrieb Johannes:
> Hello.
>
> I would like to query data depending on a value in a document. But it
> works only, when it contains no whitespaces.
>
> q=fqdn:"cn=user 1,ou=users"&fl=fqdn,orgnav:[subquery]&orgnav.q={!dismax
> qf=org_fqdn_hierarchy v=$row.org_fqdn_hierarchy}&orgnav.fq=type:org
>
> The first document looks like
> {
> fqdn:"cn=user 1,ou=users",
> org_fqdn_hierarchy:"ou=sales,cn=dep 1"
> }
>
> The field org_fqdn_hierarchy is tokenized with
> PathHierarchyTokenizerFactory, to retrieve all hierarchically belonging
> documents.
>
>
> I tried it with the following commands, but the orgnav-subquery stays
> empty :(
>
> q=fqdn:"cn=user 1,ou=users"&fl=fqdn,orgnav:[subquery]&orgnav.q={!dismax
> qf=org_fqdn_hierachy v='$row.org_fqdn_hierachy'}&orgnav.fq=type:org
>
> q=fqdn:"cn=user 1,ou=users"&fl=fqdn,orgnav:[subquery]&orgnav.q={!dismax
> qf=org_fqdn_hierachy v="$row.org_fqdn_hierachy"}&orgnav.fq=type:org
>
>
>
> Is there a trick or parameter to escape it?
>
> Best regards
> Johannes
>