lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Norskog <goks...@gmail.com>
Subject Re: Solr date and string search problem
Date Sun, 15 Nov 2009 02:04:46 GMT
This line is the key:
> SEVERE: org.apache.solr.core.SolrException: Invalid Date String:'Behavior'
>        at org.apache.solr.schema.DateField.toInternal(DateField.java:108)
>        at

The string 'Behavior' is being parsed as a date, and fails. Your query
is attempting to find this as a date. Please post your query. and the
<requestHandler> configuration that it is used against.

On Sat, Nov 14, 2009 at 4:16 AM, ashokcz <ashokkumar.ganesan@tcs.com> wrote:
>
> Hi ,
> I have been using solr1.2 for a year and now i m facing a weird problem.
> Till now i have used only string and number solr types for the search field
> .
> and whatever string the users are trying to search will pass it on to the
> search engine and it will find in appropraite fields and return me the
> results.
>
> But now i have added a another field with type DATE and made it as a search
> field.
> so what happens is whatever string that i m giving to solr tries to convert
> to date and throws me an error.
>
>  Nov 14, 2009 4:36:05 PM org.apache.solr.core.SolrException log
> SEVERE: org.apache.solr.core.SolrException: Invalid Date String:'Behavior'
>        at org.apache.solr.schema.DateField.toInternal(DateField.java:108)
>        at
> org.apache.solr.schema.FieldType$DefaultAnalyzer$1.next(FieldType.java:298)
>        at
> org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:437)
>        at
> org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:78)
>        at
> org.apache.solr.util.SolrPluginUtils$DisjunctionMaxQueryParser.getFieldQuery(SolrPluginUtils.java:774)
>        at
> org.apache.solr.util.SolrPluginUtils$DisjunctionMaxQueryParser.getFieldQuery(SolrPluginUtils.java:762)
>        at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1092)
>        at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:979)
>        at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:907)
>        at
> org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:896)
>        at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:146)
>        at
> org.apache.solr.request.DisMaxRequestHandler.handleRequestBody(DisMaxRequestHandler.java:238)
>        at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77)
>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:706)
>        at
> com.tcs.mighty.cb.service.CoreEntitySearcherImpl.solrSearch(CoreEntitySearcherImpl.java:896)
>        at
> com.tcs.mighty.cb.service.CoreEntitySearcherImpl.search(CoreEntitySearcherImpl.java:342)
>        at
> com.tcs.mighty.cb.service.CoreEntitySearcherImpl.handleGetSearchResults(CoreEntitySearcherImpl.java:52)
>        at
> com.tcs.mighty.cb.service.CoreEntitySearcherBase.getSearchResults(CoreEntitySearcherBase.java:122)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
>        at
> org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:97)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
>        at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
>        at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
>        at $Proxy141.getSearchResults(Unknown Source)
>        at
> com.tcs.mighty.cb.service.ejb.CoreEntitySearcherBean.getSearchResults(CoreEntitySearcherBean.java:24)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
> org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
>        at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
>        at
> org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
>        at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
>        at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
>        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
>        at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
>        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
>        at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
>        at
> org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
>        at org.jboss.ejb.Container.invoke(Container.java:709)
>        at
> org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419)
>        at
> org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
>        at $Proxy96.getSearchResults(Unknown Source)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
> org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:71)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
>        at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
>        at $Proxy141.getSearchResults(Unknown Source)
>        at
> com.tcs.mighty.cb.web.search.SearchControllerImpl.getSearchResults(SearchControllerImpl.java:71)
>        at com.tcs.mighty.cb.web.search.Search.__getSearchResults(Search.java:96)
>        at com.tcs.mighty.cb.web.search.Search._searchController(Search.java:87)
>        at com.tcs.mighty.cb.web.search.Search.execute(Search.java:35)
>        at
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
>        at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
>        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
>        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
>        at
> org.andromda.presentation.bpm4struts.ActionServlet.doPost(ActionServlet.java:48)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>        at
> org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>        at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>        at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>        at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>        at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>        at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>        at
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
>        at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>        at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:158)
>        at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>        at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>        at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>        at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>        at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>        at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.jav
> 16:36:05,117 INFO  [STDOUT] a:102)
>        at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>        at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>        at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>        at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>        at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>        at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>        at java.lang.Thread.run(Thread.java:595)
>
>
> I find its a weird thing to happen or am i not doing it properly ??
> can someone pls suggest me something ??
>
> Thanks
> --------------------
> Ashok
>
> --
> View this message in context: http://old.nabble.com/Solr-date-and-string-search-problem-tp26349545p26349545.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
Lance Norskog
goksron@gmail.com

Mime
View raw message