lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chitra <chithu.r...@gmail.com>
Subject MultiFieldQueryParser over Analyzer
Date Mon, 22 Jan 2018 12:25:48 GMT
Hi Team,
                         I have a doubt on parsing a query using
MultiFieldQueryParser over StandardAnalyzer.

searchWord: abc.def_ghi@global-international.com

while performing a search using the code,

Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_40, new
> StringReader(""));
> MultiFieldQueryParser parser = new MultiFieldQueryParser(new
> String[]{"email"}, analyzer);
> Query query = parser.parse(searchWord);



 it will parse and produce the final query string as
 email:"abc.def_ghi global international.com"



My doubt is, how '@' & '-' were stripped out? Does Standard Analyzer treat
this or QueryParser? anywhere can we employ QueryParser.jj?

Could anyone help me to understand this? or any useful articles???

I  was missed to find related articles reg this.

And I'm clear on indexing part. Standard analyzer (using jflex) plays a
vital role to escape characters to get an expected token while indexing.


Any help is much appreciated...!!!


-- 
Regards,
Chitra

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message