Hello,
I'm trying to get the norm of an indexed document for a given field but
beside reader.norms(fieldName) I'm not finding any API to retrieve it. Now
reader.norms(..) returns an array with the norms for that field of all
indexed documents. How do I know the index of my document in there?

TermQuery.explain(){
...
byte[] fieldNorms = reader.norms(field);
      float fieldNorm =
        fieldNorms!=null ? similarity.decodeNormValue(fieldNorms[doc]) :
1.0f;
      fieldNormExpl.setValue(fieldNorm);
...
In here doc is

 DocSlice docs = (DocSlice) values.get("response");
for (DocIterator it = docs.iterator(); it.hasNext();) {
            final int docId = it.nextDoc();

but what about when I don't have a SolrQueryResponse ?

-- 
Regards,
K. Gabriele

--- unchanged since 20/9/10 ---
P.S. If the subject contains "[LON]" or the addressee acknowledges the
receipt within 48 hours then I don't resend the email.
subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
< Now + 48h) ⇒ ¬resend(I, this).

If an email is sent by a sender that is not a trusted contact or the email
does not contain a valid code then the email is not received. A valid code
starts with a hyphen and ends with "X".
∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
L(-[a-z]+[0-9]X)).

Reply via email to