lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mile Rosu" <mile.r...@level7.ro>
Subject RE: Questions on Query Scorer
Date Thu, 15 Jun 2006 09:43:36 GMT
Hello,

The problem may be rather in the name of the field you are querying -
"prohibited" in your case. 
You can check with Luke(http://www.getopt.org/luke/) the structure of
the index on which you are performing your query.

Mile

-----Original Message-----
From: Ferdinand Chan [mailto:ferdinand.chan@dcivision.com] 
Sent: Thursday, June 15, 2006 12:26 PM
To: java-user@lucene.apache.org
Subject: Questions on Query Scorer

How can I create a QueryScorer in Lucene 2.0???

 

When I create a QueryScorer using the following codes,

 

BooleanQuery booleanQuery = new BooleanQuery();

booleanQuery.add(q1,BooleanClause.Occur.SHOULD);

booleanQuery.add(q2,BooleanClause.Occur.SHOULD);

 

QueryScorer scorer = new QueryScorer(booleanQuery);

 

It compiles successfully but throws a runtime exception when I execute
the
code.

 

java.lang.NoSuchFieldError: prohibited

        at
org.apache.lucene.search.highlight.QueryTermExtractor.getTermsFromBoolea
nQue
ry(QueryTermExtractor.java:91)

        at
org.apache.lucene.search.highlight.QueryTermExtractor.getTerms(QueryTerm
Extr
actor.java:66)

        at
org.apache.lucene.search.highlight.QueryTermExtractor.getTerms(QueryTerm
Extr
actor.java:59)

        at
org.apache.lucene.search.highlight.QueryTermExtractor.getTerms(QueryTerm
Extr
actor.java:45)

        at
org.apache.lucene.search.highlight.QueryScorer.<init>(QueryScorer.java:4
8)

 

Can anyone suggest a solution to this problem?

 

Thanks

 

Ferdinand

 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message