Last/max term in Lucene 4.x

2011-02-18 Thread Jason Rutherglen
This could be a rhetorical question. The way to find the last/max term that is a unique per document is to use TermsEnum to seek to the first term of a field, then call seek to the docFreq-1 for the last ord, then get the term, or is there a better/faster way?

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

Re: lucene3.0.3 | get correct document in case of multiple Boolean query in search criteria

2011-02-18 Thread Ian Lea
OR is the default operator, but since you are explicitly specifying ANDs and ORs, the default is probably not relevant anyway. See what query.toString() says. See also http://lucene.apache.org/java/3_0_3/queryparsersyntax.html and http://wiki.apache.org/lucene-java/LuceneFAQ#Why_am_I_getting_no_

lucene3.0.3 | get correct document in case of multiple Boolean query in search criteria

2011-02-18 Thread Ranjit Kumar
hi, I am using query like criteria = (sql OR sqlserver OR "sql server") AND java AND delphi . In this case when i am using default parser as code mention below: QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, field, analyzer); Query query = parser.parse(criteria); I am getting sa

Re: Keyword Analyzer

2011-02-18 Thread Ian Lea
You say you are indexing it as a single term, so TermQuery. -- Ian. On Fri, Feb 18, 2011 at 11:32 AM, Ganesh wrote: > Exactly. QueryParser is splitting it in to two words. > >>>Just build the query directly. > TermQuery or PhraseQuery? > > Regards > Ganesh > > > - Original Message - > F

Re: Keyword Analyzer

2011-02-18 Thread Ganesh
Exactly. QueryParser is splitting it in to two words. >>Just build the query directly. TermQuery or PhraseQuery? Regards Ganesh - Original Message - From: "Ian Lea" To: Sent: Friday, February 18, 2011 4:34 PM Subject: Re: Keyword Analyzer Presumably because without the quotes the

Re: Keyword Analyzer

2011-02-18 Thread Ian Lea
Presumably because without the quotes the parser is splitting it up into 2 terms. Why bother parsing it? Just build the query directly. -- Ian. On Fri, Feb 18, 2011 at 10:38 AM, Ganesh wrote: > Hello all, > > I am using Keyword analyzer to index a field and while using queryparser, I > am u

Keyword Analyzer

2011-02-18 Thread Ganesh
Hello all, I am using Keyword analyzer to index a field and while using queryparser, I am using the same analyzer. I am indexing the text Hello world and while searching using queryparser.parse it is not returning me any results. I need to use the text within the codes qp.parse("Hello world")