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 Liram Vardi <li...@checkpoint.com> on 2014/05/22 16:50:08 UTC

Query translation of User Fields

Hi all,

I have a question regarding the functionality of Edismax parser and its "User Field" feature.
We are running Solr 4.4 on our server.

For the query:
"q= id:b* user:"Anna Collins"&defType=edismax&uf=* -user&rows=0"
The parsed query (taken from query debug info) is:
+((id:b* (text:user) (text:"anna collins"))~1)

I expect that because "user" was filter out in "uf" (User fields), the parsed query should not contain the "user" search part.
In another words, the parsed query should look simply like this:  +id:b*
What is the right behavior?

Thanks,
Liram

Re: Query translation of User Fields

Posted by Jack Krupansky <ja...@basetechnology.com>.
I stand corrected! I used to know that.

But I do think the doc for edismax should be more clear on this point- what 
happens if an invalid field name is referenced - or more specifically, what 
happens if the user references a legitimate field name that merely happens 
to be disallowed using uf.

-- Jack Krupansky

-----Original Message----- 
From: Yonik Seeley
Sent: Sunday, May 25, 2014 10:58 AM
To: solr-user@lucene.apache.org
Subject: Re: Query translation of User Fields

On Thu, May 22, 2014 at 10:56 AM, Jack Krupansky
<ja...@basetechnology.com> wrote:
> Hmmm... that doesn't sound like what I would have expected - I would have
> thought that Solr would throw an exception on the "user" field, rather 
> than
> simply treat it as a text keyword.

No, I believe that's working as designed.  edismax should never throw
exceptions due to the structure of the user query.
Just because something looks like a field query (has a : in it)
doesn't mean it was intended to be.

Examples:
Terminator 2: Judgment Day
Mission: Impossible

-Yonik
http://heliosearch.org - facet functions, subfacets, off-heap 
filters&fieldcache 


Re: Query translation of User Fields

Posted by Yonik Seeley <yo...@heliosearch.com>.
On Thu, May 22, 2014 at 10:56 AM, Jack Krupansky
<ja...@basetechnology.com> wrote:
> Hmmm... that doesn't sound like what I would have expected - I would have
> thought that Solr would throw an exception on the "user" field, rather than
> simply treat it as a text keyword.

No, I believe that's working as designed.  edismax should never throw
exceptions due to the structure of the user query.
Just because something looks like a field query (has a : in it)
doesn't mean it was intended to be.

Examples:
Terminator 2: Judgment Day
Mission: Impossible

-Yonik
http://heliosearch.org - facet functions, subfacets, off-heap filters&fieldcache

RE: Query translation of User Fields

Posted by Liram Vardi <li...@checkpoint.com>.
Hi Jack,

Thank you for your answer.
I submitted the following Jira issue: https://issues.apache.org/jira/browse/SOLR-6113 

Thanks,
Liram

-----Original Message-----
From: Jack Krupansky [mailto:jack@basetechnology.com] 
Sent: Thursday, May 22, 2014 5:56 PM
To: solr-user@lucene.apache.org
Subject: Re: Query translation of User Fields

Hmmm... that doesn't sound like what I would have expected - I would have thought that Solr would throw an exception on the "user" field, rather than simply treat it as a text keyword. File a Jira. Either it's a bug or the doc is not complete.

-- Jack Krupansky

-----Original Message-----
From: Liram Vardi
Sent: Thursday, May 22, 2014 10:50 AM
To: solr-user@lucene.apache.org
Subject: Query translation of User Fields

Hi all,

I have a question regarding the functionality of Edismax parser and its "User Field" feature.
We are running Solr 4.4 on our server.

For the query:
"q= id:b* user:"Anna Collins"&defType=edismax&uf=* -user&rows=0"
The parsed query (taken from query debug info) is:
+((id:b* (text:user) (text:"anna collins"))~1)

I expect that because "user" was filter out in "uf" (User fields), the parsed query should not contain the "user" search part.
In another words, the parsed query should look simply like this:  +id:b* What is the right behavior?

Thanks,
Liram 


Email secured by Check Point

Re: Query translation of User Fields

Posted by Jack Krupansky <ja...@basetechnology.com>.
Hmmm... that doesn't sound like what I would have expected - I would have 
thought that Solr would throw an exception on the "user" field, rather than 
simply treat it as a text keyword. File a Jira. Either it's a bug or the doc 
is not complete.

-- Jack Krupansky

-----Original Message----- 
From: Liram Vardi
Sent: Thursday, May 22, 2014 10:50 AM
To: solr-user@lucene.apache.org
Subject: Query translation of User Fields

Hi all,

I have a question regarding the functionality of Edismax parser and its 
"User Field" feature.
We are running Solr 4.4 on our server.

For the query:
"q= id:b* user:"Anna Collins"&defType=edismax&uf=* -user&rows=0"
The parsed query (taken from query debug info) is:
+((id:b* (text:user) (text:"anna collins"))~1)

I expect that because "user" was filter out in "uf" (User fields), the 
parsed query should not contain the "user" search part.
In another words, the parsed query should look simply like this:  +id:b*
What is the right behavior?

Thanks,
Liram