1

When making query with OrderBy it always query wrong result whereby repeating first document multiple times added to list.

q := session.Advanced().DocumentQueryAllOld(reflect.TypeOf(&models.List{}), "", "user", false)
        //q = q.WhereNotEquals("Doc.hh", "Tarzan")
        q = q.OrderBy("Docnn")
        q = q.Statistics(&statsRef)
        //q = q.Skip(0)
       //q = q.Take(6)
        q.ToList(&queryResult)

If no index before it will query right result but if existing index auto created by a different OrderBy value it will query wrong result

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.