In theory it should be possible if you are indexing the positions of the tokens in your field, but I am not aware of any solr query that allows you to weight the matches based on the position, does anyone know if is possible?
From: solr-user@lucene.apache.org At: 01/29/18 11:25:36To: solr-user@lucene.apache.org Subject: Re: ***UNCHECKED*** Limit Solr search to number of character/words (without changing index) Hi Alessandro, Thanks for making it more clear. As I mentioned I do not want to change my index (mentioned in subject) for the feature I requested. search query will have to look for first 100 characters indexed in same XYZ field. " How can I achieve this without changing index? I want at searching side. On Mon, Jan 29, 2018 at 4:13 PM, alessandro.benedetti <a.benede...@sease.io> wrote: > This seems different from what you initially asked ( and Diego responded) > "One is simple, search query will look for whole content indexed in XYZ > field > Other one is, search query will have to look for first 100 characters > indexed in same XYZ field. " > > This is still doable at Indexing time using a copy field. > You can have your "originalField" and your "truncatedField" with no problem > at all. > Just use a combination of copyFields[1] and what Erick suggested. > > Cheers > > [1] https://lucene.apache.org/solr/guide/6_6/copying-fields.html > > > > ----- > --------------- > Alessandro Benedetti > Search Consultant, R&D Software Engineer, Director > Sease Ltd. - www.sease.io > -- > Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html >