掲示板
custom search portlet
11年前 に Angel Luis Scull によって更新されました。
custom search portlet
Junior Member 投稿: 66 参加年月日: 07/06/11 最新の投稿
hello all i'm tring to add search capability to a portlet. It create the index fine but when i go to search the index searcher not return nothing.
Indexer indexer = IndexerRegistryUtil
.getIndexer(ShoppingItem.class);
SearchContext scont = SearchContextFactory.getInstance(request);
scont.setStart(0);
scont.setEnd(100);
scont.setKeywords("perro");
Hits h = indexer.search(scont);
List<document> dl = h.toList();
for (Document ss : dl) {
out.println(ss.getUID() + " " + ss.get("description"));
}
</document>