Intellij javac running out of memory compiling master??
by Galder Zamarreño
Guys,
What the heck is up with master? I import it into IntelliJ, run the compiler and I get an OOME compiling!
See attached screenshot. As you can see IntelliJ has enough memory.
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
14 years
About mapping of @IndexedEmbedded and @DocumentId
by Sanne Grinovero
Hello,
while debugging I just noticed that having a two entities scenario like
@Indexed class Book {
Long id;
@IndexedEmbedded Nation bublishedFirstIn;
}
Nation { //NOT indexed
Long id;
@Field name
}
the index for Book will contain these fields:
_hibernate_class ------------- NOT_ANALYZED_NO_NORMS, STORED
id ----------------------------------- NOT_ANALYZED_NO_NORMS, STORED
bublishedFirstIn.id ------------ NOT_ANALYZED, STORED
bublishedFirstIn.name ------ ok (don't care)
So, doubts:
1) I …
[View More]guess at minimum "bublishedFirstIn.id" should use
NOT_ANALYZED_NO_NORMS as well, saving some precious memory and index
space (see HSEARCH-473)
2) Why is "bublishedFirstIn.id" at all indexed? I can't think of a use
case, likely missing something.
3) (Extreme) why is "id" indexed ? Are we ever supposed to run a full
text query on the id fields? I think we should have an option about
this, and in future default to Store only.
Cheers,
Sanne
[View Less]
14 years
[HSearch] Facet drilldown
by Hardy Ferentschik
Hi,
sorry for the following lengthy code example, but it is hard to
demonstrate this much shorter.
The example shows how you can enable multiple facets and then continuously
restrict the query result
by chaining facets into a FacetFilter (which delegates to a ChainedFilter
underneath). WDYT?
If you want to see all the code or even get the feature branch -
https://github.com/hferentschik/hibernate-search/blob/HSEARCH-706
public void testMultipleFacetDrillDown() throws Exception {
…
[View More]final String ccsFacetName = "ccs";
final String ccsFacetFieldName = "cubicCapacity";
FacetRequest ccsFacetRequest = queryBuilder( Car.class ).facet()
.name( ccsFacetName )
.onField( ccsFacetFieldName )
.discrete()
.createFacet();
final String colorFacetName = "color";
final String colorFacetFieldName = "color";
FacetRequest colorFacetRequest = queryBuilder( Car.class ).facet()
.name( colorFacetName )
.onField( colorFacetFieldName )
.discrete()
.createFacet();
FullTextQuery query = createMatchAllQuery( Car.class );
query.enableFacet( colorFacetRequest );
query.enableFacet( ccsFacetRequest );
assertEquals( "Wrong number of query matches", 50, query.getResultSize()
);
List<Facet> colorFacetList = getFacetListForFacet( query, colorFacetName
);
assertFacetCounts( colorFacetList, new int[] { 12, 12, 12, 12, 2 } );
List<Facet> ccsFacetList = getFacetListForFacet( query, ccsFacetName );
assertFacetCounts( ccsFacetList, new int[] { 17, 16, 16, 1 } );
FacetFilter facetFilter = new FacetFilter();
query.setFilter( facetFilter );
facetFilter.addFacet( colorFacetList.get( 0 ) );
colorFacetList = getFacetListForFacet( query, colorFacetName );
assertFacetCounts( colorFacetList, new int[] { 12, 0, 0, 0, 0 } );
ccsFacetList = getFacetListForFacet( query, ccsFacetName );
assertFacetCounts( ccsFacetList, new int[] { 4, 4, 4, 0 } );
facetFilter.addFacet( ccsFacetList.get( 0 ) );
// needs to set the filter explicitly atm, because I need the query
state to reset
query.setFilter( facetFilter );
colorFacetList = getFacetListForFacet( query, colorFacetName );
assertFacetCounts( colorFacetList, new int[] { 4, 0, 0, 0, 0 } );
ccsFacetList = getFacetListForFacet( query, ccsFacetName );
assertFacetCounts( ccsFacetList, new int[] { 4, 0, 0, 0 } );
}
I like the idea of using Lucene Filters to implement the drilldown for. It
seems the most natural and the original query stays
untouched.
--Hardy
[View Less]
14 years
Re: [hibernate-dev] Review HSEARCH-323
by Sanne Grinovero
Hi Oliver,
create a local branch to keep it, branching out of master:
git checkout -b Sanne-HSEARCH-323 master
now pull in my branch:
git pull https://Sanne@github.com/Sanne/hibernate-search.git HSEARCH-323
Now you have it all, you can use "git log" to verify you have the commits,
or "git format-patch master" is also useful, it will create a patch
for each commit which brought to current state starting from master.
(or just open it in your IDE)
that's it!
mvn clean test install ...
You'…
[View More]re welcome to join us on IRC for more interactive help or
discussing if you want.
http://hibernate.org/community/irc
Cheers,
Sanne
2011/3/14 Oliver Siegmar <oliver(a)siegmar.net>:
> Hi Sanne,
>
> I'd like to review your pull request as you have asked for. Unfortunately I
> haven't worked much with git, yet. Can you give me a quick hint, how to
> receive your changes?
>
> I have done a
>
> git clone git://github.com/hibernate/hibernate-search.git
>
> here. What have I to do to receive your changes?
>
>
>
> Bye
>
> Oliver
>
[View Less]
14 years
Hibernate OGM as a separate repo
by Emmanuel Bernard
Hi guys,
I have finished the migration of Hibernate OGM to its new separated Git repository. I've kept the history (that was fun).
The new home is now here https://github.com/emmanuelbernard/hibernate-ogm
This is a multi module project with a single module so far: hibernate-ogm-core. But we can anticipate more modules when we will support several NoSQL engines.
This move has several nice side effects:
- following the project is easier (no more history rewriting on rebase)
- building the …
[View More]project is also much easier
- the release cycle will not be dependent of Hibernate Core.
Hopefully that will lower the curve to get started.
I've updated the doc.
http://community.jboss.org/wiki/OverviewofHibernateOGM
Why version 3.0.0-SNAPSHOT?
3 for the Hibernate platform OGM is built for
0.0 because we start :)
Since I usually suck at Maven, can you double check :
- that the poms look sane
- simplify them if possible (not too much we will need to be able to build doc)
Emmanuel
[View Less]
14 years
Question about cglib jar and AS7 integration...
by Scott Marlow
Hi,
I'm looking at integrating Hibernate JPA persistence provider with AS7.
On the AS7 IRC channel recently, I was asked to ask about cglib and
Hibernate.
I know historically, cglib was popular but not too many people are
volunteering to maintain the cglib OSS project. Okay, that has nothing
to do with my question. So, let me get to that.
Should we include the CGLIB jar when we package Hibernate with AS7?
Thanks,
Scott
14 years
Re: [hibernate-dev] groupId vs artifactId
by Emmanuel Bernard
Everybody thinks it's a good idea so I went for it.
welcome org.hibernate,ogm
@Sanne, you mean modules for OGM? At least one per NoSQL.
On 11 mars 2011, at 20:52, Sanne Grinovero wrote:
> +1 on the approach,
>
> do you already have plans of many modules?
>
> 2011/3/11 Emmanuel Bernard <emmanuel(a)hibernate.org>:
>> Today we have the following approach for most of our projects
>>
>> groupId: org.hibernate
>> artifactId hibernate-search-parent, …
[View More]hibernate-search etc
>>
>> Since I'm working on the ogm packaging, I wonder if we should do something like
>>
>> groupId: org.hibernate.ogm
>> artifactId hibernate-ogm-parent, hibernate-ogm-core etc
>>
>> or even
>>
>> groupId: org.hibernate.ogm
>> artifactId ogm-parent, ogm-core etc
>>
>> thoughts? I don't mind the existing approach except that the org/hibernate directory is getting crowded, we are too prolific :)
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
[View Less]
14 years
groupId vs artifactId
by Emmanuel Bernard
Today we have the following approach for most of our projects
groupId: org.hibernate
artifactId hibernate-search-parent, hibernate-search etc
Since I'm working on the ogm packaging, I wonder if we should do something like
groupId: org.hibernate.ogm
artifactId hibernate-ogm-parent, hibernate-ogm-core etc
or even
groupId: org.hibernate.ogm
artifactId ogm-parent, ogm-core etc
thoughts? I don't mind the existing approach except that the org/hibernate directory is getting crowded, we are too prolific :)
14 years
Minimizing merge hell
by Emmanuel Bernard
We (as in not me for once) are having a bad experience with massive amounts of merge conflicts. Git is great but there is only so much magic can get you at.
We were discussing how to limit these kind of bad experiences in IRC and I've added a few more advices I could think of.
Try to separate your stylistic / cosmetic fixes from your actual feature commits. They are not related to the feature, they make code review harder, they make some merges conflicts instead of autoresolving.
Even better,…
[View More] try to place them before your feature commits in your commit history. You can do that by doing an interactive rebase and shuffle lines around:
- work on some feature, commit (or stash)
- fix style and commit
- interactive rebase (git rebase -i HEAD~4 assuming 4 is how much commits you want to go back to)
- shuffle the line so that your style commit happens before the other ones
You can even decide to apply your stylistic changes to master even if your feature is still in the work: that will minimize conflicts if people work on related areas in parallel as these cahnges will come quicker.
The general idea is to minimize the amount of possible conflicts in a given commit. Squashing is a great tool but if your commit is 300 files big and has a lot of potential conflicts, you will make enemies both during the code review and during the merge process if it happens to conflict.
For example, I rarely rename a file AND apply changes to it int he same commit, I tend to split those operations.
I'm not sure how merge react to conflicts but with rebase, since every commit is replayed one by one and stops upon conflict, it's more manageable to fix them if they are small and to the point.
Use and abuse interactive adding ie the ability to commit some of your changes. With interactive adding, you can put in the staging area a few line change out of a file changed in multiple areas and commit only that bit. This works great for the stylistic changes we talked about before. The doc for interactive adding is here http://book.git-scm.com/4_interactive_adding.html
Unfortunately the tool is command line based. GitX has a great UI to do that, so if you are lucky to be on a Mac, go and use it. I don't know if other Linux or Windows tool have that feature.
Disable auto import / style fixing features in your IDE.
At least make sure not to pollute commits with these kind of changes just because you've added a line somewhere in the file. Split these in dedicated commits.
I personally run import and style fixes manually from time to time when it makes sense.
Hope that helps
Emmanuel
[View Less]
14 years