Tutorial #009: Using queries to retrieve documents using Bloomreach XM and XIN Mods

In this Bloomreach XM with XIN Mods tutorial we're going to talk about executing simple queries using the XIN Mods Query API.

All operators

Code from the video


									it("should list recipes with a certain ingredient", async () => {
									    const conn = xinmods.connectTo("http://localhost:8080", "admin", "admin");
									    const queryStr = (
									                    .contains("xinmods:ingredient/xinmods:string", "garlic")
									                    .contains("xinmods:ingredient/xinmods:string", "onion")
									    console.log("Query Str: ", queryStr);
									    const queryResponse = await conn.executeQuery(queryStr);
									    for (const resultDoc of queryResponse.documents) {
									        console.log("result: ", resultDoc.items.title);

Also Read