PostingsHighlighter in Lucene SearchFiles always returns nulls

2014-07-09 Thread Natalia Connolly
Hello, Can anyone help me with an example of using PostingsHighlighter in Lucene 4.7. I am trying to modify SearchFiles.java (which can be found in the demo directory) so that it would display not only which documents contains the terms I was searching for, but also the entire sentences where

Re: Strange behavior of ShingleFilter in Lucene 4.6

2014-04-02 Thread Natalia Connolly
M, Robert Muir wrote: > Did you really mean to shingle twice (shingleanalyzerwrapper just > wraps the analyzer with a shinglefilter, then the code wraps that with > another shinglefilter again) ? > > On Wed, Apr 2, 2014 at 1:42 PM, Natalia Connolly > wrote: > > Hello, &g

Strange behavior of ShingleFilter in Lucene 4.6

2014-04-02 Thread Natalia Connolly
uot;resting comfortably and in no distress". I get the following output: resting resting comfortably resting comfortably comfortably comfortably comfortably _ comfortably _ _ distress _ distress distress So it looks like not only do I not get bigrams, I get spurious 3-grams by repeating words. Could someone please help? Thanks much, Natalia Connolly

Re: How to search for terms containing negation

2014-03-18 Thread Natalia Connolly
StandardAnalyzer(org.apache.lucene.util.Version, > org.apache.lucene.analysis.util.CharArraySet) > > QueryParser is probably ok. I rarely use this parser but I don't think it > recognizes "not" in its grammar. > > Hope this helps, > Tri > > > On Mar 17, 2014, at 12:46 PM, Nat

Re: How to search for terms containing negation

2014-03-17 Thread Natalia Connolly
you know for sure they have been filtered out. > > The next thing is to check is your query parser. What query parser are you > using? Some parser actually understands the "not" term and rewrite to a > negation query. > > Hope this helps, > Tri > > > On Mar 17

How to search for terms containing negation

2014-03-17 Thread Natalia Connolly
Hi All, Is there any way I could construct a query that would not automatically exclude negation terms (such as "no", "not", etc)? For example, I need to find strings like "not happy", "no idea", "never available". I tried using a simple analyzer with combinations such as "not AND happy", an