gpt4 book ai didi

java - 这个 Lucene 查询有什么问题?

转载 作者:行者123 更新时间:2023-12-01 15:12:31 25 4
gpt4 key购买 nike

我的 Lucene 查询出了什么问题?我不明白为什么会出错。

[27/08/12 10:28:38:447 CEST] lucene.LuceneUtils 错误:尝试在当前索引中搜索结果时发生错误。org.apache.lucene.queryParser.ParseException:无法解析 '+structname:bijzonderedag​​en +(conhost:64d17170-c24b-4812-a788-78283d989a64 conhost:system_host) +bijzonderedag​​en.vestigingnaam:阿姆斯特丹 +bijzonderedag​​en。 iskoopzondag:ja +languageid:3 +deleted:false +working:true date1:[01/01/2003 TO 01/01/2012] +working:true +((权限:p654b0931-1027- 41f7-ad4d-173115ed8ec1.1p*) )': 在第 1 行第 245 列遇到““01/01/2012”。本来期待: “]”...

at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:187)
at com.dotmarketing.util.lucene.LuceneUtils.prepareQuery(LuceneUtils.java:1195)
at com.dotmarketing.util.lucene.LuceneUtils.searchInCurrentIndex(LuceneUtils.java:507)
at com.dotmarketing.portlets.contentlet.business.ContentletFactoryDBImpl.indexSearch(ContentletFactoryDBImpl.java:388)
at com.dotmarketing.portlets.contentlet.business.ContentletAPIImpl.searchIndex(ContentletAPIImpl.java:548)
at com.dotmarketing.portlets.contentlet.business.ContentletAPIImpl.search(ContentletAPIImpl.java:453)
at com.dotmarketing.portlets.contentlet.business.ContentletAPIImpl.search(ContentletAPIImpl.java:445)
at com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor.search(ContentletAPIInterceptor.java:1491)
at com.dotmarketing.servlets.JSONContentServlet.service(JSONContentServlet.java:172)
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.dotmarketing.filters.CMSFilter.doFilter(CMSFilter.java:484)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.dotmarketing.filters.AutoLoginFilter.doFilter(AutoLoginFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.dotmarketing.cms.urlmap.filters.URLMapFilter.doFilter(URLMapFilter.java:313)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.dotmarketing.filters.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:140)
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.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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)

原因:org.apache.lucene.queryParser.ParseException:在第 1 行第 245 列遇到““01/01/2012”。本来期待: “]”...

at org.apache.lucene.queryParser.QueryParser.generateParseException(QueryParser.java:1759)
at org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.java:1641)
at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1399)
at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1250)
at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1207)
at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1167)
at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:182)
... 41 more

最佳答案

您必须使用 ISO 格式的日期,例如[2003-01-01 至 2012-01-01]

查看this page 。也可能与此有关SO question .

关于java - 这个 Lucene 查询有什么问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12138665/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com