see http://lucene.apache.org/core/3_6_0/fileformats.html#field_index for file format documentation.
simon On Mon, Jun 25, 2012 at 5:28 AM, wangjing <ppm10...@gmail.com> wrote: > .fdx file contains, for each document, a pointer to its field data. > > BUT fdx is contains pointer to WHAT? it's a pointer of field data > offset in the fdt file? > > my app is > > File file = new File(path); > FSDirectory directory = FSDirectory.open(file); > IndexWriterConfig conf = new > IndexWriterConfig(Version.LUCENE_36,new > StandardAnalyzer(Version.LUCENE_36)); > conf.setOpenMode(IndexWriterConfig.OpenMode.CREATE); > IndexWriter iw = new IndexWriter(directory, conf); > iw.setInfoStream(System.out); > Document doc = new Document(); > Field storeYes = new Field("content1", "my storeyes > test", > Store.YES, Index.ANALYZED); > Field storeNo = new Field("content2", "my storeno > test", Store.YES, > Index.ANALYZED); > doc.add(storeYes); > doc.add(storeNo); > Document doc1 = new Document(); > Field storeYes1 = new Field("doc1content1", > "doc1 my storeyes test", Store.YES, > Index.ANALYZED); > doc1.add(storeYes1); > iw.addDocument(doc1); > iw.addDocument(doc); > iw.forceMerge(1); > iw.close(); > > the fdx content is blow: > 00 00 00 03 00 00 00 00 00 00 00 04 00 00 00 00 > 00 00 00 1D > > the fdt content is > 00 00 00 03 01 00 01 15 64 6F 63 31 20 6D 79 20 > 73 74 6F 72 65 79 65 73 20 74 65 73 74 02 01 01 > 10 6D 79 20 73 74 6F 72 65 79 65 73 20 74 65 73 > 74 02 01 0F 6D 79 20 73 74 6F 72 65 6E 6F 20 74 > 65 73 74 > > > the uint64 value in fdx is 4 and 29 in decimal ,it's which file's offset? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org >