RE: KeywordAnalyzer still getting tokenized on spaces

2014-09-09 Thread Milind
; > > String query = ca.toString(); > > ts.close(); > > Query currQuery = new TermQuery(new Term("sn",query)); > > System.out.println(currQuery.getClass() + ", " + currQuery); > > > > I am not aware of any method that uses QueryPar

RE: KeywordAnalyzer still getting tokenized on spaces

2014-09-09 Thread Uwe Schindler
eptember 09, 2014 9:37 AM > To: java-user@lucene.apache.org > Subject: Re: KeywordAnalyzer still getting tokenized on spaces > > The result of QueryParser is confusing. The problem is that you assume the > query parser uses the analyzer to parse your query. However, that is not the > case

Re: KeywordAnalyzer still getting tokenized on spaces

2014-09-09 Thread atawfik
ot; + currQuery); I am not aware of any method that uses QueryParser to achieve that. May someone here can correct me. Regards Ameer -- View this message in context: http://lucene.472066.n3.nabble.com/KeywordAnalyzer-still-getting-tokenized-on-spaces-tp4157537p4157560.html Sent from the Luc

KeywordAnalyzer still getting tokenized on spaces

2014-09-08 Thread Milind
I thought I could use the KeywordTokenizer to prevent tokenizing on spaces. so I can treat some fields as a single term. But it's still tokenizing on spaces. In the code below, I'm storing a document with a serial number containing spaces. I want to treat it as a single term without having end u