I was also going to point out the field masking span query, but... also that it is at the Lucene level and not surfaced in Solr: http://lucene.apache.org/core/6_0_0/core/org/apache/lucene/search/spans/FieldMaskingSpanQuery.html
Also see: https://issues.apache.org/jira/browse/LUCENE-1494 But no hint anywhere that I know of for how to surface this Lucene feature in Solr. I would suggest the workaround of using an update processor to combine the first and last names into a single multivalues field. -- Jack Krupansky On Wed, Apr 13, 2016 at 4:20 PM, Ahmet Arslan <iori...@yahoo.com.invalid> wrote: > Hi Thrinadh, > > I think you can pull something together with FieldMaskingSpanQuery > > http://blog.griddynamics.com/2011/07/solr-experience-search-parent-child.html > > Ahmet > > > > On Wednesday, April 13, 2016 8:24 PM, Thrinadh Kuppili < > thrinadh...@gmail.com> wrote: > Hi, > > I have created 2 multivalued fields FirstName, Lastname > > In solr the values available are : > FirstName": [ "Kim", "Jake","NATALIE", "Tammey"] > LastName": [ "Lara", "Sharan","Taylor", "Taylor"] > > I am trying to search where firstName is Tammey and LastName is Taylor. > > I should be able to search firstname [4] and lastname [4] and get the > record > but currently it is searching with the firstname [4] and lastname [3] which > shouldn't not happen. > > Do let me know if more details are needed. > > Thnx > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-search-for-a-First-Last-of-contact-which-are-stored-in-differnet-multivalued-fields-tp4269901.html > Sent from the Solr - User mailing list archive at Nabble.com. >