no. of documents with hits vs. no. of hits

2011-03-14 Thread Michael Wiegand
Hi, Does Lucene always count the number of documents with hits matching a query or is it also possible to count the overall number of hits? There would be a difference between the two if within a document there is actually more than one hit. Thank you in advance! Best, Michael

matching multi-word terms

2011-03-12 Thread Michael Wiegand
Hi, I would like to find documents matching multi-word terms, more specifically: my query is something like "B C" and I would like match contexts such as "A B C D E" but not "B A C D E" There seems to be some contradictory information on the web. Apparently, the statement Term t = new Term("

overall number of hits

2011-03-11 Thread Michael Wiegand
Hi, I am currently mainly interested in the overall number of matches in a document collection (several GBs) given a particular query. At the moment I am not interested in the matching documents themselves; just the number would be sufficient. In previous versions of lucene the Searcher class h

Re: index enforcing query terms to appear within the same sentence

2011-03-10 Thread Michael Wiegand
-td1501269.html A google search for "lucene indexing sentences" or similar finds that, and more. Different docs can have different fields/different numbers of fields, but the position gap approach is probably better. -- Ian. On Fri, Mar 4, 2011 at 7:06 AM, Michael Wiegand wr

Re: index enforcing query terms to appear within the same sentence

2011-03-04 Thread Michael Wiegand
nd more. Different docs can have different fields/different numbers of fields, but the position gap approach is probably better. -- Ian. On Fri, Mar 4, 2011 at 7:06 AM, Michael Wiegand wrote: Hi, I would like to create an index with Lucene to a document collections of text files. The ind

index enforcing query terms to appear within the same sentence

2011-03-03 Thread Michael Wiegand
Hi, I would like to create an index with Lucene to a document collections of text files. The index should be created in such a way, that for the search I can enforce that query term A and query term B are contained within the same sentence. How should implement the index? Should I have for e