How to write a 'fq' by joining two different indexes.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to write a 'fq' by joining two different indexes.

Siva ReddySM

We have a requirement to get a list of products based on product attribute
and inventory.

Problem, use case and test data is given below.

InentoryIndex is a sub index to ProductIndex. Both ProductIndex and
InventoryIndex share common node called "catentry_id".

Example of ProductIndex is shown below. It has other details. I have given
only required fields.

          "7000000000000006001/_/SAP Status/_/SAP

Example of InventoryIndex is shown below.

Testing Data :
15015 : AC : Qty : 0
15009 : UI : Qty : 0
15073 : UI : Qty : 99999
15079 : AC : Qty : 99999
15001 : MA : Qty : 0
15003 : MA : Qty : 99999

Use case
IF Product Inventory is greater than 0, then no need to check for SAP
Status. Display the product irrespective of 'SAP Status' value.
IF Product Inventory is 0, then need to check for attribute 'SAP Status'.
If there is an attribute associated to that product has value either AC.

Now, If I want to write the above use case in the form of fq, what should
be the syntax? I have tried different forms of fq, but I was not able to
get the correct result. Example url :

"15009" "15073" "15079" "15001"
"15003"&fq=catalog_id:12051&fq=storeent_id:("12601" "12501")&fq=(!{!join
from=catentry_id to=catentry_id
(ads_f11501_ntk_cs:"AC" AND {!join from=catentry_id to=catentry_id

Can you please let me know the correct syntax?


De informatie verzonden middels dit emailbericht is uitsluitend bestemd
voor de geadresseerde. Gebruik van deze informatie door anderen dan de
geadresseerde, evenals openbaarmaking, vermenigvuldiging, verspreiding
en/of verstrekking aan derden is zonder uitdrukkelijke toestemming van
Cursum B.V. niet toegestaan. Tevens is Cursum B.V. niet aansprakelijk voor
onjuiste en/of onvolledige overbrenging van de inhoud van verzonden e-mail,
noch voor het tijdstip van ontvangst.