Lein이 u를 검색해서 lucene stacktrace를 던졌어요.

4948 단어 leiningen
4

묘사

나는 해결 방안이 이 정규 표현식을 수정할 수 있다고 생각한다.https://github.com/technomancy/leiningen/blob/master/src/leiningen/search.clj#L142
스택 추적:
justin@fuckmonkey:~$ lein search _
Updating the search index. This may take a few minutes...
Updating the search index. This may take a few minutes...
java.lang.IllegalArgumentException: org.apache.lucene.queryParser.ParseException: Cannot parse ' ': Encountered "<EOF>" at line 1, column 1.
Was expecting one of:
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    <TERM> ...
    "*" ...

    at org.apache.maven.index.DefaultNexusIndexer.constructQuery(DefaultNexusIndexer.java:491)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
    at leiningen.search$search_repository.invoke(search.clj:116)
    at leiningen.search$search.invoke(search.clj:155)
    at leiningen.search$search.invoke(search.clj:139)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.core.main$resolve_task$fn__2171.doInvoke(main.clj:149)
    at clojure.lang.RestFn.applyTo(RestFn.java:139)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.core.main$apply_task.invoke(main.clj:189)
    at leiningen.core.main$_main$fn__2232.invoke(main.clj:253)
    at leiningen.core.main$_main.doInvoke(main.clj:243)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:617)
    at clojure.main$main_opt.invoke(main.clj:335)
    at clojure.main$main.doInvoke(main.clj:440)
    at clojure.lang.RestFn.invoke(RestFn.java:457)
    at clojure.lang.Var.invoke(Var.java:427)
    at clojure.lang.AFn.applyToHelper(AFn.java:172)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
Caused by: org.apache.lucene.queryParser.ParseException: Cannot parse ' ': Encountered "<EOF>" at line 1, column 1.
Was expecting one of:
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    <TERM> ...
    "*" ...

    at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:211)
    at org.apache.maven.index.DefaultQueryCreator.constructQuery(DefaultQueryCreator.java:336)
    at org.apache.maven.index.DefaultQueryCreator.constructQuery(DefaultQueryCreator.java:124)
    at org.apache.maven.index.DefaultQueryCreator.constructQuery(DefaultQueryCreator.java:107)
    at org.apache.maven.index.DefaultNexusIndexer.constructQuery(DefaultNexusIndexer.java:487)
    ... 33 more
Caused by: org.apache.lucene.queryParser.ParseException: Encountered "<EOF>" at line 1, column 1.
Was expecting one of:
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    <TERM> ...
    "*" ...

    at org.apache.lucene.queryParser.QueryParser.generateParseException(QueryParser.java:1849)
    at org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.java:1731)
    at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1337)
    at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1245)
    at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1234)
    at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
    ... 37 more

토론 #1

기본 Lucene 태그화를 사용하는 경우에는 밑줄을 공백으로 변환합니다(예:).http://stackoverflow.com/questions/2520479/lucene-search-and-underscores

토론 #2

적어도 우리는 문법 오류를 좋은 소식으로 바꿔야 한다. 추적이 아니라.

좋은 웹페이지 즐겨찾기