Building OGM on Windows
by Sanne Grinovero
Hi,
I'm building your latest OGM branch version just fine on Windows Vista
64bit, using Oracle JDK 1.6.0_23 64bit, Maven 3.0.3 from whatever
people dare to call "the command line".
The full package build fails in the end while building documentation
and assembly as I didn't setup po2xml, but that happens after all code
packages are built and all tests seem ok.
I just noticed this weird messages in the log, but don't seem to
affect tests or build success:
generate-metamodel:
[echo] Processing JPA annotations for metamodel generation
[mkdir] Created dir:
C:\Users\Sanne\hibernate-core-ogm\entitymanager\target\generated-src\jpamodelgen
[javac] Compiling 257 source files to
C:\Users\Sanne\hibernate-core-ogm\entitymanager\target\generated-src\jpamodelgen
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\QueryBuilderTest.java:44:
cannot find symbol
[javac] symbol : class Customer_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.Customer_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\basic\AggregationResultTest.java:37:
cannot find symbol
[javac] symbol : class Product_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.Product_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\basic\ExpressionsTest.java:43:
cannot find symbol
[javac] symbol : class Product_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.Product_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\basic\ExpressionsTest.java:44:
cannot find symbol
[javac] symbol : class Phone_
[javac] location: package org.hibernate.ejb.test.mapping
[javac] import org.hibernate.ejb.test.mapping.Phone_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\paths\ImplicitJoinTest.java:35:
cannot find symbol
[javac] symbol : class LineItem_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.LineItem_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\paths\ImplicitJoinTest.java:37:
cannot find symbol
[javac] symbol : class Order_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.Order_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\subquery\CorrelatedSubqueryTest.java:38:
cannot find symbol
[javac] symbol : class Customer_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.Customer_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\subquery\CorrelatedSubqueryTest.java:40:
cannot find symbol
[javac] symbol : class LineItem_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.LineItem_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\subquery\CorrelatedSubqueryTest.java:42:
cannot find symbol
[javac] symbol : class Order_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.Order_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\subquery\UncorrelatedSubqueryTest.java:35:
cannot find symbol
[javac] symbol : class Customer_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.Customer_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\subquery\UncorrelatedSubqueryTest.java:37:
cannot find symbol
[javac] symbol : class Order_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.Order_;
[javac] ^
[javac] C:\Users\Sanne\hibernate-core-ogm\entitymanager\src\test\java\org\hibernate\ejb\criteria\tuple\TupleCriteriaTest.java:13:
cannot find symbol
[javac] symbol : class Customer_
[javac] location: package org.hibernate.ejb.metamodel
[javac] import org.hibernate.ejb.metamodel.Customer_;
[javac] ^
[javac] Note: Hibernate JPA 2 Static-Metamodel Generator 1.0.0.Final
[touch] Creating
C:\Users\Sanne\hibernate-core-ogm\entitymanager\target\generated-src\jpamodelgen\.staleflag
[INFO] Executed tasks
[INFO] Registering compile test source root
C:\Users\Sanne\hibernate-core-ogm\entitymanager\target\generated-src\jpamodelgen
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources
(default-testResources) @ hibernate-entitymanager ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 16 resources
[INFO] Copying 22 resources to ../bundles
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile
(default-testCompile) @ hibernate-entitymanager ---
[INFO] Compiling 395 source files to
C:\Users\Sanne\hibernate-core-ogm\entitymanager\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @
hibernate-entitymanager ---
[INFO] Surefire report directory:
C:\Users\Sanne\hibernate-core-ogm\entitymanager\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
[continues with tests which run just fine]
Cheers,
Sanne
13 years, 8 months
3.6 branch
by Steve Ebersole
Tomorrow morning I will be renaming the top level directories on the 3.6
branch to match the names on master
13 years, 8 months
[HSearch] Faceting feedback
by Hardy Ferentschik
Hi,
I thought it would be great to get some feedback on my faceting work.
You can see the latest on my Search fork -
https://github.com/hferentschik/hibernate-search/commits/HSEARCH-667
Technically I decided to use a simple custom Collector. I abandoned the
idea for using bobo browse, since it did
not really seem to fit our architecture and I am not sure how well
maintained the code is.
Within the custom Collector I am using Lucene's FieldCache to cache and
collect the count values during facting
(as a reminder, faceting for example means that I am searching for all
cars or a certain make, but then also want
to group the matching cars into their cubic capacity. See also -
http://en.wikipedia.org/wiki/Faceted_search)
Using the FieldCache is quite memory costly, but there are other ways to
implement the faceting itself.
At the moment I am mostly interested in the feedback around the public
API. The public classes can be found in
the package org.hibernate.search.query.facet -
https://github.com/hferentschik/hibernate-search/tree/3a9877e2bbc47a8bd6e...
The idea is to write a fulltext query as usual and then add/enable a facet:
FacetRequest request = new SimpleFacetRequest( indexFieldName,
FacetSortOrder.COUNT_DESC, false );
TermQuery term = new TermQuery( new Term( "make", "honda" ) );
FullTextQuery query = fullTextSession.createFullTextQuery( term, Car.class
);
query.enableQueryFacet( "foo", request );
Then you run the query. This will enable the facet collector and after the
query executed you get access to a map
which maps FacetResults to the facet name. Each FacetResult contains a
list of Facets which contain the actually
field values and counts:
Map<String, FacetResult> results = query.getFacetResults();
FacetResult facetResult = results.get( "foo" );
List<Facet> facetList = facetResult.getFacets();
assertEquals( "Wrong facet count for facet ", 100, facetList.get( 0
).getCount() );
More actual tests can be found here -
https://github.com/hferentschik/hibernate-search/tree/3a9877e2bbc47a8bd6e...
At the moment you are able to facet on simple (string) based values or on
number ranges (eg price ranges 0 - 100, ...). For that I have created
subclasses of
FacetRequest - SimpleFacetRequest and RangeFacetRequest (a
DateRangeFacetRequest might be interesting as well)
Some concrete questions:
* Atm, I am only exposing a programmatic API for creating FacetRequests. I
guess we want to have annotations for this as well, right?
Would we keep the programmatic configuration as a public API?
* I made the FacetRequest classes immutable atm, but this way I have a
multitude of constructors catering for a whole range of parameters
(sort order, include zero counts, ...). Any opinions around immutable
objects vs objects with setters for configuring options after creation.
If course I am interested in any other feedback as well.
--Hardy
13 years, 8 months
Re: [hibernate-dev] HSEARCH-706 - work in progress comments
by Hardy Ferentschik
On Thu, 10 Mar 2011 13:27:30 +0100, Sanne Grinovero
<sanne.grinovero(a)gmail.com> wrote:
> It seems you're making a choice of the FieldCache type by looking at
> the classtype of the parameters of the FacetRequest.
> (which then invokes
> org.hibernate.search.query.fieldcache.FieldCacheLoadingType.getLoadingStrategy(String,
> Class<?>))
>
> Shouldn't it use the fieldName instead, to figure out the fieldbridges
> and options from the DocumentBuilder ?
Yes, I think I will need some information about the field bridges. Not
sure to which extend.
Faceting really only makes sense where I have fields with discrete
comparable values. Really
we are talking strings, numbers and dates.
I have seen your code in DocumentBuilderIndexedEntity and will have a
closer look, but first
I want to finish something else.
> I'm actually using the
> FieldCache.DEFAULT.getFloats/Ints/Doubles
> only in case it's indexed using the respective NumericField, all other
> cases are considered indexed as Strings, eventually converted back
> using the TwoWayStringBridge we enabled by default, or as overridden
> by use annotations.
The reason I am using int/float/double arrays is also because of the
required comparison
for range queries. Say I have a price expressed as an int and want a range
facet
for 10 - 1000. I need to numerically compare the field values against this
range and not
as string.
> I'd say that whatever TwoWayFieldBridge was configured, should be more
> reliable/flexible than to rely on Lucene's default int parser, but I'm
> not having strong opinions. Maybe we should have some more tests on
> special cases to make the implications clear.
Yes, we need more tests here. I'll be back on this one
13 years, 8 months
Re: [hibernate-dev] JBoss logging changes
by Gail Badner
Just a heads up that there was a compile error.
I created HHH-5995 and fixed it, so if you get this error, please do a
"git pull" to get the fix.
Gail Badner wrote:
> I pulled in the changes and I'm getting a compile error:
>
> /NotBackedUp/gbadner/git/hibernate-core-master-exact-really/hibernate-core/src/main/java/org/hibernate/engine/jdbc/spi/SqlExceptionHelper.java:276:
> cannot find symbol
> symbol : class Statement
> location: class org.hibernate.engine.jdbc.spi.SqlExceptionHelper
> public void handleAndClearWarnings( Statement statement,
> ^
> Cheers,
> Gail
>
> John Verhaeg wrote:
>> All logging-related changes are checked into master.
>>
>> JPAV
>>
>>
>>
>>
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>
>
13 years, 8 months