Quote:
other things to check:
[*]there was a bug in ext4 causing temporary freezes; should be solved by some times - don't remember the reference sorry, search for it in case you have ext4.
[*]verify it's not a regression in Lucene 2.9.x (which exact version are you using btw?)
ext3 and lucene 2.9.2.
Tried out the MMapDirectory but dont have enough memory to use it.
I have added more custom logs to HS code and have pinpointed exactly where the times loss is.
Quote:
14:45:46,578 [Thread-17] TRACE hibernate.search.impl.SearchFactoryImpl - Targeted indexed classes for [class com.mycompany:FooBar]: [class com.mycompany:FooBar]
14:45:46,579 [Thread-17] DEBUG hibernate.search.reader.SharingBufferReaderProvider - Opening IndexReader for directoryProviders: 1
14:45:46,579 [Thread-17] TRACE hibernate.search.reader.SharingBufferReaderProvider - Opening IndexReader from org.apache.lucene.store.NIOFSDirectory@/var/lucene/shared/com.mycompany:FooBar/1
14:45:46,579 [Thread-17] DEBUG hibernate.search.reader.SharingBufferReaderProvider - About to reopen reader
14:45:46,579 [Thread-17] DEBUG hibernate.search.reader.SharingBufferReaderProvider - Reader reopened
14:45:46,579 [Thread-17] DEBUG hibernate.search.reader.SharingBufferReaderProvider - Returning Reader
14:45:46,579 [Thread-17] DEBUG hibernate.search.query.FullTextQueryImpl - Searcher built
14:45:46,579 [Thread-17] DEBUG hibernate.search.query.FullTextQueryImpl - About to build filters
14:45:46,579 [Thread-17] DEBUG hibernate.search.query.FullTextQueryImpl - Built filters
14:45:46,580 [Thread-17] DEBUG hibernate.search.query.QueryHits - About to search
14:45:54,866 [Thread-17] DEBUG hibernate.search.query.QueryHits - Finished the search
14:45:54,866 [Thread-17] DEBUG hibernate.search.query.FullTextQueryImpl - Have query Hits
14:45:54,866 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 3192569
14:45:54,866 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 1110166
14:45:54,866 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 5206
14:45:54,867 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 1102658
14:45:54,867 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 1105455
14:45:54,867 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 1107890
14:45:54,867 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 1109632
14:45:54,867 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 1112472
14:45:54,876 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 282633
14:45:54,876 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 282368
14:45:54,876 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 3307901
14:45:54,876 [Thread-17] TRACE hibernate.search.engine.DocumentBuilderIndexedEntity - Field id projected as 3444561
14:45:54,876 [Thread-17] DEBUG hibernate.search.query.FullTextQueryImpl - About to get loader
14:45:54,876 [Thread-17] DEBUG hibernate.search.reader.SharingBufferReaderProvider - Closing MultiReader: org.hibernate.search.reader.CacheableMultiReader@18e899c
14:45:54,876 [Thread-17] TRACE hibernate.search.reader.SharingBufferReaderProvider - IndexReader closed.
Time loss is here
Quote:
14:45:46,580 [Thread-17] DEBUG hibernate.search.query.QueryHits - About to search
14:45:54,866 [Thread-17] DEBUG hibernate.search.query.QueryHits - Finished the search
And relates to the code here
Quote:
QueryHits.java
private void updateTopDocs(int n) throws IOException {
log.debug("About to search");
if ( sort == null ) {
topDocs = searcher.search( preparedQuery, filter, n );
}
else {
topDocs = searcher.search( preparedQuery, filter, n, sort );
}
log.debug("Finished the search");
}
Carried out a simpler query without filters on same entity, wildcard search on two columns
Quote:
15:45:33,472 [Thread-15] DEBUG hibernate.search.reader.SharingBufferReaderProvider - Opening IndexReader for directoryProviders: 1
15:45:33,472 [Thread-15] TRACE hibernate.search.reader.SharingBufferReaderProvider - Opening IndexReader from org.apache.lucene.store.NIOFSDirectory@/var/lucene/shared/com.mypackage.FooBar/1
15:45:33,472 [Thread-15] DEBUG hibernate.search.reader.SharingBufferReaderProvider - About to reopen reader
15:45:33,473 [Thread-15] DEBUG hibernate.search.reader.SharingBufferReaderProvider - Reader reopened
15:45:33,473 [Thread-15] DEBUG hibernate.search.reader.SharingBufferReaderProvider - Returning Reader
15:45:33,473 [Thread-15] DEBUG hibernate.search.query.FullTextQueryImpl - Searcher built
15:45:33,473 [Thread-15] DEBUG hibernate.search.query.FullTextQueryImpl - About to build filters
15:45:33,473 [Thread-15] DEBUG hibernate.search.query.QueryHits - About to search
15:45:33,473 [Thread-15] DEBUG hibernate.search.query.QueryHits - Finished the search
15:45:33,473 [Thread-15] DEBUG hibernate.search.query.FullTextQueryImpl - Have query Hits
15:45:33,474 [Thread-15] DEBUG hibernate.search.query.FullTextQueryImpl - About to get loader
15:45:33,474 [Thread-15] TRACE hibernate.search.impl.SearchFactoryImpl - Targeted indexed classes for
15:45:33,503 [Thread-15] TRACE org.hibernate.loader.Loader - done processing result set (15 rows)
15:45:33,503 [Thread-15] TRACE org.hibernate.loader.Loader - total objects hydrated: 0
15:45:33,548 [Thread-15] DEBUG hibernate.search.reader.SharingBufferReaderProvider - Closing MultiReader: org.hibernate.search.reader.CacheableMultiReader@18e899c
15:45:33,562 [Thread-15] TRACE hibernate.search.reader.SharingBufferReaderProvider - IndexReader closed.
The timing on ubuntu is quite good........im a bit stumped as to where to go from here, maybe query design can be better but remember the same queries work fine on windows.........havent stepped up to the latest 3.2. HS version yet. Might help??