[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-74) Ability to extract meta-information about search result

Christian Bauer (JIRA) noreply at atlassian.com
Wed Jun 6 09:45:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-74?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27156 ] 

Christian Bauer commented on HSEARCH-74:
----------------------------------------

Or simply return FullTextQuery.LUCENE_HIT


> Ability to extract meta-information about search result
> -------------------------------------------------------
>
>                 Key: HSEARCH-74
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-74
>             Project: Hibernate Search
>          Issue Type: New Feature
>          Components: engine
>    Affects Versions: 3.0.0.beta2
>            Reporter: Christian Bauer
>
> I need the score of a hit. The only time when this information is available seems to be in FullTextQueryImpl.java in line 219:
> 			for ( int index = first; index <= max; index++ ) {
> 				Document document = hits.doc( index );
> 				infos.add( extractor.extract( document ) );
> 			}
> Not sure what the API would look like and what other information from each Hit object would be considered metadata, except the score and maybe boost. Maybe this can be covered with magic projection properties, something like:
> org.hibernate.search.FullTextQuery query = s.createFullTextQuery( luceneQuery, Book.class );
> query.setIndexProjection( "hsearchScore", "this" );
> List results = query.list();
> Object[] firstResult = (Object[]) results.get(0);
> Double score = firstResult[0];
> Book book = firstResult[1];

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list