Re: Problem with BooleanQuery

2011-09-22 Thread Peyman Faratin
On Sep 22, 2011, at 4:59 AM, Ian Lea wrote: >> I am not analyzing the title >> >> Field titleField = new Field("title", article.getTitle(),Field.Store.YES, >> Field.Index.NOT_ANALYZED); > > OK. But the output you quote says "no match on required clause > (title:List of newspapers in New York)

Re: Problem with BooleanQuery

2011-09-22 Thread Ian Lea
> I am not analyzing the title > > Field titleField = new Field("title", article.getTitle(),Field.Store.YES, > Field.Index.NOT_ANALYZED); OK. But the output you quote says "no match on required clause (title:List of newspapers in New York)" so something is out of synch somewhere. What does Luke

Re: Problem with BooleanQuery

2011-09-21 Thread Peyman Faratin
Hi Ian I am not analyzing the title Field titleField = new Field("title", article.getTitle(),Field.Store.YES, Field.Index.NOT_ANALYZED); Do you think booleanquery is the right approach for solving the problem (finding lucene score of a word or a phrase in _a_ particular document)? thanks for

Re: Problem with BooleanQuery

2011-09-21 Thread Ian Lea
How is the "title" field indexed? Seems likely it is analyzed in which case a TermQuery won't match because "list of newspapers in New York" would be analyzed into terms "list", "newspapers", "new", "york" assuming things were lowercased, stop words removed etc. Maybe you need your "word" as Term