You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by 王建新 <li...@gmail.com> on 2008/04/18 13:42:30 UTC

a question about MultiSearcher

If I search in multiple dirs,I can use MultiSearcher.
The idf about a term is log(numDocs/(docFreq+1)+1).

In the two kinds of condition:
    1.only 1 dir to search
    2. 2 dirs to search
the idf about a term is not the same?

why not lucene consider giving a method to set the numDocs for class
IndexWriter?
just like:

        IndexWriter writer=new IndexWrite(......
        writer.setNumDoc(num1+num2);

Thanks.

a question about MultiSearcher

Posted by 王建新 <li...@gmail.com>.
Sorry, I made a mistake.
Lucene made it already.

Re: a question about MultiSearcher

Posted by 王建新 <li...@gmail.com>.
Thanks, I will join the mailing list.

2008/4/19, Daniel Naber <lu...@danielnaber.de>:
>
> On Freitag, 18. April 2008, 王建新 wrote:
>
> > If I search in multiple dirs,I can use MultiSearcher.
> > The idf about a term is log(numDocs/(docFreq+1)+1).
> >
> > In the two kinds of condition:
> >     1.only 1 dir to search
> >     2. 2 dirs to search
> > the idf about a term is not the same?
>
> It should be the same, unless you are using an old version of Lucene (1.4
> or older). If it doesn't work for you, could you provide a test case? BTW,
> there's more traffic and a better chance for an answer on the
> java-user@lucene.apache.org mailing list.
>
> Regards
> Daniel
>
> --
> http://www.danielnaber.de
>

Re: a question about MultiSearcher

Posted by Daniel Naber <lu...@danielnaber.de>.
On Freitag, 18. April 2008, 王建新 wrote:

> If I search in multiple dirs,I can use MultiSearcher.
> The idf about a term is log(numDocs/(docFreq+1)+1).
>
> In the two kinds of condition:
>     1.only 1 dir to search
>     2. 2 dirs to search
> the idf about a term is not the same?

It should be the same, unless you are using an old version of Lucene (1.4 
or older). If it doesn't work for you, could you provide a test case? BTW, 
there's more traffic and a better chance for an answer on the 
java-user@lucene.apache.org mailing list.

Regards
 Daniel

-- 
http://www.danielnaber.de