We're updating the issue view to help you get more done.Learn more

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

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 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

Status

Assignee

Sean Flanigan

Reporter

Damian Jansen

Labels

Tested Version/s

None

Components

Fix versions

Affects versions

platform-4.3.0

Priority

High