You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use a field name with a space in it. It seems that I can make this work with the java lucene SyntaxParser but not with your library (please omit the fact that using a space in a field name is probably a very bad idea ;) ).
Here is what I do in Java:
And here a re a couple tests that give inconsistent results afaik:
Here is the code to reproduce:
var lucene = require("lucene")
var ast = lucene.parse('name:"hello there" AND (tags.tag one:(a OR c) AND tags.tag2:b)');
console.log(lucene.toString(ast), "as expected 1");
ast = lucene.parse("name:\"hello there\" AND (tags.tag one:(a OR c) AND tags.tag2:b)");
console.log(lucene.toString(ast), "as expected 2");
ast = lucene.parse("name:\"hello there\" AND (tags.tag\ one:(a OR c) AND tags.tag2:b)");
console.log(lucene.toString(ast), "not sure what was to expect here but feels weird to have lost the antislash");
ast = lucene.parse("name:\"hello there\" AND (tags.tag\\ one:(a OR c) AND tags.tag2:b)");
console.log(lucene.toString(ast), "if we lost the antislash previously we should have had one antislach here i suppose ?");
ast = lucene.parse('name:"hello there" AND (tags.tag\ one:(a OR c) AND tags.tag2:b)');
console.log(lucene.toString(ast), "I was definitly expecting the anti slash to remain here");
ast = lucene.parse('name:"hello there" AND (tags.tag\\ one:(a OR c) AND tags.tag2:b)');
console.log(lucene.toString(ast), "And here suddenly I have two anti slashes");
The text was updated successfully, but these errors were encountered:
Hello.
I'm trying to use a field name with a space in it. It seems that I can make this work with the java lucene SyntaxParser but not with your library (please omit the fact that using a space in a field name is probably a very bad idea ;) ).
Here is what I do in Java:
And here a re a couple tests that give inconsistent results afaik:
Here is the code to reproduce:
The text was updated successfully, but these errors were encountered: