Shawn i think your way is good. i will study more about it. thanks, Amin
On Tue, Dec 19, 2017 at 9:57 AM, Amin Raeiszadeh <amin24march1...@gmail.com> wrote: > Erick, in your example if first entry contains 10 term then i need to > start the second entry position from 100 not from 110. > thanks, > Amin > > On Tue, Dec 19, 2017 at 3:25 AM, Shawn Heisey <apa...@elyograg.org> wrote: >> On 12/18/2017 12:29 AM, Amin Raeiszadeh wrote: >>> thanks too much Erick and mikhail. >>> i change SloppyPhraseScorer class for my custom behavior with some fields. >>> so i need to index some fields with customized gap between terms of fields. >>> i'm not profession with solr and i think with schema.xml only i can >>> set fixed gap increment between terms of field but i need to calculate >>> base on some formula and then decide how much gap should be set >>> between each term. >>> i think i should use some thing like plug-in or inject some code to >>> index flow of solr as you described. >> >> Most likely what you would need is a custom TokenFilter implementation >> that can determine what custom gaps are needed and implement them. You >> would then need to make sure Solr knows about the jar containing that >> plugin, and add that filter as a step in the analysis chain in the >> schema for your core/collection. >> >> I don't know anything about how to write a TokenFilter, but there are >> lots of implementations in the Lucene code. >> >> Thanks, >> Shawn >>