About highlighter

2011-03-16 Thread Gong Li
Hi, My highlight code is shown as following: QueryScorer scorer = new QueryScorer(query); Highlighter highlighter = new Highlighter(simpleHTMLFormatter, scorer); highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer, 500)); String contents = doc.get("contents"); TokenStream toke

About PDF+Lucene

2011-02-19 Thread Gong Li
Hi, I use PDFBOX to extract the text in the PDF and then use Lucene to index and search. Finally, I can find the context of the keyword but in String. Question: I need to create a new PDF which contains the context of the keyword. The format is like the original one, but only contains the context

Lucene: If I have picture, table, or somthing others in the PDF

2011-02-18 Thread Gong Li
Hi, I am developing a PDF search engine, locally. I have used API: pdfbox and lucene. I must show the user the PDF page containing the keywords(if highlight, it's great) and sort by relevance(default in lucene). HOW??? Maybe, if there are some pictures in the PDF page, how could it display to th

Lucene Wordnet

2011-02-14 Thread Gong Li
Hi, I need to generate a *single *executable JAR. In my code, it needs the wordnet index directory. So When I run the JAR, it needs local directory in my computer. And other computer can't run. Is there any way to search by using wordnet synonyms index with a single executable file? Thx.

About FSDirectory, File

2011-02-13 Thread Gong Li
Hi, I need to generate executable JAR. In my code, it has some lines as following: String path = "d:\\project\\"; File f = new File(path); Directory dir = FSDirectory.open(f); In the path, there is a wordnet index which is used to search by synonyms. When I run the JAR, it needs local directory

Re: About WordNet synonyms search

2011-02-12 Thread Gong Li
edevil) 2011/2/13 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 A

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

Question about Case Sensitive?!

2011-02-10 Thread Gong Li
Hi, I use standardAnalyzer, queryParser, highlighter in my program, but they lowercase the keywords. Now i need to search the keywords CASE SENSITIVE. Is there any methods to achieve this and also use standardAnalyzer and queryParser? Or some other ways? HOW??? Thx.

Lucene Questions about query and highlighter~^^

2011-02-08 Thread Gong Li
Hi, I am coding a *local pdf search engine* in Java.(If someone did it before, could you please give some tips?) So I need query parse. Assume I want to search for "hello user" in the document. *Q1*. I have 4 kinds of queries in my program. They are: 1. Match Exact words or phases. e.g. "hell

Lucene Questions about query and highlighter~^^

2011-02-08 Thread Gong Li
Hi, I am coding a *local pdf search engine* in Java.(If someone did it before, could you please give some tips?) So I need query parse. Assume I want to search for "hello user" in the document. *Q1*. I have 4 kinds of queries in my program. They are: 1. Match Exact words or phases. e.g. "hell

Fwd: Lucene Problems

2011-02-03 Thread Gong Li
Hi, I am developing an advanced pdf search engine in java by using pdfbox and lucene. And I must display the context of each keyword in the user interface, but i cannot find a method to do so. Most of the methods provided are used to deal with documents with whole content in the specified field, a