I am currently working on retrieving url and contentLength of each
found during the search. I want to retrieve it during the calculation of
score so that I can influence the score in some other way.
I am trying to retrieve the url and use it as filter. The main problem is
don't want to use a reader to continuously retrieve the url for each
TermDocs termDocs = reader.termDocs();
TermEnum termEnum = reader.terms (new Term (field, ""));
Term term = termEnum.term();
I am using this code to retrieve the field containing the url but it is
tokenized. Is there anyway to untokenized it or is there a better way to
Also, I try to retrieve the contentLength, but the results return are
Why is that? I opened the index using Luke and the contentLength is there
but when I try to get it using this way, the results is null.
Can anyone help me with both of these problems? Any help will be