Query to compare two fields within a doc?


(Paul) #1

Hi,
Can I compare two fields in a doc and show all results?

eg;
show all docs where field_1 == field_2

Any ideas?


(Jason Wee) #2

you mean the value of two fields? if so, you can use filter with a script

doc[field_1].value == doc[field_2].value

hth

jason


(system) #3