Uploaded image for project: 'Zanata'
  1. ZNTA-2141

Query parse failure on TM Merge with 'OR' in text

    Details

    • Tested Version/s:
      None

      Description

      An error occurs when running TM Version merge on a project with the attached source and translation files uploaded

      1. Create project version
      2. Upload mobydick.txt.pot
      3. Select Upload translations for the document, select mobydick.tx.po
      4. Create a new version (no copy)
      5. Upload mobydick.txt.pot
      6. Select TM Version merge from the menu
      7. Select the prior version
      8. Press merge translations

      05:23:45,020 ERROR [org.zanata.service.impl.TranslationMemoryServiceImpl] (pool-7-thread-3) Can't parse query TransMemoryQuery{searchType=FUZZY_PLURAL, queries=[LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR], project=Condition{isCheck=false, value='1'}, document=Condition{isCheck=true, value='mobydick.txt'}, res=Condition{isCheck=true, value='542b464d1d30d01c18cae471354cee34'}, includeOwnTranslation=Condition{isCheck=true, value='null'}}: org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'LIABLE TO YOU F"OR" ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR': Encountered "<EOF>" at line 1, column 72.
      Was expecting one of:
          <NOT> ...
          "+" ...
          "-" ...
          <BAREOPER> ...
          "(" ...
          "*" ...
          <QUOTED> ...
          <TERM> ...
          <PREFIXTERM> ...
          <WILDTERM> ...
          <REGEXPTERM> ...
          "[" ...
          "{" ...
          <NUMBER> ...
          <TERM> ...
          "*" ...
          
      	at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:123)
      	at org.apache.lucene.queryparser.classic.MultiFieldQueryParser.parse(MultiFieldQueryParser.java:265)
      	at org.zanata.service.impl.TranslationMemoryServiceImpl.buildContentQuery(TranslationMemoryServiceImpl.java:897)
      	at org.zanata.service.impl.TranslationMemoryServiceImpl.generateTextFlowTargetQuery(TranslationMemoryServiceImpl.java:766)
      	at org.zanata.service.impl.TranslationMemoryServiceImpl.generateQuery(TranslationMemoryServiceImpl.java:725)
      	at org.zanata.service.impl.TranslationMemoryServiceImpl.getSearchResult(TranslationMemoryServiceImpl.java:665)
      	at org.zanata.service.impl.TranslationMemoryServiceImpl.findMatchingTranslation(TranslationMemoryServiceImpl.java:318)
      	at org.zanata.service.impl.TranslationMemoryServiceImpl.searchTransMemory(TranslationMemoryServiceImpl.java:250)
      	at org.zanata.service.impl.TranslationMemoryServiceImpl.searchBestMatchTransMemory(TranslationMemoryServiceImpl.java:232)
      	at org.zanata.service.impl.TranslationMemoryServiceImpl$Proxy$_$$_WeldClientProxy.searchBestMatchTransMemory(Unknown Source)
      	at org.zanata.service.impl.TransMemoryMergeServiceImpl.lambda$3(TransMemoryMergeServiceImpl.java:360)
      	at org.zanata.transaction.TransactionUtilImpl.call(TransactionUtilImpl.java:109)
      	at org.zanata.transaction.TransactionUtilImpl$Proxy$_$$_WeldClientProxy.call(Unknown Source)
      	at org.zanata.service.impl.TransMemoryMergeServiceImpl.translateInBatch(TransMemoryMergeServiceImpl.java:347)
      	at org.zanata.service.impl.TransMemoryMergeServiceImpl.startMergeTranslations(TransMemoryMergeServiceImpl.java:306)
      	at org.zanata.service.impl.TransMemoryMergeServiceImpl$Proxy$_$$_WeldSubclass.startMergeTranslations$$super(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:49)
      	at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77)
      	at org.zanata.async.AsyncMethodInterceptor.aroundInvoke(AsyncMethodInterceptor.java:113)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74)
      	at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84)
      	at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72)
      	at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56)
      	at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
      	at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
      	at org.zanata.service.impl.TransMemoryMergeServiceImpl$Proxy$_$$_WeldSubclass.startMergeTranslations(Unknown Source)
      	at org.zanata.service.impl.TransMemoryMergeServiceImpl$Proxy$_$$_WeldClientProxy.startMergeTranslations(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.zanata.async.AsyncMethodInterceptor.lambda$1(AsyncMethodInterceptor.java:92)
      	at org.zanata.async.AsyncTaskManager.lambda$0(AsyncTaskManager.java:105)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.lucene.queryparser.classic.ParseException: Encountered "<EOF>" at line 1, column 72.
      Was expecting one of:
          <NOT> ...
          "+" ...
          "-" ...
          <BAREOPER> ...
          "(" ...
          "*" ...
          <QUOTED> ...
          <TERM> ...
          <PREFIXTERM> ...
          <WILDTERM> ...
          <REGEXPTERM> ...
          "[" ...
          "{" ...
          <NUMBER> ...
          <TERM> ...
          "*" ...
          
      	at org.apache.lucene.queryparser.classic.QueryParser.generateParseException(QueryParser.java:698)
      	at org.apache.lucene.queryparser.classic.QueryParser.jj_consume_token(QueryParser.java:580)
      	at org.apache.lucene.queryparser.classic.QueryParser.Clause(QueryParser.java:265)
      	at org.apache.lucene.queryparser.classic.QueryParser.Query(QueryParser.java:202)
      	at org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(QueryParser.java:160)
      	at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:118)
      	... 43 more
      

        Attachments

        1. droptable.txt
          0.3 kB
        2. mobydick.txt.po
          3.47 MB
        3. mobydick.txt.pot
          2.31 MB

          Activity

            People

            • Assignee:
              sflanigan Sean Flanigan
              Reporter:
              djansen Damian Jansen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: