You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by pkrishna <pr...@ge.com> on 2009/10/23 21:38:50 UTC

Inconsistent search results

On and off we find that searching nodes using properties in the node returns
erractic results. In some cases we get results back while in other cases and
other times no results are returned. Example:

We have a node A that has a child B. Now B has some properties and we use
XPATH to search for B based on B's properties. We know the node B exists in
the repository since that was just saved. We do a search like below:

 //ecr:variant[
		 @ecr:documentState!='deleted' 
		 and @ecr:language='00000000-0000-0000-0000-000000000003' 
		 and @ecr:namespace='ffcccf3d-e2f2-03a6-daf7-38415f9bddda' 
		 and @ecr:author='author' 
		 and @ecr:title='2d970d0f-d051-4cc0-849e-ec311a770ac1' 
		 and @ecr:contentType='GENERIC' 
		 and @ecr:contentLocation='Internal' 
		 and @jcr:mimeType='text/plain']

where node B pertains ecr:variant and we expect to get the most recent
variant (since we implement versioning of this node)

I now have a case where if I clean the database and the indexes on my local
box and run the above query I always get the node back. In other instances,
for some reason we can't retrieve the same node using the same query. The
results come back empty. The only way we can get past this problem is to, as
stated earlier, clear the indexes and database contents and re-run the query
and then we get the results as expected. This works when testing in a local
environment but not in a server environement where many clients are trying
to get the node using the above query.

Is there a way to get past the above problem without having to delete
indexes or clear database contents/
-- 
View this message in context: http://www.nabble.com/Inconsistent-search-results-tp26032173p26032173.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Inconsistent search results

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,

do you see any errors or warnings in the log files that would indicate
what causes this problem?

regards
 marcel

On Fri, Oct 23, 2009 at 21:38, pkrishna <pr...@ge.com> wrote:
>
> On and off we find that searching nodes using properties in the node returns
> erractic results. In some cases we get results back while in other cases and
> other times no results are returned. Example:
>
> We have a node A that has a child B. Now B has some properties and we use
> XPATH to search for B based on B's properties. We know the node B exists in
> the repository since that was just saved. We do a search like below:
>
>  //ecr:variant[
>                 @ecr:documentState!='deleted'
>                 and @ecr:language='00000000-0000-0000-0000-000000000003'
>                 and @ecr:namespace='ffcccf3d-e2f2-03a6-daf7-38415f9bddda'
>                 and @ecr:author='author'
>                 and @ecr:title='2d970d0f-d051-4cc0-849e-ec311a770ac1'
>                 and @ecr:contentType='GENERIC'
>                 and @ecr:contentLocation='Internal'
>                 and @jcr:mimeType='text/plain']
>
> where node B pertains ecr:variant and we expect to get the most recent
> variant (since we implement versioning of this node)
>
> I now have a case where if I clean the database and the indexes on my local
> box and run the above query I always get the node back. In other instances,
> for some reason we can't retrieve the same node using the same query. The
> results come back empty. The only way we can get past this problem is to, as
> stated earlier, clear the indexes and database contents and re-run the query
> and then we get the results as expected. This works when testing in a local
> environment but not in a server environement where many clients are trying
> to get the node using the above query.
>
> Is there a way to get past the above problem without having to delete
> indexes or clear database contents/
> --
> View this message in context: http://www.nabble.com/Inconsistent-search-results-tp26032173p26032173.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: Inconsistent search results

Posted by pkrishna <pr...@ge.com>.


pkrishna wrote:
> 
> On and off we find that searching nodes using properties in the node
> returns erractic results. In some cases we get results back while in other
> cases and other times no results are returned. Example:
> 
> We have a node A that has a child B. Now B has some properties and we use
> XPATH to search for B based on B's properties. We know the node B exists
> in the repository since that was just saved. We do a search like below:
> We are still not sure why there is inconsistent results but one thing we
> did notice was @ecr:contentLocation and @jcr:mimeType was not part of
> indexConfiguration file that was located in the default directory and this
> file was pointed to by an entry in workspace.xml. Our thinking was that
> query to XPATH should only contain parameters that are being indexed.
> 
> To be sure this was the cause of the problem, we added both the attribute
> to the indexConfiguration file, removed all indexes, cleared all database
> entries and re-ran the test. Sure enough, we were able to retrieve the the
> single content item that matched all the parameters of the query.
> 
> We then removed the 2 attrbutes from the indexConfiguration file (cleared
> the indexes and database) and re-ran the test anitipating the retrieve to
> fail. But now, contrary to what we thought, we are still able to retrieve
> the content item.
> 
> So we are not sure why we are able to retrieve the item when it should
> not.
> 
> So is our thinking correct- that is, XPATH queries should only contain
> parameters that are being indexed? If this is true, are there all files
> that should be removed besides clearing the indexes and database entries?
> If indexes defined in  the indexConfiguration file don't determine the
> what results are obtained, is there any other reason for  inconsistent
> results.
> 
> Regarding the log file, I am not sure which log file we are talking about
> and where would they normally be located.
> 
>  //ecr:variant[
> 		 @ecr:documentState!='deleted' 
> 		 and @ecr:language='00000000-0000-0000-0000-000000000003' 
> 		 and @ecr:namespace='ffcccf3d-e2f2-03a6-daf7-38415f9bddda' 
> 		 and @ecr:author='author' 
> 		 and @ecr:title='2d970d0f-d051-4cc0-849e-ec311a770ac1' 
> 		 and @ecr:contentType='GENERIC' 
> 		 and @ecr:contentLocation='Internal' 
> 		 and @jcr:mimeType='text/plain']
> 
> where node B pertains ecr:variant and we expect to get the most recent
> variant (since we implement versioning of this node)
> 
> I now have a case where if I clean the database and the indexes on my
> local box and run the above query I always get the node back. In other
> instances, for some reason we can't retrieve the same node using the same
> query. The results come back empty. The only way we can get past this
> problem is to, as stated earlier, clear the indexes and database contents
> and re-run the query and then we get the results as expected. This works
> when testing in a local environment but not in a server environement where
> many clients are trying to get the node using the above query.
> 
> Is there a way to get past the above problem without having to delete
> indexes or clear database contents/
> 

-- 
View this message in context: http://www.nabble.com/Inconsistent-search-results-tp26032173p26086672.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.