lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Azeldur <leblanc.phili...@gmail.com>
Subject QueryPArser - search - character "A"
Date Mon, 07 Feb 2011 14:50:05 GMT

Hi all,

I met  a little problem while  developping a  little app with  lucene  3.0.
I wanted  to do a  search with  the  character "A", both it  seem that the
criteria  is simply ignored. Here a  little  example of code:

IndexSearcher indexSearcher = new IndexSearcher(FSDirectory.open(new
File("SOME PATH TO LUCENE INDEXED FILE")));
StandardAnalyzer analyzer = new StandardAnalyzer(Version.LUCENE_30);
String luceneQuery = "+titre:\"My book title\" +actif:A";
Query q = new QueryParser(Version.LUCENE_30, "*",
analyzer).parse(luceneQuery);
TopScoreDocCollector collector = TopScoreDocCollector.create(1, true);
indexSearcher.search(q, collector);

Thank in  advance
-- 
View this message in context: http://lucene.472066.n3.nabble.com/QueryPArser-search-character-A-tp2443609p2443609.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Mime
View raw message