Alex Garel

Results 244 comments of Alex Garel

Hi @seandavi You're right this is not a supported scenario, but it is an interesting one. Two solutions: * you modify your luqum search tree (using a TreeTransformer) before giving...

Yes, sadly error messages are not that good, but it would take a certain amount of work to have it right (PLY does not help much in that).

Oh sorry @guozizi, yes PLY is not thread safe … see https://github.com/dabeaz/ply/issues/268

See also this comment: https://github.com/dabeaz/ply/blob/master/ply/yacc.py#L42 I tried a copy.deepcopy of the parser, but it did not seems to resolve the problem…

@guozizi this works ! ``` import _thread from luqum.parser import parser from ply import lex def run(): qs1 = '(title:"foo bar" AND body:"quick fox") OR title:fox AND (title:"foo bar" AND...

@guozizi I added a helper function for that, as I think this might be a quite common scenario. See my request.

@mmoriniere I'm not sure you are not running into this in your server.

It's true that the parser is not doing all the checks it could be doing, and that's kind of a tedious work to do ! But we can at least...

I re-read the [lucene documentation](https://lucene.apache.org/core/2_9_4/queryparsersyntax.html) and indeed Boost can be implicite (defaults to 1). I implemented it in a PR.

Hello @borissnd You're right it's not supported right now. We would have to change the lexer and the grammar to support it. Feel free to propose to make a PR...