[英]How can I find main Lucene source code
I want to know how lucene index text and store on files. 我想知道Lucene如何索引文本并存储在文件中。 I try to find its source code but what I found it high level source code not basic source code.
我尝试查找其源代码,但是我发现它的高级源代码不是基本源代码。 For instance I am looking for class indexer or indexWriter which create and write the index but I could not.
例如,我正在寻找创建和写入索引的类indexer或indexWriter,但是我不能。 Would you please help we find the main source code of Lucene?
您能帮助我们找到Lucene的主要源代码吗?
I downloaded the code from http://lucene.apache.org/core/ but I could not find the codes I need. 我从http://lucene.apache.org/core/下载了代码,但是找不到所需的代码。 I read following references but they are not helpful too.
我阅读了以下参考资料,但它们也无济于事。
http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/ http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/
http://oak.cs.ucla.edu/cs144/projects/lucene/ http://oak.cs.ucla.edu/cs144/projects/lucene/
http://lucene.apache.org/core/3_0_3/fileformats.html http://lucene.apache.org/core/3_0_3/fileformats.html
I think it is naïve to expect that somehow the whole indexing should fit in a single class. 我认为幼稚地期望整个索引应该适合单个类。 Before understanding classes you should first understand high-level concepts.
在理解课程之前,您应该首先了解高级概念。 Classes are just narrow tiny puzzles plugged into a large framework.
类只是插入大型框架中的狭小谜题。
In particular, if you are interested in the Lucene codecs, you should read this first. 特别是,如果您对Lucene编解码器感兴趣,则应先阅读此内容 。 Then you could look at the unit test and run/debug/step over on your machine to see how things work.
然后,您可以查看单元测试并在计算机上运行/调试/逐步执行,以查看其工作方式。 The next thing would be to implement slightly altered version of standard postings format and see how it goes.
接下来的事情是实施标准发布格式的略微更改的版本,并查看其进展情况。
Your mentioned locations ( http://svn.apache.org ) indeed contain Lucene source code, so does downloadables from http://lucene.apache.org/core , don't look anywhere else. 您提到的位置( http://svn.apache.org )确实包含Lucene源代码,因此从http://lucene.apache.org/core下载的内容也没有,在其他地方都看不到。
它是开源的,您可以选择其网站上提到的任何镜像来下载源代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.