lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "steve neo (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1631) CLONE -You cannot sort on fields that don't exist
Date Fri, 08 May 2009 15:29:45 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707376#action_12707376
] 

steve neo commented on LUCENE-1631:
-----------------------------------

In my real project, I am using over multiple indexes, I got this error:

Exception in thread "MultiSearcher thread #6" java.lang.RuntimeException: field "docType"
does not appear to be indexed
	at org.apache.lucene.search.ExtendedFieldCacheImpl$5.createValue(ExtendedFieldCacheImpl.java:173)
	at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
	at org.apache.lucene.search.ExtendedFieldCacheImpl.getAuto(ExtendedFieldCacheImpl.java:127)
	at org.apache.lucene.search.FieldSortedHitQueue.comparatorAuto(FieldSortedHitQueue.java:487)
	at org.apache.lucene.search.FieldSortedHitQueue$1.createValue(FieldSortedHitQueue.java:184)
	at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
	at org.apache.lucene.search.FieldSortedHitQueue.getCachedComparator(FieldSortedHitQueue.java:167)
	at org.apache.lucene.search.FieldSortedHitQueue.<init>(FieldSortedHitQueue.java:55)
	at org.apache.lucene.search.TopFieldDocCollector.<init>(TopFieldDocCollector.java:43)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:121)
	at org.apache.lucene.search.MultiSearcherThread.run(ParallelMultiSearcher.java:250)
2009-05-09 01:26:41,305 ERROR [SearchServiceImpl] Search failed 
org.springmodules.lucene.search.LuceneSearchException: Error during searching; nested exception
is java.lang.NullPointerException
	at org.springmodules.lucene.search.core.DefaultLuceneSearchTemplate.search(DefaultLuceneSearchTemplate.java:292)
	at com.edgenius.wiki.search.service.AbstractSearchService.commonSearch(AbstractSearchService.java:84)
	at com.edgenius.wiki.search.service.SearchServiceImpl.search(SearchServiceImpl.java:36)
	at com.edgenius.wiki.gwt.server.SearchControllerImpl.search(SearchControllerImpl.java:81)
	at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at com.edgenius.wiki.gwt.server.handler.GWTSpringController.processCall(GWTSpringController.java:93)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
	at com.edgenius.wiki.gwt.server.handler.GWTSpringController.handleRequest(GWTSpringController.java:179)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.edgenius.core.webapp.filter.AjaxRedirectFilter.doFilterInternal(AjaxRedirectFilter.java:46)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.edgenius.core.webapp.filter.SEFilter.doFilterInternal(SEFilter.java:63)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
	at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at com.edgenius.wiki.security.acegi.CaptchaValidationProcessingFilter.doFilter(CaptchaValidationProcessingFilter.java:76)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.edgenius.wiki.webapp.filter.InstallFilter.doFilterInternal(InstallFilter.java:49)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.NullPointerException
	at org.apache.lucene.search.MultiSearcherThread.hits(ParallelMultiSearcher.java:280)
	at org.apache.lucene.search.ParallelMultiSearcher.search(ParallelMultiSearcher.java:136)
	at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:113)
	at org.apache.lucene.search.Hits.<init>(Hits.java:90)
	at org.apache.lucene.search.Searcher.search(Searcher.java:72)
	at org.springmodules.lucene.search.factory.SimpleLuceneSearcher.search(SimpleLuceneSearcher.java:91)
	at com.edgenius.wiki.search.service.AbstractSearchService$1.doWithSearcher(AbstractSearchService.java:92)
	at org.springmodules.lucene.search.core.DefaultLuceneSearchTemplate.search(DefaultLuceneSearchTemplate.java:288)
	... 76 more

> CLONE -You cannot sort on fields that don't exist
> -------------------------------------------------
>
>                 Key: LUCENE-1631
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1631
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.4.1
>         Environment: Operating System: other
> Platform: Other
>            Reporter: steve neo
>            Assignee: Yonik Seeley
>             Fix For: 1.9
>
>
> I still get this error in 2.4.1 - if field does not exist in index,  there is nullPointException
if it search over multiple index. In following test code, there is runtime error, here is
part of test code. 
> 		indexSingleFieldDocs(new Field[]{new Field("ds", "xyz", Field.Store.YES, Field.Index.NOT_ANALYZED)
> 						, new Field("dsc", "hello", Field.Store.NO, Field.Index.ANALYZED)});
> 		indexSingleFieldDocs(new Field[]{new Field("ds", "def", Field.Store.YES, Field.Index.NOT_ANALYZED)
> 						, new Field("dsc", "hello", Field.Store.NO, Field.Index.ANALYZED)});
> ...
> 		QueryParser p = new QueryParser("dsc", new StandardAnalyzer());
> 		Query q = p.parse("hello");
> 		Hits hits = searcher.search(q,new Sort("ds"));
> If change "ds" to some others,  got this exception:
> java.lang.RuntimeException: field "ds" does not appear to be indexed
> 	at org.apache.lucene.search.ExtendedFieldCacheImpl$5.createValue(ExtendedFieldCacheImpl.java:173)
> 	at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
> 	at org.apache.lucene.search.ExtendedFieldCacheImpl.getAuto(ExtendedFieldCacheImpl.java:127)
> 	at org.apache.lucene.search.FieldSortedHitQueue.comparatorAuto(FieldSortedHitQueue.java:487)
> 	at org.apache.lucene.search.FieldSortedHitQueue$1.createValue(FieldSortedHitQueue.java:184)
> 	at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
> 	at org.apache.lucene.search.FieldSortedHitQueue.getCachedComparator(FieldSortedHitQueue.java:167)
> 	at org.apache.lucene.search.FieldSortedHitQueue.<init>(FieldSortedHitQueue.java:55)
> 	at org.apache.lucene.search.TopFieldDocCollector.<init>(TopFieldDocCollector.java:43)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:121)
> 	at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:113)
> 	at org.apache.lucene.search.Hits.<init>(Hits.java:90)
> 	at org.apache.lucene.search.Searcher.search(Searcher.java:61)
> 	at com.edgenius.test.lucene.TestLucene.testSort(TestLucene.java:207)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message