Re: Ranking based on term position

2015-07-09 Thread JACK
Hi Li Li, I am experiencing the same problem. can you Explain little detailed? Where do i change these methods? I am using Solr 5.0.0, And How do i query this? Is there any change while query? -- View this message in context: http://lucene.472066.n3.nabble.com/Ranking-based-on-term-position-tp

Re: Ranking based on term position

2010-07-20 Thread Chris Hostetter
Use SpanFirstQuery : I need to make sure that documents with the search term occurring : towards the beginning of the document are ranked higher. : : For example, : : Search term : ox : Doc 1: box fox ox : Doc 2: ox box fox : : Result: Doc2 will be ranked higher than Doc1. : : The solution I

Re: Ranking based on term position

2010-07-19 Thread Li Li
I have considerd this problem and tried to solve it using 2 methods By these methods, we also can boost a doc by the relative positions of query terms. 1: add term Position when indexing modify TermScorer.score public float score() { assert doc != -1; int f = freqs[pointer]; floa