Re: Simple Similarity Implementation to Count the Number of Hits

2016-05-12 Thread Ahmet Arslan
Hi Luis, Thats an interesting question. Can you share your similarity? I suspect you return 1 expect Similarity#coord method. Not sure but, for phrase query, one may require to modify ExactPhraseScorer/ExactPhraseScorer etc. ahmet On Thursday, May 12, 2016 5:41 AM, Luís Filipe Nassif wrote:

SpanNearQuery, Multiple Fields

2016-05-12 Thread Daniel Bigham
I'm very interested in SpanNearQuery, because it allows for quite powerful phrasal searching. However, unlike BooleanQuery, there doesn't seem to be any way to have it search multiple fields. I thought I might be able to wrap multiple SpanNearQueries, each of them searching a different field

SpanNearQuery With Inner Phrases

2016-05-12 Thread Daniel Bigham
When constructing boolean queries, the "parts" can themselves be phrases, and can be parsed as follows: QueryBuilder(analyzer).createPhraseQuery(fieldName, phrase) The above call is handy in that, even if the part is a single word, it will get tokenized and turned into the appropriate term.

Re: SpanNearQuery, Multiple Fields

2016-05-12 Thread Alan Woodward
Try adding your multiple SpanNearQuery objects to a BooleanQuery? Alan Woodward www.flax.co.uk On 12 May 2016, at 20:35, Daniel Bigham wrote: > I'm very interested in SpanNearQuery, because it allows for quite powerful > phrasal searching. > > However, unlike BooleanQuery, there doesn't seem

Re: SpanNearQuery, Multiple Fields

2016-05-12 Thread Daniel Bigham
For some reason I had it in my head that the sub-parts of a boolean query had to either be terms or phrases, but I now see that they can be a generic Query, so your suggestion might work nicely. I had since discovered DisjunctionMaxQuery, which might also work... Anyway, thanks very much for