cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Path Query

amitabhandari1
Champ in-the-making
Champ in-the-making
Does anyone encounter with the issue of Path query not working for a node but Type query working.

Your help appreciate.

Thanks,
7 REPLIES 7

mrogers
Star Contributor
Star Contributor
You need to post your query to stand any chance of getting a useful reply.    FWIW Path queries work as and when I see them used in alfresco and there are unit tests for them.

amitabhandari1
Champ in-the-making
Champ in-the-making
Hi mrogers,

Here is my path query :
PATH Query : PATH:"//app:company_home/cm:CrossCountry/cm:CCS/cm:HCP_Client/cm:HCP_591091/cm:ASG_997043"

TYPE Query : TYPE:"{com.CCHCM.customised.content.model}CCHAssignment"   AND (@\{com.CCHCM.customised.content.model\}currentAssignmentNo:"997043")


Type  query working fine and path query doesn't work.
When I do Full Indexing  path query starts working.
Let me know if you  need more information.
Thanks,

mrogers
Star Contributor
Star Contributor
I suggest you use the Node Browser in Alfresco Explorer to build up your query step by step.  I suspect that one of your elements may not match.

I've just tested the following similar query and it works for me.

PATH:"//app:company_home/app:user_homes/cm:fred"

Your problem could also be due to how you handle spaces, are HCP_Client, HCP_591091 and ASG_997043 really with underscore or do they have a space character.   Again the node broweser is your friend :!:

Here's an example I've tested for a file called "alien 2.jpg"

PATH:"//app:company_home/app:user_homes/cm:fred/cm:alien_x0020_2.jpg"

amitabhandari1
Champ in-the-making
Champ in-the-making
Thanks for the reply.
I am testing on nodebrowser only. Also the same thing works after we do Full Indexes.  But again get corrupt in some time .
There is no issue of  space character or underscore.
My project is in production for more then three years . I am facing this strange issue  these days.

My question is how Type query works with corrupt indexes and Path query not work until and unless we do reindex.

Appreciate your views

Thanks,

andy
Champ on-the-rise
Champ on-the-rise
Hi

Can you reproduce this issue and raise it as a bug?

Is it only documents that have the issue? Are folders affected?
What does the index check report?

TYPE finds the document direct. PATH uses a partial bridge table in the index.

What version of Alfresco? Clustered etc.

It is going toi require much more detail about the installation to get to the bottom of this.

Have you raised a support case?

Andy

amitabhandari1
Champ in-the-making
Champ in-the-making
Hi Andy,

This happens with all docs and folders .  There is a property name as  MaxFieldLength . If the value is lesser than  20 ,Path query stops for few  documents and folders.
Can you please  mention what is the use of  'maxFieldLegth' .  I can understand it is majorly use for  full text search .But how path query is corelated with  maxFieldLength.


Thanks,

andy
Champ on-the-rise
Champ on-the-rise
Hi

Can you provide the information requested?

maxFieldLegth determines how many tokens go into the index for any field.
Why is this set so low??
It meansfull text search will only see the very start of any doc….

Andy