lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Seidl (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SOLR-4860) MoreLikeThisHandler doesn't work with numeric or date fields in 4.x
Date Thu, 06 Aug 2015 15:23:04 GMT

     [ https://issues.apache.org/jira/browse/SOLR-4860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Seidl resolved SOLR-4860.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 4.6

It seems this has been fixed as a side effect of SOLR-5042. Could someone please verify?

> 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
>             Fix For: 4.6
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message