You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mike (JIRA)" <ji...@apache.org> on 2013/08/01 12:47:51 UTC

[jira] [Commented] (SOLR-4860) MoreLikeThisHandler doesn't work with numeric or date fields in 4.x

    [ https://issues.apache.org/jira/browse/SOLR-4860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13726314#comment-13726314 ] 

Mike commented on SOLR-4860:
----------------------------

I came across this issue as well, I wanted to use _val_ hook and numeric field values for boosting mlt query via mlt.fl parameter. For regular search (via bf) this approach works just fine.
Do you plan to fix this, or I should start working on different solution for my mlt query? What's the probability it will be fixed this year? :)
                
> MoreLikeThisHandler doesn't work with numeric or date fields in 4.x
> -------------------------------------------------------------------
>
>                 Key: SOLR-4860
>                 URL: https://issues.apache.org/jira/browse/SOLR-4860
>             Project: Solr
>          Issue Type: Bug
>          Components: MoreLikeThis
>    Affects Versions: 4.2
>            Reporter: Thomas Seidl
>
> After upgrading to Solr 4.2 (from 3.x), I realized that my MLT queries no longer work. It happens if I pass an integer ({{solr.TrieIntField}}), float ({{solr.TrieFloatField}}) or date ({{solr.DateField}}) field as part of the {{mlt.fl}} parameter. The field's {{multiValued}} setting doesn't seem to matter.
> This is the error I get:
> {noformat}
> NumericTokenStream does not support CharTermAttribute.
> java.lang.IllegalArgumentException: NumericTokenStream does not support CharTermAttribute.
> 	at org.apache.lucene.analysis.NumericTokenStream$NumericAttributeFactory.createAttributeInstance(NumericTokenStream.java:136)
> 	at org.apache.lucene.util.AttributeSource.addAttribute(AttributeSource.java:271)
> 	at org.apache.lucene.queries.mlt.MoreLikeThis.addTermFrequencies(MoreLikeThis.java:781)
> 	at org.apache.lucene.queries.mlt.MoreLikeThis.retrieveTerms(MoreLikeThis.java:724)
> 	at org.apache.lucene.queries.mlt.MoreLikeThis.like(MoreLikeThis.java:578)
> 	at org.apache.solr.handler.MoreLikeThisHandler$MoreLikeThisHelper.getMoreLikeThis(MoreLikeThisHandler.java:348)
> 	at org.apache.solr.handler.MoreLikeThisHandler.handleRequestBody(MoreLikeThisHandler.java:167)
> 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1817)
> 	at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:639)
> 	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
> 	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
> 	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:365)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
> 	at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
> 	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
> 	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:679)
> {noformat}
> The configuration I use can be found here: [http://drupalcode.org/project/search_api_solr.git/tree/HEAD:/solr-conf/4.x]
> If I just misconfigured something, then sorry and please tell me what I'd need to change. Any help would be appreciated!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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