Does not handle deep objects
If I want to compose a query on an object in Lucene with the following structure, I'm unable to create a query for story.author.name:
story {
author {
id
name
}
}
I get this kind of error:
str.replace is not a function at Object.format .... line 18 ....
It appears to me from reading the code that this module cannot handle any deep objects at all. If the object in Lucene is not completely flat there does appear to be an obvious way to construct a query.
Here's the attempt to build the query:
var query = {};
query.$operator = 'AND';
query.$operands = []
query.$operands.push({ story: { author : { name: 'Twain' } } } )
console.log(generator.convert(query)); // this emits the error shown above
@pszabop Hi! What is the desired lucene query string?
@garethbowen: to reply to your previous question (as I am running into same issue) the end result would look like this...
projects:(title:'abc')
This lucene searches on the Document with this structure...
{ name:string, projects:[ { id:int, title:string }] }
@rek72 @pszabop Can you check out the linked commits and let me know if that looks right? I couldn't find any documentation for nested queries so I was guessing a little but it seems to work.