Hi,
I'm currently implementing the lucene facets in the version 4.8.1 and
two questions remain for me:
1. Is the an easy way to have translations for the facets? If we use
e.g. the books example, the user should see the translation. But if he
clicks on a link the english value should be used for the search. Thus I
have to return the facet translation and the actual value by the search.
2. Is there a possibility to get the docs per facet?
As An example I have e.g. a DrillDownQuery returning 5 docs and 2
dimensions with 2 facets each. I guess the solution is somewhere in the
MatchingDocs. If I try:
List<MatchingDocs> matchingDocs =
facetsCollector.getMatchingDocs();
for(MatchingDocs doc : matchingDocs){
DocIdSet docSet = doc.bits;
DocIdSetIterator iterator = docSet.iterator();
int docId = iterator.nextDoc();
while (docId != DocIdSetIterator.NO_MORE_DOCS){
Document document =
doc.context.reader().document(docId);
System.out.println(document.toString());
docId = iterator.nextDoc();
}
}
result:
A List with as much MachtingDocs as dimensions, but only one MatchDocs
gives me my docs at all. How I could get the docs per facet I can't see
at all, nor how could get the facets of a doc.
What do I miss?
Thx,
Jürgen Albert.
--
Jürgen Albert
Geschäftsführer
Data In Motion UG (haftungsbeschränkt)
Kahlaische Str. 4
07745 Jena
Mobil: 0157-72521634
E-Mail: j.alb...@datainmotion.de
Web: www.datainmotion.de
XING: https://www.xing.com/profile/Juergen_Albert5
Rechtliches
Jena HBR 507027
USt-IdNr: DE274553639
St.Nr.: 162/107/04586
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org