[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-172) Add ability to do a Hibernate Sort rather then Lucene Sort

Josh Atir (JIRA) noreply at atlassian.com
Fri Mar 21 14:44:33 EDT 2008


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

Josh Atir commented on HSEARCH-172:
-----------------------------------

Sure.  I'm not saying this should be an either/or.  I think there are going to be situations where it's more practical and efficient to do this in Lucene, and others where it's the reverse.  Obviously a million element search result wouldn't be practical to do in db.  I think it's should be a judgment call by the developer as to which path to take.

Consider the opposite problem.  You have a fairly complex query, sort, filter problem that requires many fields and calculations.  You need to do a full text search (or filter) on only one of those fields.  The query is not expected to return many elements.  In the current situation you would need to replicate all the fields that participate in that query into a Lucene index.  This fairly quickly turns your Lucene indexes into an almost full replica of your database.

> Add ability to do a Hibernate Sort rather then Lucene Sort
> ----------------------------------------------------------
>
>                 Key: HSEARCH-172
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-172
>             Project: Hibernate Search
>          Issue Type: Improvement
>          Components: engine
>            Reporter: Josh Atir
>            Priority: Minor
>
> I have a case in which a Lucene sort would be much more expensive then a sql sort.  I can specify a sort order using Criteria, which causes the entity loading query to be sorted correctly.  The engine then ignores the order that was returned, and instead returns the results based on the order it was received from Lucene.
> I'd like the ability to specify a Hibernate sort rather then a Lucene sort.

-- 
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