add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / contrib / facet / src / java / org / apache / lucene / facet / enhancements / package.html
1 <html>
2 <head>
3 <title>Enhanced category features</title>
4 </head>
5 <body>
6 <h1>Enhanced category features</h1>
7
8 Mechanisms for addition of enhanced category features.
9 <p>A {@link org.apache.lucene.facet.enhancements.CategoryEnhancement CategoryEnhancement}
10 (which can correspond to a 
11 {@link org.apache.lucene.facet.index.attributes.CategoryProperty CategoryProperty}) 
12 can contribute to the index in two possible ways:
13 <ol>
14         <li>To each category with data relevant to the enhancement, 
15         add     this data to the category's token payload, through 
16         {@link org.apache.lucene.facet.enhancements.CategoryEnhancement#getCategoryTokenBytes(CategoryAttribute) CategoryEnhancement.getCategoryTokenBytes()}.
17         This data will be read during search using 
18         {@link org.apache.lucene.facet.enhancements.CategoryEnhancement#extractCategoryTokenData(byte[],        int, int) CategoryEnhancement.extractCategoryTokenData()}.
19         </li>
20         <li>To each document which contains categories with data relevant       to the enhancement, add a 
21         {@link org.apache.lucene.facet.index.streaming.CategoryListTokenizer CategoryListTokenizer} through 
22         {@link org.apache.lucene.facet.enhancements.CategoryEnhancement#getCategoryListTokenizer CategoryEnhancement.getCategoryListTokenizer()} . 
23         The 
24         {@link org.apache.lucene.facet.index.streaming.CategoryListTokenizer CategoryListTokenizer} 
25         should add a single token which includes all the enhancement relevant data from the categories. 
26         The category list       token's text is defined by 
27         {@link org.apache.lucene.facet.enhancements.CategoryEnhancement#getCategoryListTermText() CategoryEnhancement.getCategoryListTermText()}.
28         </li>
29 </ol>
30
31 </body>
32 </html>