Reputation: 195
I'm trying to apply search on film titles using a structured query applied to json objects.
Let's imagine a film titled "Marius et Jeannette".
db.documents.query( qb.where( qb.word('title','Marius') )
or
db.documents.query( qb.where( qb.word('title','Marius et Jeannette') )
both give results.
but
db.documents.query( qb.where( qb.word('title','Marius Jeannette') )
does not.
Is there a way to configure a "near query" using the node.js API? I did not find anything on this subject in the doc.
Upvotes: 2
Views: 59
Reputation: 7335
The QueryBuilder supports the near query:
http://docs.marklogic.com/jsdoc/queryBuilder.html#near
Do you have a case where that isn't working?
Hoping that helps,
Upvotes: 1
Reputation: 7770
I believe your sample can be done with "Maruis NEAR Jeanette"
Check out the node.js string query section here under the section titled: Searching with String Queries
Upvotes: 0