Why are you trying to do this? I'm wondering if this is an XY problem. For instance, you could use a multivalued field of _text_ type with a positinIncrementGap of 100. Now you simply search (don't need function queries) for "Deli NCR"~90 and you wouldn't match across multiple entries. There are other tricks on this technique if, for instance, you didn't want to match "Deli NCR India"
So if all you're doing it matching this is a much more robust solution. But without some statement of the problem you're trying to solve, i.e. the use-case, it's hard to suggest alternatives. Otherwise you're stuck with custom code I'm afraid. Best, Erick On Sun, Dec 25, 2016 at 11:36 AM, himanshu pal <hp.ii...@gmail.com> wrote: > Greetings all, > > I am trying to match a user input string with a multivalued field in solr. > For non multivalued fields I was using following function query > > strdist(def(state_exact,""),"Delhi NCR",edit) > > Using the same for multivalued fields throws following error > "can not use FieldCache on multivalued field" > > I googled it and found that some suggestions to make the field > multivalued=false so I combined all values to comma separated single field > but then the problem I faced was there is no ISSUBSTR builtin function in > solr. > > Is there any other way of solving this problem besides writing a Custom > ISSUBSTR function in solr. > > > Thanks, > Himanshu