lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wuqi" <chee...@gmail.com>
Subject How about adding a new paramer to Similarity.scorePayload( ) ?
Date Tue, 24 Jun 2008 16:16:30 GMT
Hi,
I want to customize a new Similarity class which need to adopt payload information.The current
definition of scorePayload is below:
    "public float scorePayload(String fieldName, byte [] payload, int offset, int length)"
I have a problem when using this function.In case we have two BoostingTermQuery:  
   BoostingTermQuery #1:   fieldName="Country" and  fieldValue= "America"
   BoostingTermQuery #2:   fieldName="Country" and  fieldValue="China"
and the the information of one payloads looks like this:
  payload: {new York,san Jose,Chicago}
of course,query #1 should get a higher payPayload score.But current interface prevent us from
sending fieldValue information to scorePayload function. So maybe we should add a new interface
like
   public float scorePayload(String fielName,String value,byte[] payload,int offset,int length)
and Boosting Query also need to be changed accordingly.

Thanks
-Qi



Mime
View raw message