lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niraj Alok" <ni...@emacmillan.com>
Subject Re: score and frequency
Date Thu, 24 Jun 2004 15:07:18 GMT
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" <Franck.Brisbart@kelkoo.net>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
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
>


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