Anything preventing you from calculating the similarity score at index time and storing it as a field? The field can be used for scoring at query time.
Alternately you can make a field for each of the elements in the array and use custom scoring function at query time. There is no value to, storing numbers as text, you will lose the ability to search with a range. Satya Sent from my iPad > On Jan 11, 2014, at 1:16 PM, Shashi Kant <sk...@sloan.mit.edu> wrote: > > Hi all, I have a use-case where I would need to search a set of > numeric values, using a query set. My business case is > > 1. I have various Rock samples from various locations {R1...Rn} with > multiple measurements like Porosity [255] - an array of values , > Conductivity [1028] - also an array of numbers, and several such > metrics etc. > > They are arrays becauses measurements are taken in various ambient conditions. > > 2. For a new rock-sample Rn+1 I would like to query Solr and get a > ranked list of ordered by their multidimensional similarity. > > I was thinking using Solr as a way of perform this query, by > representing the numeric arrays as text and creating a document for > each sample with fields for each of the measurements. > > Has anyone approached in such a fashion? If so, could you share some > details about your approach. > > Regards > Shashi > > > -- > sk...@alum.mit.edu > (604) 446-2460