Re: How to export lucene index to a simple text file?

2010-09-21 Thread Lance Norskog
The Lucene CheckIndex program opens an index and walks all of the data structures. It is a good start for you. Sahin Buyrukbilen wrote: Thank you Uwe, I will read the docs and try to do it, however do you have an example code? I need because I am not very familiar with Java. Thank you. Sahin

Re: how to change the getPositionIncrementGap for a field which has multiple values

2010-09-21 Thread Erick Erickson
You should be able to subclass your favorite Analyzer and then just override that method. Best Erick On Tue, Sep 21, 2010 at 4:25 PM, Qi Li wrote: > Hi, Guys: > > I try to change the getPositionIncrementGap for a field which has multiple > values per document on index time. But got no clue how

Re: Best practice for embedding extra information in an index

2010-09-21 Thread Erick Erickson
Off the top of my head... 1) is certainly easiest. This looks suspiciously like synonyms. That is, at index time you inject the ID as a synonym in the text and it gets indexed at the same position as the token. Why this helps is that then phrase queries continue to work. Lucene in Actio

Re: Using FastVectorHighlighter for snippets

2010-09-21 Thread Koji Sekiguchi
(10/09/22 3:24), Devshree Sane wrote: I am using the FastVectorHighlighter for retrieving snippets from the index. I am a bit confused about the parameters that are passed to the FastVectorHighlighter.getBestFragments() method. One parameter is a document id and another is the maximum number o

how to change the getPositionIncrementGap for a field which has multiple values

2010-09-21 Thread Qi Li
Hi, Guys: I try to change the getPositionIncrementGap for a field which has multiple values per document on index time. But got no clue how to approach this issue. Any ideas? Thank you very much. Best regards, Qi Li

How to calculate the fieldNorm

2010-09-21 Thread Qi Li
Hi, guys: I read this http://lucene.apache.org/java/3_0_2/api/core/index.html . But I am confused about how the fieldNorm is calculated after seeing the explanation. ( I am using StandardAnalyzer for both index and search) *1.. Index Part* document 0: doc.add(new Field("test","it

Best practice for embedding extra information in an index

2010-09-21 Thread Christopher Condit
I'm curious about embedding extra information in an index (and being able to search the extra information as well). In this case certain tokens correspond to recognized entities with ids. I'd like to get the ids into the index so that searching for the id of the entity will also return that docu

Using FastVectorHighlighter for snippets

2010-09-21 Thread Devshree Sane
I am using the FastVectorHighlighter for retrieving snippets from the index. I am a bit confused about the parameters that are passed to the FastVectorHighlighter.getBestFragments() method. One parameter is a document id and another is the maximum number of fragments. Does it mean that only the m

Re: How to export lucene index to a simple text file?

2010-09-21 Thread Sahin Buyrukbilen
Thank you Uwe, I will read the docs and try to do it, however do you have an example code? I need because I am not very familiar with Java. Thank you. Sahin On Tue, Sep 21, 2010 at 12:29 PM, Uwe Schindler wrote: > Hi, > > Retrieve a TermEnum and iterate it. By that you get all terms and can >

RE: How to export lucene index to a simple text file?

2010-09-21 Thread Uwe Schindler
Hi, Retrieve a TermEnum and iterate it. By that you get all terms and can retrieve the docFreq, which is the second column in your table. Finally for each term you position the TermDocs enum on this term to get all document ids. Read docs of IndexReader/TermEnum/TermDocs about this. Uwe - Uw

How to export lucene index to a simple text file?

2010-09-21 Thread Sahin Buyrukbilen
Hi, I am currently working on a project about private information retrieval and I need to have an inverted index file in txt format as follows: Term tfreq t Inverted list for t - and 1 <6, 0.159> bi

Re: recommended way to identify a version to pass to StandardAnalyzer constructor?

2010-09-21 Thread Ian Lea
+1 for a static method to get the appropriate value of Version. -- Ian. On Sun, Sep 19, 2010 at 11:21 PM, Bill Janssen wrote: > Simon Willnauer wrote: > >> On Fri, Sep 17, 2010 at 11:45 PM, Bill Janssen wrote: >> > Simon Willnauer wrote: >> > >> >> On Fri, Sep 17, 2010 at 8:14 PM, Bill Jans