Thank you so much, gonna try both options. Im trying to find some Similarity examples too.
Andrzej Bialecki wrote: > > On 2010-03-22 18:06, zsl wrote: >> >> I was thinking about that, but i dont know if it is the best option. Ty. > > There is a certain trick to do this with the current API (let's hope the > new API is more .. flexible .. ? ;) ) > > Implement a dummy Searcher that delegates most of its work to the real > Searcher, except for docFreq(Term), where you return your arbitrary > values. Then do Searcher.rewrite(Query) to expand the query, and then > Query.weight(Searcher) to obtain a Weight - which uses your modified IDF. > > Finally, use this Weight to run a query against your real Searcher. > > You can see this approach implemented here: > > https://issues.apache.org/jira/browse/SOLR-1632 > > though this contains some Solr-specific scaffolding, too. > > > -- > Best regards, > Andrzej Bialecki <>< > ___. ___ ___ ___ _ _ __________________________________ > [__ || __|__/|__||\/| Information Retrieval, Semantic Web > ___|||__|| \| || | Embedded Unix, System Integration > http://www.sigram.com Contact: info at sigram dot com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-dev-h...@lucene.apache.org > > > -- View this message in context: http://old.nabble.com/Set-IDF-value-manually-on-a-search-query-tp27988911p27993221.html Sent from the Lucene - Java Developer mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org