Re: PostingsHighlighter to highlight the first Match ion the document

2013-07-22 Thread Michael McCandless
On Mon, Jul 22, 2013 at 9:57 AM, VIGNESH S wrote: > Hi Mike, > > I am indexing at the document level that is full book to a field.For > Example iam indexing the full book which contains some term say Android at > the first page,last page. > > when i do a search,I will get the document. > > In that

Re: Trying to search java.lang.NullPointerException in log file.

2013-07-22 Thread Jack Krupansky
"This is because the StandardAnalyzer must be splitting the words on "SPACES" and since there is no space present here. The entire string is converted into 1 token." Those statements are inconsistent! I mean, what code is converting the entire string to 1 token and eliminating white space? Is

Re: Trying to search java.lang.NullPointerException in log file.

2013-07-22 Thread Jack Krupansky
Standard anlyzer/tokenizer will use white space and other punctuation to delimit tokens. The rules are a little complicated (although I tried to summarize them for Solr in my book) - the same rules apply for Lucene. Verify that you are properly constructing a PhraseQuery from your analyzed tex

Re: Trying to search java.lang.NullPointerException in log file.

2013-07-22 Thread Ankit Murarka
First thing first : Same analyzer is being used to index and to search. Now, I am not using any custom analyzer to split the string and get the tokens. I was assuming StandardAnalyzer might be using whitespaces to split the content. If that is not the case then I must have got it completely wr

Re: PostingsHighlighter to highlight the first Match ion the document

2013-07-22 Thread VIGNESH S
Hi Mike, I am indexing at the document level that is full book to a field.For Example iam indexing the full book which contains some term say Android at the first page,last page. when i do a search,I will get the document. In that document ,i need to highlight only the first sentence which matc

Re: Trying to search java.lang.NullPointerException in log file.

2013-07-22 Thread Ankit Murarka
I can easily split on periods. The standard analyzer is splitting on spaces and I can implement a custom analyzer that will split on periods. However this string will be present say suppose 3-4 times in a huge file. Now if I proceed to search other terms in this file then I may not get the pro

Re: Trying to search java.lang.NullPointerException in log file.

2013-07-22 Thread Erick Erickson
Even though you're on the Lucene list, consider installing Solr just to see the admin/analysis page to see how your index and query analysis works. There's no reason you couldn't split this up on periods into separate words and then just use phrase query to find java.lang.NullPointerException, but

Trying to search java.lang.NullPointerException in log file.

2013-07-22 Thread Ankit Murarka
Hello. I am trying to search java.lang.NullPointerException in a log file. The log file is huge. However I am unable to search it. This is because the StandardAnalyzer must be splitting the words on "SPACES" and since there is no space present here. The entire string is converted into 1 token.