You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by blazingwolf7 <bl...@gmail.com> on 2008/06/26 09:24:08 UTC

How Lucene Search

hi, 

I am fairly new to Lucene and is currently going over its source code. I had
read through the code for a few times, mapping it and all but I seems to be
facing a problem. I could go all the way to the calculation of score for
each result obtain, but strangely I did not managed to locate the part where
Lucene open the index and check for the matching term.

What I mean is that, I want to check on how Lucene actually open the index
and perform the search. I went through all the methods in IndexReader,
IndexSearcher and some other related class but still fail to locate the
method responsible.

Could anyone help me with this? Thanks 
-- 
View this message in context: http://www.nabble.com/How-Lucene-Search-tp18127970p18127970.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: How Lucene Search

Posted by Alex Cheng <ch...@gmail.com>.
the debugger that came with eclipse is pretty good for this purpose.
You can create a small project and then attach Lucene source for the
purpose of debugging.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: How Lucene Search

Posted by blazingwolf7 <bl...@gmail.com>.
Thanks for the reply. I had try to start a new project already. Like I had
mention, I actually go through the code from the start of the application
and till the end where the scoring is done. 

But unfortunately, I still fail to locate the part where Lucene open the
index to perform the search. Anyone has any idea on how to do this?
-- 
View this message in context: http://www.nabble.com/How-Lucene-Search-tp18127970p18146253.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: How Lucene Search

Posted by lutan <ws...@live.cn>.
I have same questions puzzled me. 
Could anyone explain which class been called in  the searching  steps ?
Thanks!
> Date: Thu, 26 Jun 2008 00:24:08 -0700> From: blazingwolf7@gmail.com> To: java-user@lucene.apache.org> Subject: How Lucene Search> > > hi, > > I am fairly new to Lucene and is currently going over its source code. I had> read through the code for a few times, mapping it and all but I seems to be> facing a problem. I could go all the way to the calculation of score for> each result obtain, but strangely I did not managed to locate the part where> Lucene open the index and check for the matching term.> > What I mean is that, I want to check on how Lucene actually open the index> and perform the search. I went through all the methods in IndexReader,> IndexSearcher and some other related class but still fail to locate the> method responsible.> > Could anyone help me with this? Thanks > -- > View this message in context: http://www.nabble.com/How-Lucene-Search-tp18127970p18127970.html> Sent from the Lucene - Java Users mailing list archive at Nabble.com.> > > --------------------
 -------------------------------------------------> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org> For additional commands, e-mail: java-user-help@lucene.apache.org> 
_________________________________________________________________
多个邮箱同步管理,live mail客户端万人抢用中
http://get.live.cn/product/mail.html

Re: How Lucene Search

Posted by Grant Ingersoll <gs...@apache.org>.
The index is opened via the IndexReader and then it is a variety of  
places that factor into scoring, such as the Query, Weight and Scorer  
classes.  Probably the easiest place to start is the TermQuery and  
TermScorer.

You might also have a read through http://lucene.apache.org/java/2_3_2/scoring.html

You might also try stepping through the path of a simple TermQuery via  
a debugger as it enters the searcher and then expand to try  
BooleanQuery and some of the other queries.

Cheers,
Grant

On Jun 26, 2008, at 3:24 AM, blazingwolf7 wrote:

>
> hi,
>
> I am fairly new to Lucene and is currently going over its source  
> code. I had
> read through the code for a few times, mapping it and all but I  
> seems to be
> facing a problem. I could go all the way to the calculation of score  
> for
> each result obtain, but strangely I did not managed to locate the  
> part where
> Lucene open the index and check for the matching term.
>
> What I mean is that, I want to check on how Lucene actually open the  
> index
> and perform the search. I went through all the methods in IndexReader,
> IndexSearcher and some other related class but still fail to locate  
> the
> method responsible.
>
> Could anyone help me with this? Thanks
> -- 
> View this message in context: http://www.nabble.com/How-Lucene-Search-tp18127970p18127970.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

--------------------------
Grant Ingersoll
http://www.lucidimagination.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ








---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org