Lucene-suggest
by Marc Schipperheyn
Lucene 4.x offers some interesting new functionality with regards to
autosuggest and google style suggestions.
As part of this functionality, as I understand it, the suggester builds a
separate index based on the available data with a specific .build()
function.
I'm assuming that this separate index would not be automatically updated
when an index record is created through HSEARCH and I'm wondering what
would be the best way to go about this.
Any suggestions? It would seem that the build step should be executed
through a FullTextEventListener (not sure how to sue that these days). But
obviously during a MassIndexer operation, you would only want to execute
after the entire process completes.
Marc
9 years, 10 months
in.relation.to works again
by Davide D'Alto
Hi,
you should be able to blog again on in.relation.to now
Thanks for everyone help.
Cheers,
Davide
9 years, 10 months
Re: [hibernate-dev] in.relation.to error when posting a new blog entry
by Davide D'Alto
I've finally found out the culprit of the constraint violation.
You should be able to post new blog entries now.
Thanks everyone for the help.
Cheers
On Fri, Feb 20, 2015 at 5:12 PM, Davide D'Alto <davide(a)hibernate.org> wrote:
> I've tried to restart the server and it doesn't help.
>
> I'm thinking that I should disable foreign keys while running the query
> and see what happens.
>
> Any better idea?
>
> On Fri, Feb 20, 2015 at 3:35 PM, Davide D'Alto <davide(a)hibernate.org>
> wrote:
>
>> It's not going well,
>> I'm not sure how to solve this issue,
>>
>> It seems it's trying to delete something (from the log):
>>
>> Caused by: org.hibernate.exception.ConstraintViolationException: could
>> not delete: [org.jboss.seam.wiki.core.model.WikiCommentFeedEntry#40142]
>>
>> And that it is causing:
>>
>> Caused by:
>> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
>> Cannot delete or update a parent row: a foreign key constraint fails
>> (`inrelationto`.`FEED_FEEDENTRY`,CONSTRAINT
>> `FK_FEED_FEEDENTRY_FEEDENTRY_ID` FOREIGN KEY (`FEEDENTRY_ID`) REFERENCES
>> `FEEDENTRY` (`FEEDENTRY_ID`))
>>
>>
>> I've attached the complete stacktrace.
>>
>> Should I restart everything?
>> I'm open to suggestion.
>>
>>
>>
>>
>> On Fri, Feb 20, 2015 at 1:20 PM, Hardy Ferentschik <hardy(a)hibernate.org>
>> wrote:
>>
>>> On Fri, Feb 20, 2015 at 11:56:13AM +0000, Davide D'Alto wrote:
>>> > I'm currently trying to fix it
>>>
>>> Cool. I was about to ask what the status is on this. Let me know how it
>>> goes.
>>> I am preparing a HV release blog. Would be nice to be able to publish it
>>> as well.
>>>
>>> --Hardy
>>>
>>
>>
>
9 years, 10 months
Fwd: Hibernate Assist Open Source Query Analysis Tool
by Emmanuel Bernard
Hi Vicky,
I’m not sure what you are asking is super easy (nor that we are ready to commit an API to it) but I’ll let Steve comment.
Emmanuel
PS your attachement has been removed, any chance you can host it somewhere on a webserver?
> Begin forwarded message:
>
> From: Vicky Thakor <vicky.thakor(a)javaquery.com>
> Date: 22 Feb 2015 19:23:24 CET
> Subject: Hibernate Assist Open Source Query Analysis Tool
> To: […]
>
> There was an attachment in this email that has been removed due to security restrictions. Email with attachments containing Microsoft Windows executable files inside archives are not permitted.
> Dear Hibernate Team,
> I'm Vicky Thakor from Gujarat, India. I'm working on Query Analysis tool called HibernateAssist. HibernateAssist helps developer to understand how query executed at database level and what could be done to improve the query performance.
>
> What have been done so far?
> Thats good question. Using Hibernate built-in methods I extracted Query from Criteria and used that query to get execution plan from Microsoft SQL Server.
>
> Now I parse that XML and generate HTML report with same graphical representation that Microsoft SQL Server generates. All node contains basic information like Index Scanned, Index Seek, Predicate, Estimated I/O, CPU Cost, etc...
>
> I've attached sample HTML report with this email please take a look at that.
>
> What I require from you?
> As I said Hibernate built-in methods allows to extract Query from Criteria only. I want query generated by saveOrUpdate(Object) and delete(Object) so I can use that query to get Execution Plan from Microsoft SQL Server. If you guys can make this possible for developer like me than it'd be great help.
>
> Hibernate Assist
> Hibernate Assist, is an open source query analysis tool so I'm not making money out of it. I just wanna help developers to understand the query execution at database level.
>
> Useful links
> I'm also a part time blogger and write articles on Programming Languages here you can find about me...
>
> Blog: www.javaquery.com <http://www.javaquery.com/>
> HIbernateAssist: http://www.javaquery.com/p/hibernateassist.html <http://www.javaquery.com/p/hibernateassist.html>
> HibernateAssist GitHub: http://github.com/javaquery/HibernateAssist <http://github.com/javaquery/HibernateAssist>
>
>
> --
> Regards,
> Vicky
9 years, 10 months
in.relation.to error when posting a new blog entry
by Davide D'Alto
Hi,
I'm trying to create a new blog entry on in.relation.to
but an exception occurs about the violation of an integrity constraint.
Any idea on how to solve the issue?
Thanks,
Davide
9 years, 10 months
Bad performance with collection fetching and @BatchSize (HHH-9592)
by Emond Papegaaij
Hi all,
For the past few weeks, we've been struggling with bad performance caused by
HHH-9592. In short, even with @BatchSize(size=100) on all entities, the vast
majority of queries (up to 70%) is in the form of 'SELECT a, b, c FROM foo
WHERE id=123'. As far as I can see, almost all of these queries are caused by
PersistentBag.initializeFromCache.
This method assumes an entity can be loaded from cache if the collection that
contains it, was loaded from cache. However, as entities and collections do
not live in the cache together, this often is not the case. The current
implementation triggers a separate query for every record that cannot be
loaded from the cache, ignoring the @BatchSize on that entity.
As this issue is effecting of our application severely, I'm investigating
possible solutions. Pre-fetching entities that are likely to be fetched later
on in the request, in a separate query helps a bit, but requires a lot of
work. So, I'm looking for a more fundamental solution. In the ideal world,
Hibernate would fetch a full batch (100 in our case) at once, not only from
the collection being loaded, but also from other collections with unloaded
entities. Is this possible? If not, what can we do to improve the situation?
Best regards,
Emond Papegaaij
9 years, 10 months
Enum object bound to SQLQuery
by Gail Badner
Should enum objects be converted to the appropriate type when bound to a native query?
It looks like they are converted properly when bound using a Criteria or HQL Query, but not for a SQLQuery.
Attached is a patch for EnumTypeTest that shows that it works for Criteria and HQL queries, and fails for SQLQuery.
Is this a bug?
Thanks,
Gail
9 years, 10 months
CachingWrapperFilter
by Marc Schipperheyn
Just wondering with Lucene 4 whether the Hibernate CachingWrapperFilter
should leverage that instead of using its own caching implementation. Given
the discussion in LUCENE-1536.
I'm not superfamiliar with this part of the code, but it looks like the
LUCENE-1536 allows optimization at a deeper level.
9 years, 10 months
Question about substituting IDs in Hibernate OGM
by Haswell, Josiah D
Hi folks,
I'm creating a Hibernate OGM implementation for Datomic, and I have a question about IDs.
Say I have the entity
@Entity
public class Person {
@Id
@GeneratedValue
Long id;
}
In Datomic, you have to assign a temporary ID before submitting the transaction. Datomic will then return the actual persistence ID after the transaction has completed. My question is, how can I get the actual ID back into the entity?
Thanks!
Josiah
9 years, 10 months