cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene and indexing

bgl
Champ on-the-rise
Champ on-the-rise
Hello,

I'm using Alfresco 3.4d community edition.

I have created a folder (using FileFolderService API) in the company home. When I search with the NodeBrowser, I have very strange results :

+PATH:"/app:company_home/*"

I get the list of folders as result. This is completely normal. Now, I try this :

+PATH:"/app:company_home/*" +@cm\:name:"folderName"

nothing is returned !!! I drop the lucene index and ask for full index at startup. Folder is still visible in the explorer. But if I run the previous query, Alfresco finds nothing.

Now I create a folder with Alfresco JSF UI. I make a search in the node browser (in Lucene mode) with the previous query :

+PATH:"/app:company_home/*" +@cm\:name:"folderName"

It is found. I stop Alfresco, drop indexes and replay the same query : nothing is found !!!!!

Can anyone explain me what is happening please. I cannot understand such behavior !! I have worked a lot with 3.2 and I have never seen such behavior !
Is 3.4.d version completely unstable ?

Thanks in advance for any explanations.
6 REPLIES 6

bgl
Champ on-the-rise
Champ on-the-rise
Note that the following query is returning the correct result :

+PATH:"/app:company_home/cm:folderName"

So why is this running fine and not the previous ones ?

Thank you.

bgl
Champ on-the-rise
Champ on-the-rise
My folder name has an underscore which seems to be a problem with standard configuration ( see this : http://forums.alfresco.com/en/viewtopic.php?f=27&t=21955 )

So I think my problem is almost solved 🙂
I will try the Luke tool to read into the lucene indexes.

Boris

openpj
Elite Collaborator
Elite Collaborator
Remember that when you are searching using the PATH token with Lucene you have to use the ISO9075 encoding for all the space names:
If you are using the JAVA API for example you have to encode the space name in this way:


String folderName = "anyName_for_yourSpace using also blankspace characters";
String luceneQuery = "PATH:\"/app:company_home/cm:\""+ISO9075.encode(folderName)+"\"";

Alfresco stores nodes using XPATH and that's why you have to conform to this standard and you have to encode all the space names using the ISO975 format.

bgl
Champ on-the-rise
Champ on-the-rise
Hi,

thank you for your answer. Yes that's true I had completely forgotten this thing in ISO9075. I had used it before but did not remember this "detail".
I will try it and post the result.

Again thank you !

bgl
Champ on-the-rise
Champ on-the-rise
Hi,

ISO is not the problem (well not in my case). The problem is about tokenization of file name… I tried a config with stored = true in the content model but it does not seem to change something…

I am still investigating the different configuration parameters to get something that is ok for me…

Boris

mrogers
Star Contributor
Star Contributor
If you are using FileFolderService  I suggest you use searchSimple instead.   Its far faster.