Re: Indexing Query

2015-02-18 Thread Ian Lea
You mean you'd like a BooleanQuery.setMaximumNumberShouldMatch() method? Unfortunately that doesn't exist and I can't think of a simple way of doing it. -- Ian. On Wed, Feb 18, 2015 at 5:26 AM, Deepak Gopalakrishnan dgk...@gmail.com wrote: Thanks Ian. Also, if I have a unigram in the query,

Re: Indexing Query

2015-02-18 Thread Deepak Gopalakrishnan
Oops, alright, I'll probably look around for a workaround. On Wed, Feb 18, 2015 at 3:24 PM, Ian Lea ian@gmail.com wrote: You mean you'd like a BooleanQuery.setMaximumNumberShouldMatch() method? Unfortunately that doesn't exist and I can't think of a simple way of doing it. -- Ian.

Re: Indexing Query

2015-02-18 Thread Jack Krupansky
You could store the length of the field (in terms) in a second field and then add a MUST term to the BooleanQuery which is a RangeQuery with an upper bound that is the maximum length that can match. -- Jack Krupansky On Wed, Feb 18, 2015 at 4:54 AM, Ian Lea ian@gmail.com wrote: You mean

Re: High frequency terms in results document....

2015-02-18 Thread Tomoko Uchida
Hi, I'm afraid there are no easy or straight way for your requirement. I would try create an temporary tiny index from search results on the fly in memory, and get top N terms from it by HighFreqTerms. http://lucene.apache.org/core/4_10_3/misc/org/apache/lucene/misc/HighFreqTerms.html (The logic

Lucene fuzzy and wildcard search, and scoring in AutomatonQuery

2015-02-18 Thread Yossi Vainshtein
Hi all, I'm using Apache Lucene and currently trying to combine Fuzzy and Prefix (or Wildcard) query to implement a kind of suggestion mechanism. For example, if the query is levy, a document containing Levinshtein should also be returned. As there seems no builtin query of this sort in Lucene,