Re: Iterating over all documents in an index

2011-02-12 Thread Georger Araujo
Hi Erick, Thanks for the input. I didn't really do the doc.get() in my code, because what I'm really looking for are the stemmed terms in the index. I only borrowed the idea from the snippet. Here's how my code looks like now: Map termMap = new TreeMap(); List filenames = new ArrayList( reader.max

Re: About WordNet synonyms search

2011-02-12 Thread Erick Erickson
Ah, you're expanding synonyms at query time. Missed that. How is the indexing done in the first place? What analyzer is used? Have you even tried using Luke to look into your index and see what's actually in there? What is shown when you do an explain? Most often this kind of thing is a result o

Re: Iterating over all documents in an index

2011-02-12 Thread Erick Erickson
Be aware that when you do a doc.get(), the fields are the *stored* fields in their original, unanalyzed form. Is that really what you want? Or do you want the tokenized form of the fields? If the latter, you might get the Luke code, it reconstructs all the fields in the document from the terms tha

Re: About WordNet synonyms search

2011-02-12 Thread Gong Li
I print out the synonym for browned fox shown as following. But NO "make" is in the list. I mean I can use synonym to search the contents. When I search for "browned fox", it should get "brown fox" as the result, but it get "make" as one of the results. make is not the synonym, so it should not in

Re: About WordNet synonyms search

2011-02-12 Thread Erick Erickson
At a guess make is a synonym for one of your search terms. doc.get returns the original content, not synonyms. So what are your synonyms that might be a factor here? Best Erick On Sat, Feb 12, 2011 at 6:04 AM, Gong Li wrote: > Hi, > > I am tying WordNet synonyms into an SynonymAnalyzer. But I

Iterating over all documents in an index

2011-02-12 Thread Georger Araujo
Hi, I want to iterate over all documents in a given index. I've found the following piece of code [1]: IndexReader reader = // create IndexReader for (int i=0; ihttp://stackoverflow.com/questions/2311845/is-it-possible-to-iterate-through-documents-stored-in-lucene-index [2] https://cwiki.apache.or

About export as .jar

2011-02-12 Thread Gong Li
Hi, How can I export the wordnet index to the execute jar that program can execute without absolute path??? Thx

About WordNet synonyms search

2011-02-12 Thread Gong Li
Hi, I am tying WordNet synonyms into an SynonymAnalyzer. But I find there is a wrong in the search result as following: input keywords: *browned fox* query.toString(): (content:browned content:brown) (content:fox content:trick content:throw content:slyboots content:fuddle content:fob content:dod