You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2012/06/08 01:25:23 UTC
[jira] [Created] (SOLR-3522) "literal" function can not be used in
fl
Hoss Man created SOLR-3522:
------------------------------
Summary: "literal" function can not be used in fl
Key: SOLR-3522
URL: https://issues.apache.org/jira/browse/SOLR-3522
Project: Solr
Issue Type: Bug
Reporter: Hoss Man
Fix For: 4.0
For reasons i don't understand yet attempting to use the "literal" function in the fl param causes a parse error.
Example query with function that works fine...
http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:sum%284,5%29
Example using literal function that fails...
http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:literal%28%22foo%22%29
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-3522) "literal" function can not be parsed
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-3522:
---------------------------
Attachment: SOLR-3522.patch
patch that should fix the problem ... except that the test still fails in a way that suggests StringDistanceFunction isn't implementing equals properly (two FunctionQueries parsed from identical input aren't asserting equally) so now i need to go down that rabbit hole. (i may just have astupid mistake in the test i'm not seeing at the moment)
> "literal" function can not be parsed
> ------------------------------------
>
> Key: SOLR-3522
> URL: https://issues.apache.org/jira/browse/SOLR-3522
> Project: Solr
> Issue Type: Bug
> Reporter: Hoss Man
> Assignee: Hoss Man
> Fix For: 4.0, 3.6.1
>
> Attachments: SOLR-3522.patch
>
>
> attempting to use the "literal" function in the fl param causes a parse error...
> Example queries with functions that works fine...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:sum%284,5%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,%22fo%22,edit%29
> {noformat}
> Examples using literal function that fails...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:literal%28%22foo%22%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,literal%28%22fo%22%29,edit%29
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-3522) "literal" function can not be parsed
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-3522:
---------------------------
Fix Version/s: 3.6.1
Assignee: Hoss Man
Summary: "literal" function can not be parsed (was: "literal" function can not be parsed in 4x/trunk)
Looking into this, it seems that the literal function is completley broken in 3.6 as well -- raw literals work, just not the {{literal("foo")}} or {{literal($foo})}}.
problem seems to be a simple mistake of calling "fp.getString()" (which is the entire input string) instead of using fp.parseArg() ... i'll work on a test & fix.
> "literal" function can not be parsed
> ------------------------------------
>
> Key: SOLR-3522
> URL: https://issues.apache.org/jira/browse/SOLR-3522
> Project: Solr
> Issue Type: Bug
> Reporter: Hoss Man
> Assignee: Hoss Man
> Fix For: 4.0, 3.6.1
>
>
> attempting to use the "literal" function in the fl param causes a parse error...
> Example queries with functions that works fine...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:sum%284,5%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,%22fo%22,edit%29
> {noformat}
> Examples using literal function that fails...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:literal%28%22foo%22%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,literal%28%22fo%22%29,edit%29
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-3522) "literal" function can not be parsed
in 4x/trunk
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13291417#comment-13291417 ]
Hoss Man commented on SOLR-3522:
--------------------------------
Full Stacks...
{noformat}
Jun 7, 2012 4:32:32 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: Error parsing fieldname: Expected ')' at position 8 in 'literal("foo")'
at org.apache.solr.search.ReturnFields.add(ReturnFields.java:353)
at org.apache.solr.search.ReturnFields.parseFieldList(ReturnFields.java:115)
at org.apache.solr.search.ReturnFields.<init>(ReturnFields.java:101)
at org.apache.solr.search.ReturnFields.<init>(ReturnFields.java:77)
at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:97)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:183)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1555)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:351)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.lucene.queryparser.classic.ParseException: Expected ')' at position 8 in 'literal("foo")'
at org.apache.solr.search.QueryParsing$StrParser.expect(QueryParsing.java:629)
at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:367)
at org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:70)
at org.apache.solr.search.QParser.getQuery(QParser.java:145)
at org.apache.solr.search.ReturnFields.add(ReturnFields.java:289)
... 34 more
Jun 7, 2012 4:32:54 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: org.apache.lucene.queryparser.classic.ParseException: Expected ')' at position 22 in 'strdist("foo",literal("fo"),edit)'
at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:148)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:183)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1555)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:351)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.lucene.queryparser.classic.ParseException: Expected ')' at position 22 in 'strdist("foo",literal("fo"),edit)'
at org.apache.solr.search.QueryParsing$StrParser.expect(QueryParsing.java:629)
at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:367)
at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:234)
at org.apache.solr.search.ValueSourceParser$22.parse(ValueSourceParser.java:332)
at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:366)
at org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:70)
at org.apache.solr.search.QParser.getQuery(QParser.java:145)
at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:118)
... 30 more
{noformat}
> "literal" function can not be parsed in 4x/trunk
> ------------------------------------------------
>
> Key: SOLR-3522
> URL: https://issues.apache.org/jira/browse/SOLR-3522
> Project: Solr
> Issue Type: Bug
> Reporter: Hoss Man
> Fix For: 4.0
>
>
> attempting to use the "literal" function in the fl param causes a parse error...
> Example queries with functions that works fine...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:sum%284,5%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,%22fo%22,edit%29
> {noformat}
> Examples using literal function that fails...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:literal%28%22foo%22%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,literal%28%22fo%22%29,edit%29
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (SOLR-3522) "literal" function can not be parsed
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man resolved SOLR-3522.
----------------------------
Resolution: Fixed
Fix Version/s: (was: 3.6.1)
5.0
Committed revision 1351460. - trunk
Committed revision 1351462. - 4x
deferring the more complicated (and broken) query equalities test to SOLR-3548
> "literal" function can not be parsed
> ------------------------------------
>
> Key: SOLR-3522
> URL: https://issues.apache.org/jira/browse/SOLR-3522
> Project: Solr
> Issue Type: Bug
> Reporter: Hoss Man
> Assignee: Hoss Man
> Fix For: 4.0, 5.0
>
> Attachments: SOLR-3522.patch
>
>
> attempting to use the "literal" function in the fl param causes a parse error...
> Example queries with functions that works fine...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:sum%284,5%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,%22fo%22,edit%29
> {noformat}
> Examples using literal function that fails...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:literal%28%22foo%22%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,literal%28%22fo%22%29,edit%29
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-3522) "literal" function can not be parsed
in 4x/trunk
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-3522:
---------------------------
Description:
attempting to use the "literal" function in the fl param causes a parse error...
Example queries with functions that works fine...
{noformat}
http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:sum%284,5%29
http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,%22fo%22,edit%29
{noformat}
Examples using literal function that fails...
{noformat}
http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:literal%28%22foo%22%29
http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,literal%28%22fo%22%29,edit%29
{noformat}
was:
For reasons i don't understand yet attempting to use the "literal" function in the fl param causes a parse error.
Example query with function that works fine...
http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:sum%284,5%29
Example using literal function that fails...
http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:literal%28%22foo%22%29
Summary: "literal" function can not be parsed in 4x/trunk (was: "literal" function can not be used in fl)
revised summary and description .. seems to be a general problem parsing the "literal" function, not specific to "fl"
> "literal" function can not be parsed in 4x/trunk
> ------------------------------------------------
>
> Key: SOLR-3522
> URL: https://issues.apache.org/jira/browse/SOLR-3522
> Project: Solr
> Issue Type: Bug
> Reporter: Hoss Man
> Fix For: 4.0
>
>
> attempting to use the "literal" function in the fl param causes a parse error...
> Example queries with functions that works fine...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:sum%284,5%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,%22fo%22,edit%29
> {noformat}
> Examples using literal function that fails...
> {noformat}
> http://localhost:8983/solr/collection1/select?q=*:*&fl=foo:literal%28%22foo%22%29
> http://localhost:8983/solr/collection1/select?fl=score&q={!func}strdist%28%22foo%22,literal%28%22fo%22%29,edit%29
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org