My indexing class contains:
try{
stream = analyzer.tokenStream("indexhd", new StringReader(indexhd));
buf = new StringBuffer();
while((token = stream.next()) != null)
{
buf.append(' ');
buf.append(token.termText());
}
}
catch(IOException e)
{
e.printStackTrace();
}
Field f5 = new Field("unToken", buf.toString().trim(), true, true, true);
f5.setBoost(4000);
doc.add(f5);
and my query class contains:
TermQuery pq = new TermQuery(new Term("unToken",indexWord));
pq.setBoost(1000);
bqr.add(pq,false,false);
bqr.add(QueryParser.parse(qs,"content", new
StandardAnalyzer(stop)),false,false);
bqr.add(QueryParser.parse(qs,"p1", new StandardAnalyzer(stop)),false,false);
bqr.add(QueryParser.parse(qs,"bodyText", new
StandardAnalyzer(stop)),false,false);
Query query = QueryParser.parse(contentTypes,"contenttype",new
StandardAnalyzer());
Hits hits = is.search(query, new QueryFilter(bqr));
Regards,
Niraj
----- Original Message -----
From: "Brisbart Franck" <[EMAIL PROTECTED]>
To: "Lucene Users List" <[EMAIL PROTECTED]>
Sent: Thursday, June 24, 2004 8:34 PM
Subject: Re: score and frequency
> It should work with this new field. I don't have other great ideas.
> Where are the problems with your small dataset ?
>
> Franck
>