Re: Issue with StandardAnalyzer which splits single word with _(Lucene Version: 3.0)

2011-08-22 Thread govind bhardwaj
Hi Eric, Thanks for your reply. I verified Srinivas' query by changing Lucene version ( in the constructor of StandardAnalyzer ) to LUCENE_30 to find that parsed query indeed changes to xyz abc (input query was 'xyz_abc') while that does not happen in case of LUCENE_33 and the parsed query remain

Re: Issue with StandardAnalyzer which splits single word with _(Lucene Version: 3.0)

2011-08-22 Thread govind bhardwaj
Hi Srinivas, It works for the latest Lucene Version 3.3.0 (in fact for versions after 3.0.0). Standard Analyzer just splits the text ignoring a set of STOP_WORDS like "is", "in", etc. In the class definition of StandardAnalyzer in Lucene 3.3.0 API, it is clearly stated :- "As of 3.1, StandardToke

Re: Tokenize a dictionary of phrases

2011-08-21 Thread govind bhardwaj
Hi Xlyang, You should use KeywordAnalyzer() as it treats the entire string (multi-word phrase in your case) as it is without splitting the constituent words. Thanks, Govind On Mon, Aug 22, 2011 at 1:23 AM, Xiyang Chen wrote: > Hi, > > I have a dictionary of multi-word phrases and I'd like to a

Re: highlighting

2011-08-03 Thread govind bhardwaj
Hi Sabeer, I used Lucene 3.3.0 for testing your code. (I doubt that Lucene 4.0 has been released as version 3.3.0 was released recently in July). In the second case, due to exact-matching there is no output i.e. there is no "transport" (no exact match) , but "transportation" in sourceText. One c

Re: Escaping Special Characters

2011-07-05 Thread govind bhardwaj
going wrong. Govind On Mon, Jul 4, 2011 at 10:16 AM, Adriano Crestani wrote: > Hi Govind, > > escape() method should only be used to escape term, not the query itself. > If > the user is entering the query, it's his responsibility to escape the > query. > > On M

Escaping Special Characters

2011-07-04 Thread govind bhardwaj
Hi, I am using Lucene version 3.1 Previously I had trouble regarding special characters as when I entered "---" as my input, it gave the following error *Caused by: org.apache.lucene.queryParser.ParseException: Encountered " "-" "- "" at line 1, column 1. Was expecting one of: "(" ... "*