I tried returning false in equals method but still it has no effect. Btw is there any documentation where i can look at what the functions are used for. I can't find any proper documentation related to it. It is very difficult to guess the usage of the functions.
I don't think it will be a good idea to go through the whole solr code just to make a external valuesourceparser. Any ideas? Regards, Rohit Agarwal On Wed, Oct 5, 2016 at 10:11 AM, Rohit Agarwal <rohit.agar...@eazydiner.com> wrote: > Hi Hoss, > > Thanks for the response. Will make the necessary changes and get back to > you. > > Btw this is just a testing code. The logic is yet to be implemented. What > according to you could be the best way to return hashcode? > > Regards, > Rohit > > On Oct 5, 2016 5:27 AM, "Chris Hostetter" <hossman_luc...@fucit.org> > wrote: > >> >> : Eg: if i make a query to sort by func(cost) desc >> : It works. >> : Now if i change cost with some another field eg func(rating) desc >> : It sorts the result by cost only. >> : >> : Now if i restart the solr server and call sort by func(rating) it works >> but >> : now it will stick with rating >> : >> : Any idea why this would be happening? >> >> sounds like a queryResultCache collision -- perhaps all instances of your >> ValueSource are saying they are equal to eachother? >> >> : @Override >> : public boolean equals(Object o) { >> : return true; >> : } >> >> yup. >> >> : @Override >> : public int hashCode() { >> : return this.hashCode(); >> : } >> >> >> I don't even know what to say about that hashCode implementation ... i'm >> honestly amazed your solr instance doesn't constantly throw >> StackOverflowError on every request using your Value Source. >> >> >> >> -Hoss >> http://www.lucidworks.com/ >> >