jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Sascha.The...@bosch-si.com>
Subject AW: AW: AW: How do I get the total size of nodes/rows from a QueryResult
Date Wed, 26 Oct 2011 17:06:48 GMT
Hi all,

I tried to increase the extractorTimeout or to completely remove the background processes
by setting the extractorPoolSize to 0 but nothing worked. If I put a delay of 1 second after
saving my nodes every test passes. So the problem is definitely caused by the extractor jobs
but it seems that I cannot disable them in my tests... :(

Here is my search index config, used in my repository.xml and in my workspace.xml (I only
have one workspace):

<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
			<param name="path" value="${wsp.home}/index" />
			<param name="useCompoundFile" value="true" />
			<param name="minMergeDocs" value="100" />
			<param name="volatileIdleTime" value="3" />
			<param name="maxMergeDocs" value="2147483647" />
			<param name="mergeFactor" value="10" />
			<param name="maxFieldLength" value="10000" />
			<param name="bufferSize" value="10" />
			<param name="cacheSize" value="1000" />
			<param name="forceConsistencyCheck" value="false" />
			<param name="enableConsistencyCheck" value="false" />
			<param name="autoRepair" value="true" />
			<param name="analyzer"
				value="org.apache.lucene.analysis.standard.StandardAnalyzer" />
			<param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl" />
			<param name="respectDocumentOrder" value="false" />
			<param name="resultFetchSize" value="2147483647" />
			<param name="extractorPoolSize" value="0" />
			<param name="extractorTimeout" value="10000" />
			<param name="extractorBackLogSize" value="100" />
			<param name="indexingConfiguration" value="${wsp.home}/indexing_configuration.xml"/>
		</SearchIndex>

Any ideas? Maybe jackrabbit doesn`t respect the settings... I really do not want to implement
a delay in my tests because you can`t choose the right delay in my opinion and it has something
to do with the upgrade to 2.2.9 because these tests never failed with jackrabbit 1.6...

Thanks in advance,

Sascha

-----Urspr√ľngliche Nachricht-----
Von: Alexander Klimetschek [mailto:aklimets@adobe.com] 
Gesendet: Mittwoch, 26. Oktober 2011 14:38
An: users@jackrabbit.apache.org
Betreff: Re: AW: AW: How do I get the total size of nodes/rows from a QueryResult

On 26.10.11 09:22, "Sascha.Theves@bosch-si.com"
<Sascha.Theves@bosch-si.com> wrote:

>> You can't be using limit & offset with Jackrabbit 1.x and Xpath...
>
>Hm but I really do that and it worked:
>
>   	((QueryImpl) query).setLimit(select.getLimit());
>   	((QueryImpl) query).setOffset(select.getOffset());
>   	QueryResultImpl queryResult = (QueryResultImpl)
>Executor.execute(query);
>	queryResult.getTotalSize();

Ah, you are right, forgot about them being on QueryImpl. But the behavior
should not have changed.

>Thanks for the tip and that makes 50% of my test cases to run without
>error but
>the other 50% do not work. I stripped the error down and found out that
>each query that uses a "contains" condition fails now.
>But the test fail not deterministic and I think that is because I add
>nodes with XML content (binary) in my test cases and immediately after
>adding the node I am searching for the content of the node. I think that
>the XMLTextExtractor runs in a paralles Thread and the computation is not
>finished when I try to query jackrabbit. I could now implement a delay in
>my tests but the best solution would be to wait until the
>XMLTextExtractor job is finished. Is there a possibility to do that or am
>I completely wrong with my suggestion?

Yes, extractors run in the background if they don't finish within a
certain timeframe (configurable as "extractorTimeout", see [0]). Maybe you
set this to a higher value for your tests, so you don't have to change
your test code to wait and retry.

[0] http://wiki.apache.org/jackrabbit/Search

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel





Mime
View raw message