lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anca Kopetz <anca.kop...@kelkoo.com>
Subject Re: How to boost documents ?
Date Mon, 06 Jan 2014 17:29:17 GMT
Hi,

I tried to isolate the problem, so I tested the following query on solr-4.6.0 :

http://localhost:8983/solr/collection1/select?q=ipod belkin&wt=xml&debugQuery=true&q.op=AND&defType=edismax&bf=map(query($qq),0,0,0,100.0)&qq={!edismax}power

The error is :
org.apache.solr.search.SyntaxError: Infinite Recursion detected parsing query 'power'

And the stacktrace :

ERROR - 2014-01-06 18:27:02.275; org.apache.solr.common.SolrException; org.apache.solr.common.SolrException:
org.apache.solr.search.SyntaxError: Infinite Recursion detected parsing query 'power'
        at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:171)
        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1859)
        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:710)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:413)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:197)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:368)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
        at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
        at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
        at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.solr.search.SyntaxError: Infinite Recursion detected parsing query 'power'
        at org.apache.solr.search.QParser.checkRecurse(QParser.java:178)
        at org.apache.solr.search.QParser.subQuery(QParser.java:200)
        at org.apache.solr.search.ExtendedDismaxQParser.getBoostFunctions(ExtendedDismaxQParser.java:437)
        at org.apache.solr.search.ExtendedDismaxQParser.parse(ExtendedDismaxQParser.java:175)
        at org.apache.solr.search.QParser.getQuery(QParser.java:142)
        at org.apache.solr.search.FunctionQParser.parseNestedQuery(FunctionQParser.java:236)
        at org.apache.solr.search.ValueSourceParser$19.parse(ValueSourceParser.java:270)
        at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:352)
        at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:223)
        at org.apache.solr.search.ValueSourceParser$13.parse(ValueSourceParser.java:198)
        at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:352)
        at org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:68)
        at org.apache.solr.search.QParser.getQuery(QParser.java:142)
        at org.apache.solr.search.ExtendedDismaxQParser.getBoostFunctions(ExtendedDismaxQParser.java:437)
        at org.apache.solr.search.ExtendedDismaxQParser.parse(ExtendedDismaxQParser.java:175)
        at org.apache.solr.search.QParser.getQuery(QParser.java:142)
        at org.apache.solr.search.FunctionQParser.parseNestedQuery(FunctionQParser.java:236)
        at org.apache.solr.search.ValueSourceParser$19.parse(ValueSourceParser.java:270)
        at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:352)
        at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:223)
        at org.apache.solr.search.ValueSourceParser$13.parse(ValueSourceParser.java:198)
        at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:352)
        at org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:68)
        at org.apache.solr.search.QParser.getQuery(QParser.java:142)
        at org.apache.solr.search.ExtendedDismaxQParser.getBoostFunctions(ExtendedDismaxQParser.java:437)
        at org.apache.solr.search.ExtendedDismaxQParser.parse(ExtendedDismaxQParser.java:175)
        at org.apache.solr.search.QParser.getQuery(QParser.java:142)
...

Is this a bug ?

Thank you,
Anca
On 12/30/2013 02:30 PM, Anca Kopetz wrote:

Hi,

Thank you for your response.

When I try the URL you sent me, I get the following error message :

org.apache.solr.search.SyntaxError: Infinite Recursion detected parsing query 'beautiful Christmas
tree'

Any idea what this means ?

Best regards,
Anca
On 12/16/2013 02:00 PM, Ahmet Arslan wrote:

Hi Anca,

Can you try following URL?



q=beautiful Christmas tree&mm=2&qf=title^12 description^2&defType=dismax&bf=map(query($qq),0,0,0,100.0)&qq={!dismax
qf='title description' mm=100%}beautiful Christmas tree

Modified from Jan's solution. See his original post [1] to a similar discussion.
[1] http://search-lucene.com/m/nK6t9j1fuc2





On Monday, December 16, 2013 12:19 PM, Anca Kopetz <anca.kopetz@kelkoo.com><mailto:anca.kopetz@kelkoo.com><mailto:anca.kopetz@kelkoo.com><mailto:anca.kopetz@kelkoo.com>
wrote:

Hi,

How to boost documents that contain all search terms in several of its fields ?

Below you cand find a simplified example :

The query with Min should match:
q=beautiful Christmas tree&mm=2&qf=title^12 description^2

There are two offers that match the query :
offer1 {title:"Christmas tree", description:"a joy for children"}

offer2 {title:"Christmas tree", description:"beautiful for holidays"}}

The first offer ranks before the second, despite of the fact that the second one contains
all the search terms. I tried to play with the boosts of qf, but the results vary a lot.

Is there a way to add a boost on all search fields, the same way we do with pf on one field
: pf=title:2^3.0 ?

Thank you,
Anca



________________________________
Kelkoo SAS
Société par Actions Simplifiée
Au capital de € 4.168.964,30
Siège social : 8, rue du Sentier 75002 Paris
425 093 069 RCS Paris

Ce message et les pièces jointes sont confidentiels et établis à l'attention exclusive
de leurs destinataires. Si vous n'êtes pas le destinataire de ce message, merci de le détruire
et d'en avertir l'expéditeur.


________________________________
Kelkoo SAS
Société par Actions Simplifiée
Au capital de € 4.168.964,30
Siège social : 8, rue du Sentier 75002 Paris
425 093 069 RCS Paris

Ce message et les pièces jointes sont confidentiels et établis à l'attention exclusive
de leurs destinataires. Si vous n'êtes pas le destinataire de ce message, merci de le détruire
et d'en avertir l'expéditeur.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message