cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Default installation not indexing?

shmoula
Champ in-the-making
Champ in-the-making
Hi,
  I have pure svn build with empty database and repository. I have simple modification to data model - my own datatype (mispub:webcontent) with boolean property mispub:toProcess. When I change that property programatically like this

nodeService.setProperty(publishItem.getNodeRef(), PublishModel.pubToProcess, false);

following lucene query finds nothing!!

+PATH:"/app:company_home/st:sites//*" +TYPE:"mispub:webContent" + @mispub\:toProcess:false

When I change false value to true in my search query, that content is found.

BUT now the weird part: in node browser is correct value, also in alfresco explorer, when document info is viewed. And when I change that property in explorer, everything works correctly!!

So my question is: isn't there any bug in nodeService, which omits some indexing notifier after setProperty? Or where can be a problem?

Thanks in advance
8 REPLIES 8

mrogers
Star Contributor
Star Contributor
There won't be a bug in the node service.   

However the node browser and your own queries can often have slightly different rules about escaping characters.   That's the "known difference".

shmoula
Champ in-the-making
Champ in-the-making
Thanks for reply mrogers.
  The problem is node browser AND my queries works exactly the same way - the bad one. When I set that boolean property to false (or removeProperty) programaticaly, searchService and node browser simply does not reflect that change (but in explorer details screen and doc_info is this setting printed correctly). And in other way - when I edit that property in explorer, everything work well (both searchService and node browser display correct results).

shmoula
Champ in-the-making
Champ in-the-making
I did some investigation and tried following things:
  • In EditContentPropertiesDialog are properties set all together with nodeService.setProperties(), so I tried the same, no success

  • Instead of false I tried to put Boolean.FALSE as that property, but without success

  • In EditContentPropertiesDialog is document.reset() called in doPostCommitProcessing, but I may have no FacesContext (because my routines are in webscript / init()), so without success

mrogers
Star Contributor
Star Contributor
Since this seems to be specific to share i suspect it may be due to the wrong values being persisted.   null rather than false.      If you can find your way around the database you could double check whether share is setting the Boolean value to false or doing something else.

It sounds like there may be a bug, so please raise it in JIRA.

Since your queries are working for true I think your indexing is fine.    And as I said above the problem will not be with the node service.

shmoula
Champ in-the-making
Champ in-the-making
You mean Alfresco Share? I thing it has nothing to done with that, I do that in "backing beans" and webscripts, those values are set directly in Java.

Queries are working for values set in alfresco explorer, when changed by nodeService.setProperty(), it works for previous set value, not just true and not just false.

I raised an issue for this: https://issues.alfresco.com/jira/browse/ALF-14621

mrogers
Star Contributor
Star Contributor
You are going to have to add more details and clarify that JIRA.

shmoula
Champ in-the-making
Champ in-the-making
Provided testcase (which works correctly) and sourcecode, which can reproduce that behaviour, while following provided steps.

shmoula
Champ in-the-making
Champ in-the-making
Ticket is closed, problem is solved - by extending AbstractLifecycleBean. Problem was that I was using node service in spring's init(), which did that inconsistency problems (still seems like a bug for me, see behaviour in comment in that ticket). If anyone is interested in working solution, I put symplified working code within eclipse project to my dropbox for download.