Share data through script query

(Jean Yves Goubet) #1


I'm new to script query and I'm facing the following problem :

While using it to define if a doc is matching or not, I need to get some field value from the previous doc (because my docs are sorted in a specific way), I couldn't find a way to do that.

My first guess was to set some sort of global variable I could access from my script but I couldn't do it (and I couldn't find any topic related on the web :confused:) . So I wanted to try to use streams (file, socket...whatever works) but any stream mechanisms I've tried so far led me to the same issue : AccessControlException even after changing my security policy with what I thought was ok.

Can someone help me with that please ? :slightly_smiling:


(Jimferenczi) #2

Documents are not "sorted" in the index and the sort order of the query does not influence the order of the matching documents. Only the top documents are sorted, this means that the order of the matching documents is internal and has nothing to do with the sort criteria of the query.

(Jean Yves Goubet) #3

Hi @jimferenczi,

Thank you for that, I'll stop waste my time :wink:

Have a nice day

(system) #4